mirror of
https://github.com/yattee/yattee.git
synced 2026-07-20 14:22:02 +00:00
Split macOS player mode into window toggle + floating control
Replace the three-way macOS Player Mode picker (Separate Window / Floating Window / Inline) with a single 'Play in a separate window' toggle in Playback settings, and move the always-on-top choice to a pin button in the player's top bar (window mode only). Floating was really a transient window property (NSWindow.level), not a peer of the window/inline structural choice — so it belongs on a live control, not in Settings. The pin state persists across sessions. - Replace MacPlayerMode enum with macPlayerSeparateWindow / macPlayerFloating bool settings - Branch runtime presentation and window level off the two bools - Add pin.fill/pin toggle to MacOSPlayerControlsView top bar - Update localization; drop obsolete playerMode strings and enum tests
This commit is contained in:
@@ -174,38 +174,6 @@ struct SponsorBlockCategoryTests {
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - MacPlayerMode Tests (macOS only)
|
||||
|
||||
#if os(macOS)
|
||||
@Suite("MacPlayerMode Tests")
|
||||
@MainActor
|
||||
struct MacPlayerModeTests {
|
||||
|
||||
@Test("MacPlayerMode cases")
|
||||
func allCases() {
|
||||
let cases = MacPlayerMode.allCases
|
||||
#expect(cases.contains(.window))
|
||||
#expect(cases.contains(.inline))
|
||||
}
|
||||
|
||||
@Test("MacPlayerMode display names")
|
||||
func displayNames() {
|
||||
#expect(MacPlayerMode.window.displayName == "Separate Window")
|
||||
#expect(MacPlayerMode.floatingWindow.displayName == "Floating Window")
|
||||
#expect(MacPlayerMode.inline.displayName == "Inline (Sheet)")
|
||||
}
|
||||
|
||||
@Test("MacPlayerMode is Codable")
|
||||
func codable() throws {
|
||||
for mode in MacPlayerMode.allCases {
|
||||
let encoded = try JSONEncoder().encode(mode)
|
||||
let decoded = try JSONDecoder().decode(MacPlayerMode.self, from: encoded)
|
||||
#expect(mode == decoded)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// MARK: - UserAgentGenerator Tests
|
||||
|
||||
@Suite("UserAgentGenerator Tests")
|
||||
|
||||
Reference in New Issue
Block a user