feat: add preference: show standard tabs as windows

This commit is contained in:
Louis Pontoise authored and lwouis committed 2020-05-07 02:00:45 +09:00
1 parent 8419ad9fce
commit 3a11cc6dbd
3 files changed
+4 -1

No files matched your search

+2
View File
@@ -24,6 +24,7 @@ class Preferences {
"mouseHoverEnabled": "true",
"showMinimizedWindows": "true",
"showHiddenWindows": "true",
"showTabsAsWindows": "false",
"windowDisplayDelay": "0",
"theme": "0",
"showOnScreen": "0",
@@ -63,6 +64,7 @@ class Preferences {
static var mouseHoverEnabled: Bool { defaults.bool("mouseHoverEnabled") }
static var showMinimizedWindows: Bool { defaults.bool("showMinimizedWindows") }
static var showHiddenWindows: Bool { defaults.bool("showHiddenWindows") }
static var showTabsAsWindows: Bool { defaults.bool("showTabsAsWindows") }
static var windowDisplayDelay: DispatchTimeInterval { DispatchTimeInterval.milliseconds(defaults.int("windowDisplayDelay")) }
static var hideSpaceNumberLabels: Bool { defaults.bool("hideSpaceNumberLabels") }
static var startAtLogin: Bool { defaults.bool("startAtLogin") }
+1 -1
View File
@@ -100,7 +100,7 @@ class Windows {
!(Preferences.appsToShow == .active && window.application.runningApplication != NSWorkspace.shared.frontmostApplication) &&
!(Preferences.spacesToShow == .active && window.spaceId != Spaces.currentSpaceId) &&
!(Preferences.screensToShow == .showingAltTab && !isOnScreen(window, screen)) &&
!isTabbed(window)
(Preferences.showTabsAsWindows || !isTabbed(window))
}
static func isTabbed(_ window: Window) -> Bool {
@@ -19,6 +19,7 @@ class AppearanceTab: NSViewController, PreferencePane {
LabelAndControl.makeLabelWithDropdown(NSLocalizedString("Show on:", comment: ""), "showOnScreen", ShowOnScreenPreference.allCases),
LabelAndControl.makeLabelWithSlider(NSLocalizedString("Apparition delay:", comment: ""), "windowDisplayDelay", 0, 2000, 11, false, "ms"),
LabelAndControl.makeLabelWithCheckbox(NSLocalizedString("Hide space number labels:", comment: ""), "hideSpaceNumberLabels"),
LabelAndControl.makeLabelWithCheckbox(NSLocalizedString("Show standard tabs as windows:", comment: ""), "showTabsAsWindows"),
])
grid.column(at: 0).xPlacement = .trailing
grid.rowAlignment = .lastBaseline