mirror of
https://github.com/yattee/yattee.git
synced 2026-02-19 09:19:46 +00:00
Change default layout settings
This commit is contained in:
@@ -102,7 +102,7 @@ extension SettingsManager {
|
||||
if let cached = _miniPlayerMinimizeBehavior as? MiniPlayerMinimizeBehavior { return cached }
|
||||
guard let rawValue = localDefaults.string(forKey: "miniPlayerMinimizeBehavior"),
|
||||
let behavior = MiniPlayerMinimizeBehavior(rawValue: rawValue) else {
|
||||
return .onScrollDown // Default
|
||||
return .never // Default
|
||||
}
|
||||
return behavior
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ extension LayoutPreset {
|
||||
/// Bump this version whenever any built-in preset definition changes.
|
||||
/// On launch, the app compares this against the last-applied version
|
||||
/// and replaces stale built-in presets with fresh copies from code.
|
||||
static let builtInPresetsVersion = 3
|
||||
static let builtInPresetsVersion = 5
|
||||
|
||||
// MARK: - Built-in Preset IDs
|
||||
|
||||
@@ -32,6 +32,10 @@ extension LayoutPreset {
|
||||
visibilityMode: .wideOnly
|
||||
),
|
||||
.flexibleSpacer(),
|
||||
ControlButtonConfiguration(
|
||||
buttonType: .contextMenu,
|
||||
visibilityMode: .wideOnly
|
||||
),
|
||||
.defaultConfiguration(for: .orientationLock),
|
||||
.defaultConfiguration(for: .close)
|
||||
]
|
||||
@@ -51,10 +55,6 @@ extension LayoutPreset {
|
||||
visibilityMode: .wideOnly
|
||||
),
|
||||
.flexibleSpacer(),
|
||||
ControlButtonConfiguration(
|
||||
buttonType: .contextMenu,
|
||||
visibilityMode: .wideOnly
|
||||
),
|
||||
.defaultConfiguration(for: .settings),
|
||||
.defaultConfiguration(for: .pictureInPicture),
|
||||
.defaultConfiguration(for: .fullscreen)
|
||||
|
||||
@@ -72,7 +72,8 @@ struct MiniPlayerSettings: Codable, Hashable, Sendable {
|
||||
/// Default buttons for the mini player: play/pause and play next.
|
||||
private static let defaultButtons: [ControlButtonConfiguration] = [
|
||||
ControlButtonConfiguration(buttonType: .playPause),
|
||||
ControlButtonConfiguration(buttonType: .playNext)
|
||||
ControlButtonConfiguration(buttonType: .playNext),
|
||||
ControlButtonConfiguration(buttonType: .close)
|
||||
]
|
||||
|
||||
/// Default mini player settings.
|
||||
|
||||
Reference in New Issue
Block a user