diff --git a/resources/icons/preferences/appearance/app_icons@2x.png b/resources/icons/preferences/appearance/app_icons@2x.png index f27fa14a..2d76fee8 100644 Binary files a/resources/icons/preferences/appearance/app_icons@2x.png and b/resources/icons/preferences/appearance/app_icons@2x.png differ diff --git a/resources/icons/preferences/appearance/large@2x.png b/resources/icons/preferences/appearance/large@2x.png new file mode 100644 index 00000000..7410f26f Binary files /dev/null and b/resources/icons/preferences/appearance/large@2x.png differ diff --git a/resources/icons/preferences/appearance/macos@2x.png b/resources/icons/preferences/appearance/macos@2x.png new file mode 100644 index 00000000..81898f67 Binary files /dev/null and b/resources/icons/preferences/appearance/macos@2x.png differ diff --git a/resources/icons/preferences/appearance/middle@2x.png b/resources/icons/preferences/appearance/middle@2x.png new file mode 100644 index 00000000..64dd5220 Binary files /dev/null and b/resources/icons/preferences/appearance/middle@2x.png differ diff --git a/resources/icons/preferences/appearance/small@2x.png b/resources/icons/preferences/appearance/small@2x.png new file mode 100644 index 00000000..8b7e2cef Binary files /dev/null and b/resources/icons/preferences/appearance/small@2x.png differ diff --git a/resources/icons/preferences/appearance/titles@2x.png b/resources/icons/preferences/appearance/titles@2x.png index f27fa14a..48b9426a 100644 Binary files a/resources/icons/preferences/appearance/titles@2x.png and b/resources/icons/preferences/appearance/titles@2x.png differ diff --git a/resources/icons/preferences/appearance/windows10@2x.png b/resources/icons/preferences/appearance/windows10@2x.png new file mode 100644 index 00000000..24e0c9b7 Binary files /dev/null and b/resources/icons/preferences/appearance/windows10@2x.png differ diff --git a/src/logic/Preferences.swift b/src/logic/Preferences.swift index e0527db2..9d6b2d2a 100644 --- a/src/logic/Preferences.swift +++ b/src/logic/Preferences.swift @@ -540,6 +540,12 @@ struct WidthHeightImage { var width: CGFloat var height: CGFloat var name: String + + init(width: CGFloat = 75, height: CGFloat = 50, name: String) { + self.width = width + self.height = height + self.name = name + } } protocol ImageMacroPreference: MacroPreference { @@ -725,11 +731,9 @@ enum AlignThumbnailsPreference: String, CaseIterable, ImageMacroPreference { } var image: WidthHeightImage { - let width: CGFloat = 75 - let height: CGFloat = 50 switch self { - case .left: return WidthHeightImage(width: width, height: height, name: "thumbnails") - case .center: return WidthHeightImage(width: width, height: height, name: "app_icons") + case .left: return WidthHeightImage(name: "align_left") + case .center: return WidthHeightImage(name: "align_center") } } } @@ -741,19 +745,17 @@ enum AppearanceModelPreference: String, CaseIterable, ImageMacroPreference { var localizedString: LocalizedString { switch self { - case .thumbnails: return NSLocalizedString("Thumbnails", comment: "") - case .appIcons: return NSLocalizedString("App Icons", comment: "") - case .titles: return NSLocalizedString("Titles", comment: "") + case .thumbnails: return NSLocalizedString("Thumbnails", comment: "") + case .appIcons: return NSLocalizedString("App Icons", comment: "") + case .titles: return NSLocalizedString("Titles", comment: "") } } var image: WidthHeightImage { - let width: CGFloat = 75 - let height: CGFloat = 50 switch self { - case .thumbnails: return WidthHeightImage(width: width, height: height, name: "thumbnails") - case .appIcons: return WidthHeightImage(width: width, height: height, name: "app_icons") - case .titles: return WidthHeightImage(width: width, height: height, name: "titles") + case .thumbnails: return WidthHeightImage(name: "thumbnails") + case .appIcons: return WidthHeightImage(name: "app_icons") + case .titles: return WidthHeightImage(name: "titles") } } } @@ -772,12 +774,10 @@ enum AppearanceSizePreference: String, CaseIterable, ImageMacroPreference { } var image: WidthHeightImage { - let width: CGFloat = 75 - let height: CGFloat = 50 switch self { - case .small: return WidthHeightImage(width: width, height: height, name: "thumbnails") - case .middle: return WidthHeightImage(width: width, height: height, name: "app_icons") - case .large: return WidthHeightImage(width: width, height: height, name: "titles") + case .small: return WidthHeightImage(name: "small") + case .middle: return WidthHeightImage(name: "middle") + case .large: return WidthHeightImage(name: "large") } } } @@ -794,11 +794,9 @@ enum ThemePreference: String, CaseIterable, ImageMacroPreference { } var image: WidthHeightImage { - let width: CGFloat = 75 - let height: CGFloat = 50 switch self { - case .macOs: return WidthHeightImage(width: width, height: height, name: "thumbnails") - case .windows10: return WidthHeightImage(width: width, height: height, name: "app_icons") + case .macOs: return WidthHeightImage(name: "macos") + case .windows10: return WidthHeightImage(name: "windows10") } } diff --git a/src/ui/preferences-window/LabelAndControl.swift b/src/ui/preferences-window/LabelAndControl.swift index 70d0e66a..33dfa2c9 100644 --- a/src/ui/preferences-window/LabelAndControl.swift +++ b/src/ui/preferences-window/LabelAndControl.swift @@ -57,7 +57,7 @@ class LabelAndControl: NSObject { imageContainer.centerXAnchor.constraint(equalTo: button.centerXAnchor), imageContainer.centerYAnchor.constraint(equalTo: button.centerYAnchor), // Adjust width for border and padding - imageContainer.widthAnchor.constraint(equalTo: button.widthAnchor, constant: -5), + imageContainer.widthAnchor.constraint(equalTo: button.widthAnchor, constant: -4), // Adjust height for border and padding imageContainer.heightAnchor.constraint(equalTo: button.heightAnchor, constant: -4) ]) diff --git a/src/ui/preferences-window/tabs/AppearanceTab.swift b/src/ui/preferences-window/tabs/AppearanceTab.swift index 943b5dc8..4799fdfa 100644 --- a/src/ui/preferences-window/tabs/AppearanceTab.swift +++ b/src/ui/preferences-window/tabs/AppearanceTab.swift @@ -12,7 +12,7 @@ class AppearanceTab { [makeSeparator(), makeSeparator(), makeSeparator()], LabelAndControl.makeLabelWithImageRadioButtons(NSLocalizedString("Theme:", comment: ""), "theme", ThemePreference.allCases, buttonSpacing: 50), [makeSeparator(), makeSeparator(), makeSeparator()], - LabelAndControl.makeLabelWithImageRadioButtons(NSLocalizedString("Align windows:", comment: ""), "alignThumbnails", AlignThumbnailsPreference.allCases), + LabelAndControl.makeLabelWithImageRadioButtons(NSLocalizedString("Align windows:", comment: ""), "alignThumbnails", AlignThumbnailsPreference.allCases, buttonSpacing: 60), [makeSeparator(), makeSeparator(), makeSeparator()], LabelAndControl.makeLabelWithDropdown(NSLocalizedString("Window title truncation:", comment: ""), "titleTruncation", TitleTruncationPreference.allCases), LabelAndControl.makeLabelWithDropdown(NSLocalizedString("Show on:", comment: ""), "showOnScreen", ShowOnScreenPreference.allCases),