mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 15:14:33 +00:00
BugFix: SettingsView Media sizing
This commit is contained in:
parent
628892a73b
commit
f9e95fc26e
3 changed files with 6 additions and 5 deletions
|
|
@ -1519,11 +1519,12 @@ struct Media: View {
|
||||||
}
|
}
|
||||||
|
|
||||||
private var mediaControlsGrid: some View {
|
private var mediaControlsGrid: some View {
|
||||||
VStack(alignment: .leading, spacing: 20) {
|
VStack(alignment: .leading, spacing: 16) {
|
||||||
mediaControlsRow(title: "Left button", selection: $musicAuxLeftControl, otherSelection: musicAuxRightControl)
|
mediaControlsRow(title: "Left button", selection: $musicAuxLeftControl, otherSelection: musicAuxRightControl)
|
||||||
mediaControlsRow(title: "Right button", selection: $musicAuxRightControl, otherSelection: musicAuxLeftControl)
|
mediaControlsRow(title: "Right button", selection: $musicAuxRightControl, otherSelection: musicAuxLeftControl)
|
||||||
}
|
}
|
||||||
.padding(.vertical, 12)
|
.padding(.vertical, 12)
|
||||||
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
}
|
}
|
||||||
|
|
||||||
private func mediaControlsRow(title: String, selection: Binding<MusicAuxiliaryControl>, otherSelection: MusicAuxiliaryControl) -> some View {
|
private func mediaControlsRow(title: String, selection: Binding<MusicAuxiliaryControl>, otherSelection: MusicAuxiliaryControl) -> some View {
|
||||||
|
|
@ -1532,7 +1533,7 @@ struct Media: View {
|
||||||
.font(.system(size: 13, weight: .semibold))
|
.font(.system(size: 13, weight: .semibold))
|
||||||
.foregroundStyle(.white)
|
.foregroundStyle(.white)
|
||||||
|
|
||||||
HStack(spacing: 16) {
|
HStack(spacing: 12) {
|
||||||
ForEach([MusicAuxiliaryControl.mediaOutput, MusicAuxiliaryControl.repeatMode, MusicAuxiliaryControl.lyrics, MusicAuxiliaryControl.shuffle], id: \.self) { control in
|
ForEach([MusicAuxiliaryControl.mediaOutput, MusicAuxiliaryControl.repeatMode, MusicAuxiliaryControl.lyrics, MusicAuxiliaryControl.shuffle], id: \.self) { control in
|
||||||
MediaControlButton(
|
MediaControlButton(
|
||||||
control: control,
|
control: control,
|
||||||
|
|
@ -1568,7 +1569,7 @@ struct Media: View {
|
||||||
.font(.system(size: 22, weight: .medium))
|
.font(.system(size: 22, weight: .medium))
|
||||||
.foregroundStyle(iconColor)
|
.foregroundStyle(iconColor)
|
||||||
}
|
}
|
||||||
.frame(width: 80, height: 60)
|
.frame(width: 68, height: 52)
|
||||||
.onHover { hovering in
|
.onHover { hovering in
|
||||||
if !disabled {
|
if !disabled {
|
||||||
withAnimation(.easeInOut(duration: 0.2)) {
|
withAnimation(.easeInOut(duration: 0.2)) {
|
||||||
|
|
@ -1582,7 +1583,7 @@ struct Media: View {
|
||||||
.fontWeight(.medium)
|
.fontWeight(.medium)
|
||||||
.lineLimit(2)
|
.lineLimit(2)
|
||||||
.multilineTextAlignment(.center)
|
.multilineTextAlignment(.center)
|
||||||
.frame(width: 100)
|
.frame(width: 80)
|
||||||
.foregroundStyle(disabled ? .secondary : .primary)
|
.foregroundStyle(disabled ? .secondary : .primary)
|
||||||
}
|
}
|
||||||
.contentShape(Rectangle())
|
.contentShape(Rectangle())
|
||||||
|
|
|
||||||
BIN
DynamicIsland/lowbattery.mp3
Normal file
BIN
DynamicIsland/lowbattery.mp3
Normal file
Binary file not shown.
|
|
@ -6,7 +6,7 @@ import Darwin
|
||||||
final class MemoryUsageMonitor {
|
final class MemoryUsageMonitor {
|
||||||
static let shared = MemoryUsageMonitor()
|
static let shared = MemoryUsageMonitor()
|
||||||
|
|
||||||
private let thresholdBytes: UInt64 = 700 * 1_024 * 1_024
|
private let thresholdBytes: UInt64 = 1_024 * 1_024 * 1_024
|
||||||
private let pollInterval: TimeInterval = 8 // Clamp within 5-10 seconds to limit battery impact
|
private let pollInterval: TimeInterval = 8 // Clamp within 5-10 seconds to limit battery impact
|
||||||
private let restartCooldown: TimeInterval = 300
|
private let restartCooldown: TimeInterval = 300
|
||||||
private let logSampleInterval: TimeInterval = 300
|
private let logSampleInterval: TimeInterval = 300
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue