mirror of
https://github.com/lwouis/alt-tab-macos.git
synced 2026-05-24 11:20:36 +00:00
fix: show titles > application name, in thumbnails style (closes #3667)
This commit is contained in:
@@ -351,12 +351,10 @@ class ThumbnailView: NSStackView {
|
||||
let appName = window_?.application.runningApplication.localizedName
|
||||
let windowTitle = window_?.title
|
||||
|
||||
if Preferences.appearanceStyle != .thumbnails {
|
||||
if Preferences.onlyShowApplications() || Preferences.showTitles == .appName {
|
||||
return appName ?? ""
|
||||
} else if Preferences.showTitles == .appNameAndWindowTitle {
|
||||
return [appName, windowTitle].compactMap{ $0 }.joined(separator: " - ")
|
||||
}
|
||||
if Preferences.onlyShowApplications() || Preferences.showTitles == .appName {
|
||||
return appName ?? ""
|
||||
} else if Preferences.showTitles == .appNameAndWindowTitle {
|
||||
return [appName, windowTitle].compactMap{ $0 }.joined(separator: " - ")
|
||||
}
|
||||
return windowTitle ?? ""
|
||||
}
|
||||
|
||||
@@ -79,6 +79,7 @@ class CustomizeStyleSheet: SheetWindow {
|
||||
showTitlesRowInfo = table.addRow(showTitles, onMouseEntered: { event, view in
|
||||
self.showAppsOrWindowsIllustratedImage()
|
||||
})
|
||||
table.addNewTable()
|
||||
table.addRow(alignThumbnails, onMouseEntered: { event, view in
|
||||
self.showAlignThumbnailsIllustratedImage()
|
||||
}, onMouseExited: { event, view in
|
||||
@@ -96,7 +97,7 @@ class CustomizeStyleSheet: SheetWindow {
|
||||
|
||||
private func makeAppIconsView() -> TableGroupSetView {
|
||||
let table = makeAppWindowTableGroupView()
|
||||
|
||||
table.addNewTable()
|
||||
table.addRow(alignThumbnails, onMouseEntered: { event, view in
|
||||
self.showAlignThumbnailsIllustratedImage()
|
||||
})
|
||||
@@ -112,7 +113,7 @@ class CustomizeStyleSheet: SheetWindow {
|
||||
|
||||
private func makeTitlesView() -> TableGroupSetView {
|
||||
let table = makeAppWindowTableGroupView()
|
||||
|
||||
table.addNewTable()
|
||||
table.addRow(titleTruncation)
|
||||
table.fit()
|
||||
|
||||
@@ -158,11 +159,9 @@ class CustomizeStyleSheet: SheetWindow {
|
||||
}
|
||||
|
||||
private func showAppsOrWindowsIllustratedImage() {
|
||||
var imageName = ShowTitlesPreference.windowTitle.image.name
|
||||
if Preferences.showAppsOrWindows == .applications || Preferences.showTitles == .appName {
|
||||
var imageName = Preferences.showTitles.image.name
|
||||
if Preferences.onlyShowApplications() {
|
||||
imageName = ShowTitlesPreference.appName.image.name
|
||||
} else if Preferences.showTitles == .appNameAndWindowTitle {
|
||||
imageName = ShowTitlesPreference.appNameAndWindowTitle.image.name
|
||||
}
|
||||
self.illustratedImageView.highlight(true, imageName)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user