diff --git a/alt-tab-macos.xcodeproj/project.pbxproj b/alt-tab-macos.xcodeproj/project.pbxproj index 621e3f6b..99655ea6 100644 --- a/alt-tab-macos.xcodeproj/project.pbxproj +++ b/alt-tab-macos.xcodeproj/project.pbxproj @@ -23,6 +23,7 @@ D04BA15A1B0C4871EA7CB899 /* GeneralTab.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04BACE22DC907F03D193075 /* GeneralTab.swift */; }; D04BA1621718FF26F8D5E75D /* CustomRecorderControl.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04BAE333F7170E87C5AC0EF /* CustomRecorderControl.swift */; }; D04BA1637E125D38546C26E2 /* StackView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04BA8AC77465E1B2BC947CF /* StackView.swift */; }; + D04BA16BA4743CD91B9E038C /* menubar-icon-1@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D04BA561B958D1AD495C7A40 /* menubar-icon-1@2x.png */; }; D04BA1766FBCB2E941D081A5 /* WorkspaceEvents.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04BA76AEE37D6656EB80126 /* WorkspaceEvents.swift */; }; D04BA1B133D53572D7B312C2 /* ThumbnailFontIconView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04BA1DF8CAB2FAB7FE9244B /* ThumbnailFontIconView.swift */; }; D04BA1C85041FB043FD43E65 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = D04BA05006D56C7AA011C0CE /* Localizable.strings */; }; @@ -34,6 +35,7 @@ D04BA2B4364250FA07EE5793 /* screen-recording@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D04BA98B2A0815540E319908 /* screen-recording@2x.png */; }; D04BA2D8099594E1593EC8EF /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = D04BA88EDDDD6CB3FBE71FC5 /* InfoPlist.strings */; }; D04BA2E64C59D96F6EB27D9D /* FeedbackWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04BA26C75F76C277653C932 /* FeedbackWindow.swift */; }; + D04BA30A1697247D21AB26E4 /* menubar-icon-2@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D04BADE3AAB5930FB7DC4A25 /* menubar-icon-2@2x.png */; }; D04BA34AC850A273AB288B1E /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = D04BA3B51D05213404938366 /* Localizable.strings */; }; D04BA3744F48116DF4252B19 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = D04BA02355EB28D639F854DF /* Localizable.strings */; }; D04BA3C24F4F644EA91DE38C /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = D04BA717693DA18CB74BAED1 /* Localizable.strings */; }; @@ -93,7 +95,6 @@ D04BAC6528FB6F06A9ACFFF5 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = D04BA5090185A1F3550DA5AB /* Localizable.strings */; }; D04BAC71F7EC1137D5A8503A /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = D04BA6F52A356A51B9AFAF00 /* Localizable.strings */; }; D04BACA938C98E0A83C9ED6F /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = D04BA02BBED13DEB284CC634 /* InfoPlist.strings */; }; - D04BACE5702CEB1819866875 /* menubar-icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D04BA399F1DF2C61FC2C9599 /* menubar-icon@2x.png */; }; D04BAD1BE9DC22C48C53D195 /* AboutTab.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04BA4A26987F67DD94C827F /* AboutTab.swift */; }; D04BAD2A7F2E8BF64EE982E9 /* TextArea.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04BA7C836A8CE8C0B8D128B /* TextArea.swift */; }; D04BAD395C7146A49734E0A5 /* about@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D04BA4FC0DEB8B44FF460F90 /* about@2x.png */; }; @@ -143,6 +144,7 @@ D04BA1D80F4EEF2A91BAD29C /* release.config.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = release.config.js; sourceTree = ""; }; D04BA1DF8CAB2FAB7FE9244B /* ThumbnailFontIconView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ThumbnailFontIconView.swift; sourceTree = ""; }; D04BA1FC9022590D7AA02486 /* 1 window - 1 line.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "1 window - 1 line.jpg"; sourceTree = ""; }; + D04BA1FF2F8373E131A3E071 /* menubar-icon-1.svg */ = {isa = PBXFileReference; lastKnownFileType = file.svg; path = "menubar-icon-1.svg"; sourceTree = ""; }; D04BA2526DC6726E0F7ACF7C /* LabelAndControl.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LabelAndControl.swift; sourceTree = ""; }; D04BA258B56193958D60978A /* ThumbnailView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ThumbnailView.swift; sourceTree = ""; }; D04BA26C75F76C277653C932 /* FeedbackWindow.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FeedbackWindow.swift; sourceTree = ""; }; @@ -157,7 +159,6 @@ D04BA32F25860B686DFE818A /* 3 windows - 1 line.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "3 windows - 1 line.jpg"; sourceTree = ""; }; D04BA3632A2EB5C64A3FEE59 /* hu */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = hu; path = InfoPlist.strings; sourceTree = ""; }; D04BA369B4D9FD6A13936F53 /* bare.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = bare.html; sourceTree = ""; }; - D04BA399F1DF2C61FC2C9599 /* menubar-icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "menubar-icon@2x.png"; sourceTree = ""; }; D04BA3EF6656955B0B29C2CD /* other.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = other.md; sourceTree = ""; }; D04BA3FF376BC2757D25A2AD /* controls@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "controls@2x.png"; sourceTree = ""; }; D04BA4135D97F9E784709DA8 /* ko */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = ko; path = InfoPlist.strings; sourceTree = ""; }; @@ -180,6 +181,7 @@ D04BA53992F116E5E704CAB3 /* BaseLabel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaseLabel.swift; sourceTree = ""; }; D04BA5488C8142D30E7D3EF9 /* browserconfig.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = browserconfig.xml; sourceTree = ""; }; D04BA55D1B2C8BFF61954466 /* generate_selfsigned_certificate.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = generate_selfsigned_certificate.sh; sourceTree = ""; }; + D04BA561B958D1AD495C7A40 /* menubar-icon-1@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "menubar-icon-1@2x.png"; sourceTree = ""; }; D04BA5ABFA5457A86536E2E4 /* 5 windows - 1 line.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "5 windows - 1 line.jpg"; sourceTree = ""; }; D04BA5BD11C365C19461458C /* TextField.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TextField.swift; sourceTree = ""; }; D04BA5C401AFA55CC67C7188 /* PrivateApis.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PrivateApis.swift; sourceTree = ""; }; @@ -288,11 +290,11 @@ D04BAD91161791D42FEC4A60 /* HelperExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HelperExtensions.swift; sourceTree = ""; }; D04BAD98C2DCFE95458947D3 /* setup_local.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = setup_local.sh; sourceTree = ""; }; D04BADB5AA570748C717D31A /* Changelog-bare.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = "Changelog-bare.md"; sourceTree = ""; }; + D04BADE3AAB5930FB7DC4A25 /* menubar-icon-2@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "menubar-icon-2@2x.png"; sourceTree = ""; }; D04BADFEF9A8189ABC8BF5EE /* Localizable.strings */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; path = Localizable.strings; sourceTree = ""; }; D04BAE1243C9B4BE3ED1B524 /* 7 windows - 2 lines - extra wide window.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "7 windows - 2 lines - extra wide window.jpg"; sourceTree = ""; }; D04BAE298D0D87E4E69A2054 /* default.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = default.html; sourceTree = ""; }; D04BAE2BF28F187307C29FDE /* ru */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = ru; path = Localizable.strings; sourceTree = ""; }; - D04BAE2DC036FD84446E1AE6 /* menubar-icon.svg */ = {isa = PBXFileReference; lastKnownFileType = file.svg; path = "menubar-icon.svg"; sourceTree = ""; }; D04BAE333F7170E87C5AC0EF /* CustomRecorderControl.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomRecorderControl.swift; sourceTree = ""; }; D04BAE5D665680CB4B13CA26 /* app-icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = "app-icon.icns"; sourceTree = ""; }; D04BAE93A5854C501639C640 /* update_homebrew_cask.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = update_homebrew_cask.sh; sourceTree = ""; }; @@ -302,6 +304,7 @@ D04BAEF1D194C2379C9970F1 /* setup_ci_master.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = setup_ci_master.sh; sourceTree = ""; }; D04BAF076A30A1BAFEDBEA66 /* 5 windows - 2 lines.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "5 windows - 2 lines.jpg"; sourceTree = ""; }; D04BAF1058D2599E6E8ABBA6 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.info; path = Info.plist; sourceTree = ""; }; + D04BAF11966E96B9974E93C7 /* menubar-icon-2.svg */ = {isa = PBXFileReference; lastKnownFileType = file.svg; path = "menubar-icon-2.svg"; sourceTree = ""; }; D04BAF320F4D43F0DDFE063E /* MouseEvents.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MouseEvents.swift; sourceTree = ""; }; D04BAF6E2AB002763931645A /* general@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "general@2x.png"; sourceTree = ""; }; D04BAF6F617FCA44D1F75B60 /* alt_tab_macos.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = alt_tab_macos.entitlements; sourceTree = ""; }; @@ -667,14 +670,16 @@ D04BA7568B7165A7726306A7 /* icons */ = { isa = PBXGroup; children = ( - D04BA399F1DF2C61FC2C9599 /* menubar-icon@2x.png */, - D04BAE2DC036FD84446E1AE6 /* menubar-icon.svg */, D04BA1C3E42AC44CA2C5D3D8 /* app-icon.svg */, D04BAE5D665680CB4B13CA26 /* app-icon.icns */, D04BA4356B4F575E66B32298 /* app-icon.iconset */, D04BA303761CFDD9BE8B6ECB /* accessibility@2x.png */, D04BA98B2A0815540E319908 /* screen-recording@2x.png */, D04BACB1ACA7FCB074440059 /* tabs */, + D04BA1FF2F8373E131A3E071 /* menubar-icon-1.svg */, + D04BA561B958D1AD495C7A40 /* menubar-icon-1@2x.png */, + D04BAF11966E96B9974E93C7 /* menubar-icon-2.svg */, + D04BADE3AAB5930FB7DC4A25 /* menubar-icon-2@2x.png */, ); path = icons; sourceTree = ""; @@ -990,7 +995,6 @@ D04BAC3169D54014CBA9ACE5 /* Localizable.strings in Resources */, D04BA100BD0F47828EB649FF /* InfoPlist.strings in Resources */, D04BA3C24F4F644EA91DE38C /* Localizable.strings in Resources */, - D04BACE5702CEB1819866875 /* menubar-icon@2x.png in Resources */, D04BAC61DCCB79B5D436F022 /* app-icon.icns in Resources */, D04BA03B560B681AF96E4610 /* InfoPlist.strings in Resources */, D04BA1C85041FB043FD43E65 /* Localizable.strings in Resources */, @@ -1029,6 +1033,8 @@ D04BA8C8016BD6E2FDE80430 /* controls@2x.png in Resources */, D04BA72B336C7175871B281C /* general@2x.png in Resources */, D04BA892CB4324F514EDF172 /* policies@2x.png in Resources */, + D04BA16BA4743CD91B9E038C /* menubar-icon-1@2x.png in Resources */, + D04BA30A1697247D21AB26E4 /* menubar-icon-2@2x.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/resources/icons/menubar-icon-1.svg b/resources/icons/menubar-icon-1.svg new file mode 100644 index 00000000..85c5165f --- /dev/null +++ b/resources/icons/menubar-icon-1.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/menubar-icon-1@2x.png b/resources/icons/menubar-icon-1@2x.png new file mode 100644 index 00000000..0640fa7a Binary files /dev/null and b/resources/icons/menubar-icon-1@2x.png differ diff --git a/resources/icons/menubar-icon-2.svg b/resources/icons/menubar-icon-2.svg new file mode 100644 index 00000000..da86be11 --- /dev/null +++ b/resources/icons/menubar-icon-2.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/menubar-icon-2@2x.png b/resources/icons/menubar-icon-2@2x.png new file mode 100644 index 00000000..c40dd10e Binary files /dev/null and b/resources/icons/menubar-icon-2@2x.png differ diff --git a/resources/icons/menubar-icon.svg b/resources/icons/menubar-icon.svg deleted file mode 100644 index 3e499400..00000000 --- a/resources/icons/menubar-icon.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/resources/icons/menubar-icon@2x.png b/resources/icons/menubar-icon@2x.png deleted file mode 100644 index 95ef7c39..00000000 Binary files a/resources/icons/menubar-icon@2x.png and /dev/null differ diff --git a/resources/l10n/Localizable.strings b/resources/l10n/Localizable.strings index 075a8930..fe4e3830 100644 --- a/resources/l10n/Localizable.strings +++ b/resources/l10n/Localizable.strings @@ -130,9 +130,6 @@ /* No comment provided by engineer. */ "Hide colored circles on mouse hover:" = "Hide colored circles on mouse hover:"; -/* No comment provided by engineer. */ -"Hide menubar icon:" = "Hide menubar icon:"; - /* No comment provided by engineer. */ "Hide space number labels:" = "Hide space number labels:"; @@ -163,6 +160,9 @@ /* No comment provided by engineer. */ "Max windows per row:" = "Max windows per row:"; +/* No comment provided by engineer. */ +"Menubar icon:" = "Menubar icon:"; + /* No comment provided by engineer. */ "Middle" = "Middle"; diff --git a/resources/l10n/ar.lproj/Localizable.strings b/resources/l10n/ar.lproj/Localizable.strings index 7149e103..b8814d1c 100644 --- a/resources/l10n/ar.lproj/Localizable.strings +++ b/resources/l10n/ar.lproj/Localizable.strings @@ -164,6 +164,9 @@ /*No comment provided by engineer.*/ "Max windows per row:" = "الحد الأعلى للنوافذ للصف:"; +/*No comment provided by engineer.*/ +"Menubar icon:" = "Menubar icon:"; + /*No comment provided by engineer.*/ "Middle" = "Middle"; diff --git a/resources/l10n/de.lproj/Localizable.strings b/resources/l10n/de.lproj/Localizable.strings index 9024c366..98bf2bf8 100644 --- a/resources/l10n/de.lproj/Localizable.strings +++ b/resources/l10n/de.lproj/Localizable.strings @@ -164,6 +164,9 @@ /*No comment provided by engineer.*/ "Max windows per row:" = "Maximale Anzahl von Fenstern pro Reihe:"; +/*No comment provided by engineer.*/ +"Menubar icon:" = "Menubar icon:"; + /*No comment provided by engineer.*/ "Middle" = "Mitte"; diff --git a/resources/l10n/en.lproj/Localizable.strings b/resources/l10n/en.lproj/Localizable.strings index 97643390..5d218bb3 100644 --- a/resources/l10n/en.lproj/Localizable.strings +++ b/resources/l10n/en.lproj/Localizable.strings @@ -164,6 +164,9 @@ /*No comment provided by engineer.*/ "Max windows per row:" = "Max windows per row:"; +/*No comment provided by engineer.*/ +"Menubar icon:" = "Menubar icon:"; + /*No comment provided by engineer.*/ "Middle" = "Middle"; diff --git a/resources/l10n/es.lproj/Localizable.strings b/resources/l10n/es.lproj/Localizable.strings index da96f6b4..83df2495 100644 --- a/resources/l10n/es.lproj/Localizable.strings +++ b/resources/l10n/es.lproj/Localizable.strings @@ -164,6 +164,9 @@ /*No comment provided by engineer.*/ "Max windows per row:" = "Ventanas máximas por fila:"; +/*No comment provided by engineer.*/ +"Menubar icon:" = "Menubar icon:"; + /*No comment provided by engineer.*/ "Middle" = "Middle"; diff --git a/resources/l10n/fi.lproj/Localizable.strings b/resources/l10n/fi.lproj/Localizable.strings index cc7c576d..6d574600 100644 --- a/resources/l10n/fi.lproj/Localizable.strings +++ b/resources/l10n/fi.lproj/Localizable.strings @@ -164,6 +164,9 @@ /*No comment provided by engineer.*/ "Max windows per row:" = "Enimmäismäärä ikkunoita rivillä:"; +/*No comment provided by engineer.*/ +"Menubar icon:" = "Menubar icon:"; + /*No comment provided by engineer.*/ "Middle" = "Middle"; diff --git a/resources/l10n/fr.lproj/Localizable.strings b/resources/l10n/fr.lproj/Localizable.strings index 241c63b3..21fe68cf 100644 --- a/resources/l10n/fr.lproj/Localizable.strings +++ b/resources/l10n/fr.lproj/Localizable.strings @@ -164,6 +164,9 @@ /*No comment provided by engineer.*/ "Max windows per row:" = "Max de fenêtres par ligne :"; +/*No comment provided by engineer.*/ +"Menubar icon:" = "Menubar icon:"; + /*No comment provided by engineer.*/ "Middle" = "Milieu"; diff --git a/resources/l10n/hu.lproj/Localizable.strings b/resources/l10n/hu.lproj/Localizable.strings index 3f4116e2..cfef894d 100644 --- a/resources/l10n/hu.lproj/Localizable.strings +++ b/resources/l10n/hu.lproj/Localizable.strings @@ -164,6 +164,9 @@ /*No comment provided by engineer.*/ "Max windows per row:" = "Legtöbb ablak soronként:"; +/*No comment provided by engineer.*/ +"Menubar icon:" = "Menubar icon:"; + /*No comment provided by engineer.*/ "Middle" = "Középre"; diff --git a/resources/l10n/id.lproj/Localizable.strings b/resources/l10n/id.lproj/Localizable.strings index f6c9a6a8..99f171d6 100644 --- a/resources/l10n/id.lproj/Localizable.strings +++ b/resources/l10n/id.lproj/Localizable.strings @@ -164,6 +164,9 @@ /*No comment provided by engineer.*/ "Max windows per row:" = "Jendela maks per baris:"; +/*No comment provided by engineer.*/ +"Menubar icon:" = "Menubar icon:"; + /*No comment provided by engineer.*/ "Middle" = "Tengah"; diff --git a/resources/l10n/it.lproj/Localizable.strings b/resources/l10n/it.lproj/Localizable.strings index 6256aa35..939de267 100644 --- a/resources/l10n/it.lproj/Localizable.strings +++ b/resources/l10n/it.lproj/Localizable.strings @@ -164,6 +164,9 @@ /*No comment provided by engineer.*/ "Max windows per row:" = "Massimo numero di finestre per riga:"; +/*No comment provided by engineer.*/ +"Menubar icon:" = "Menubar icon:"; + /*No comment provided by engineer.*/ "Middle" = "Middle"; diff --git a/resources/l10n/ja.lproj/Localizable.strings b/resources/l10n/ja.lproj/Localizable.strings index dc1b9c9f..7a2842f7 100644 --- a/resources/l10n/ja.lproj/Localizable.strings +++ b/resources/l10n/ja.lproj/Localizable.strings @@ -164,6 +164,9 @@ /*No comment provided by engineer.*/ "Max windows per row:" = "一列に最大表示可能な個数:"; +/*No comment provided by engineer.*/ +"Menubar icon:" = "Menubar icon:"; + /*No comment provided by engineer.*/ "Middle" = "Middle"; diff --git a/resources/l10n/ko.lproj/Localizable.strings b/resources/l10n/ko.lproj/Localizable.strings index 96a6bd11..026fe40b 100644 --- a/resources/l10n/ko.lproj/Localizable.strings +++ b/resources/l10n/ko.lproj/Localizable.strings @@ -164,6 +164,9 @@ /*No comment provided by engineer.*/ "Max windows per row:" = "한 줄당 최대 윈도우 개수:"; +/*No comment provided by engineer.*/ +"Menubar icon:" = "Menubar icon:"; + /*No comment provided by engineer.*/ "Middle" = "중간"; diff --git a/resources/l10n/lb.lproj/Localizable.strings b/resources/l10n/lb.lproj/Localizable.strings index 67fa1a4a..cace0bda 100644 --- a/resources/l10n/lb.lproj/Localizable.strings +++ b/resources/l10n/lb.lproj/Localizable.strings @@ -164,6 +164,9 @@ /*No comment provided by engineer.*/ "Max windows per row:" = "Max windows per row:"; +/*No comment provided by engineer.*/ +"Menubar icon:" = "Menubar icon:"; + /*No comment provided by engineer.*/ "Middle" = "Middle"; diff --git a/resources/l10n/nl.lproj/Localizable.strings b/resources/l10n/nl.lproj/Localizable.strings index 3937b42e..db54861e 100644 --- a/resources/l10n/nl.lproj/Localizable.strings +++ b/resources/l10n/nl.lproj/Localizable.strings @@ -164,6 +164,9 @@ /*No comment provided by engineer.*/ "Max windows per row:" = "Maximaal aantal vensters per rij:"; +/*No comment provided by engineer.*/ +"Menubar icon:" = "Menubar icon:"; + /*No comment provided by engineer.*/ "Middle" = "Middle"; diff --git a/resources/l10n/pt-BR.lproj/Localizable.strings b/resources/l10n/pt-BR.lproj/Localizable.strings index d3c85baf..f1345c40 100644 --- a/resources/l10n/pt-BR.lproj/Localizable.strings +++ b/resources/l10n/pt-BR.lproj/Localizable.strings @@ -164,6 +164,9 @@ /*No comment provided by engineer.*/ "Max windows per row:" = "Qtde máxima de janelas por linha:"; +/*No comment provided by engineer.*/ +"Menubar icon:" = "Menubar icon:"; + /*No comment provided by engineer.*/ "Middle" = "Middle"; diff --git a/resources/l10n/ru.lproj/Localizable.strings b/resources/l10n/ru.lproj/Localizable.strings index 69e989d3..778f1c86 100644 --- a/resources/l10n/ru.lproj/Localizable.strings +++ b/resources/l10n/ru.lproj/Localizable.strings @@ -164,6 +164,9 @@ /*No comment provided by engineer.*/ "Max windows per row:" = "Макс. количество окон в ряду:"; +/*No comment provided by engineer.*/ +"Menubar icon:" = "Menubar icon:"; + /*No comment provided by engineer.*/ "Middle" = "Посередине"; diff --git a/resources/l10n/tr.lproj/Localizable.strings b/resources/l10n/tr.lproj/Localizable.strings index 6a8b5069..42223845 100644 --- a/resources/l10n/tr.lproj/Localizable.strings +++ b/resources/l10n/tr.lproj/Localizable.strings @@ -164,6 +164,9 @@ /*No comment provided by engineer.*/ "Max windows per row:" = "Satır başına maksimum pencere sayısı:"; +/*No comment provided by engineer.*/ +"Menubar icon:" = "Menubar icon:"; + /*No comment provided by engineer.*/ "Middle" = "Middle"; diff --git a/resources/l10n/zh-CN.lproj/Localizable.strings b/resources/l10n/zh-CN.lproj/Localizable.strings index e558258f..38af9b88 100644 --- a/resources/l10n/zh-CN.lproj/Localizable.strings +++ b/resources/l10n/zh-CN.lproj/Localizable.strings @@ -164,6 +164,9 @@ /*No comment provided by engineer.*/ "Max windows per row:" = "每行最多窗口数:"; +/*No comment provided by engineer.*/ +"Menubar icon:" = "Menubar icon:"; + /*No comment provided by engineer.*/ "Middle" = "中间"; diff --git a/resources/l10n/zh-TW.lproj/Localizable.strings b/resources/l10n/zh-TW.lproj/Localizable.strings index 65b7ea26..9a9fecc2 100644 --- a/resources/l10n/zh-TW.lproj/Localizable.strings +++ b/resources/l10n/zh-TW.lproj/Localizable.strings @@ -164,6 +164,9 @@ /*No comment provided by engineer.*/ "Max windows per row:" = "每列最多顯示的視窗數:"; +/*No comment provided by engineer.*/ +"Menubar icon:" = "Menubar icon:"; + /*No comment provided by engineer.*/ "Middle" = "Middle"; diff --git a/src/logic/Preferences.swift b/src/logic/Preferences.swift index 75f9e4f4..494ca00d 100644 --- a/src/logic/Preferences.swift +++ b/src/logic/Preferences.swift @@ -48,7 +48,7 @@ class Preferences { "hideSpaceNumberLabels": "false", "hideStatusIcons": "false", "startAtLogin": "true", - "hideMenubarIcon": "false", + "menubarIcon": "0", "dontShowBlacklist": "", "disableShortcutsBlacklist": ["com.realvnc.vncviewer", "com.microsoft.rdc.macos", "com.teamviewer.TeamViewer", "org.virtualbox.app.VirtualBoxVM", "com.parallels.vm", "com.citrix.XenAppViewer"].joined(separator: "\n"), "disableShortcutsBlacklistOnlyFullscreen": "true", @@ -98,7 +98,6 @@ class Preferences { static var hideSpaceNumberLabels: Bool { defaults.bool("hideSpaceNumberLabels") } static var hideStatusIcons: Bool { defaults.bool("hideStatusIcons") } static var startAtLogin: Bool { defaults.bool("startAtLogin") } - static var hideMenubarIcon: Bool { defaults.bool("hideMenubarIcon") } static var dontShowBlacklist: [String] { blacklistStringToArray(defaults.string("dontShowBlacklist")) } static var disableShortcutsBlacklist: [String] { blacklistStringToArray(defaults.string("disableShortcutsBlacklist")) } static var disableShortcutsBlacklistOnlyFullscreen: Bool { defaults.bool("disableShortcutsBlacklistOnlyFullscreen") } @@ -114,6 +113,7 @@ class Preferences { static var spacesToShow: [SpacesToShowPreference] { ["spacesToShow", "spacesToShow2"].map { defaults.macroPref($0, SpacesToShowPreference.allCases) } } static var screensToShow: [ScreensToShowPreference] { ["screensToShow", "screensToShow2"].map { defaults.macroPref($0, ScreensToShowPreference.allCases) } } static var shortcutStyle: ShortcutStylePreference { defaults.macroPref("shortcutStyle", ShortcutStylePreference.allCases) } + static var menubarIcon: MenubarIconPreference { defaults.macroPref("menubarIcon", MenubarIconPreference.allCases) } // derived values static var cellBorderWidth: CGFloat { theme.themeParameters.cellBorderWidth } @@ -157,6 +157,13 @@ class Preferences { migrateDropdownMenuPreference("appsToShow", ["All apps": "0", "Active app": "1"]) migrateDropdownMenuPreference("spacesToShow", ["All spaces": "0", "Active space": "1"]) migrateDropdownMenuPreference("screensToShow", ["All screens": "0", "Screen showing AltTab": "1"]) + // the "Hide menubar icon" checkbox was replaced with a dropdown of: icon1, icon2, hidden + if let old = defaults.string(forKey: "hideMenubarIcon") { + if old == "true" { + defaults.set("2", forKey: "menubarIcon") + } + defaults.removeObject(forKey: "hideMenubarIcon") + } defaults.set(App.version, forKey: preferencesVersion) } @@ -209,6 +216,21 @@ struct ThemeParameters { typealias LocalizedString = String +enum MenubarIconPreference: CaseIterable, MacroPreference { + case outlined + case filled + case hidden + + var localizedString: LocalizedString { + switch self { + // these 3 spaces are different from each other; they have to be unique + case .outlined: return " " + case .filled: return " " + case .hidden: return " " + } + } +} + enum ShortcutStylePreference: CaseIterable, MacroPreference { case focusOnRelease case doNothingOnRelease diff --git a/src/ui/App.swift b/src/ui/App.swift index 9bfbaab8..098cbf8a 100644 --- a/src/ui/App.swift +++ b/src/ui/App.swift @@ -13,7 +13,6 @@ class App: AppCenterApplication, NSApplicationDelegate { static let licence = Bundle.main.object(forInfoDictionaryKey: "NSHumanReadableCopyright") as! String static let repository = "https://github.com/lwouis/alt-tab-macos" static var app: App! - static var statusItem: NSStatusItem! var thumbnailsPanel: ThumbnailsPanel! var preferencesWindowController: PreferencesWindowController! var feedbackWindow: FeedbackWindow? @@ -48,7 +47,7 @@ class App: AppCenterApplication, NSApplicationDelegate { BackgroundWork.start() Preferences.migratePreferences() Preferences.registerDefaults() - App.statusItem = Menubar.make() + Menubar.initialize() self.loadMainMenuXib() self.thumbnailsPanel = ThumbnailsPanel() Spaces.initialDiscovery() diff --git a/src/ui/Menubar.swift b/src/ui/Menubar.swift index 114c3c9c..c1614ba4 100644 --- a/src/ui/Menubar.swift +++ b/src/ui/Menubar.swift @@ -1,34 +1,48 @@ import Cocoa class Menubar { - static func make() -> NSStatusItem { - let item = NSStatusBar.system.statusItem(withLength: NSStatusItem.variableLength) - let image = NSImage(named: "menubar-icon") - image!.isTemplate = true - item.button!.image = image - item.button!.imageScaling = .scaleProportionallyUpOrDown - item.menu = NSMenu() - item.menu!.addItem( + static var statusItem: NSStatusItem! + + static func initialize() { + statusItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.variableLength) + statusItem.button!.imageScaling = .scaleProportionallyUpOrDown + statusItem.menu = NSMenu() + statusItem.menu!.addItem( withTitle: NSLocalizedString("Show", comment: "Menubar option"), action: #selector(App.app.showUi), keyEquivalent: "") - item.menu!.addItem( + statusItem.menu!.addItem( withTitle: NSLocalizedString("Preferences…", comment: "Menubar option"), action: #selector(App.app.showPreferencesPanel), keyEquivalent: ",") - item.menu!.addItem( + statusItem.menu!.addItem( withTitle: NSLocalizedString("Check for updates…", comment: "Menubar option"), action: #selector(App.app.checkForUpdatesNow), keyEquivalent: "") - item.menu!.addItem( + statusItem.menu!.addItem( withTitle: NSLocalizedString("Send feedback…", comment: "Menubar option"), action: #selector(App.app.showFeedbackPanel), keyEquivalent: "") - item.menu!.addItem(NSMenuItem.separator()) - item.menu!.addItem( + statusItem.menu!.addItem(NSMenuItem.separator()) + statusItem.menu!.addItem( withTitle: String(format: NSLocalizedString("Quit %@", comment: "Menubar option. %@ is AltTab"), App.name), action: #selector(NSApplication.terminate(_:)), keyEquivalent: "q") - return item + menubarIconCallback(nil) + } + + static func menubarIconCallback(_ sender: NSControl?) { + if Preferences.menubarIcon == .hidden { + statusItem.isVisible = false + } else { + loadPreferredIcon() + } + } + + static private func loadPreferredIcon() { + let image = NSImage(named: Preferences.menubarIcon == .outlined ? "menubar-icon-1" : "menubar-icon-2")! + image.isTemplate = true + statusItem.button!.image = image + statusItem.isVisible = true } } diff --git a/src/ui/preferences-window/LabelAndControl.swift b/src/ui/preferences-window/LabelAndControl.swift index 5d9672a6..b3f2f9be 100644 --- a/src/ui/preferences-window/LabelAndControl.swift +++ b/src/ui/preferences-window/LabelAndControl.swift @@ -34,8 +34,8 @@ class LabelAndControl: NSObject { return [textArea] } - static func makeLabelWithDropdown(_ labelText: String, _ rawName: String, _ values: [MacroPreference], _ suffixText: String? = nil) -> [NSView] { - return makeLabelWithProvidedControl(labelText, rawName, dropdown_(rawName, values), suffixText) + static func makeLabelWithDropdown(_ labelText: String, _ rawName: String, _ values: [MacroPreference], _ suffixText: String? = nil, extraAction: ActionClosure? = nil) -> [NSView] { + return makeLabelWithProvidedControl(labelText, rawName, dropdown_(rawName, values), suffixText, extraAction: extraAction) } static func dropdown_(_ rawName: String, _ macroPreferences: [MacroPreference]) -> NSPopUpButton { diff --git a/src/ui/preferences-window/tabs/GeneralTab.swift b/src/ui/preferences-window/tabs/GeneralTab.swift index 31714327..88c30abe 100644 --- a/src/ui/preferences-window/tabs/GeneralTab.swift +++ b/src/ui/preferences-window/tabs/GeneralTab.swift @@ -8,11 +8,21 @@ class GeneralTab: NSViewController, PreferencePane { override func loadView() { let startAtLogin = LabelAndControl.makeLabelWithCheckbox(NSLocalizedString("Start at login:", comment: ""), "startAtLogin", extraAction: startAtLoginCallback) - let hideMenubarIcon = LabelAndControl.makeLabelWithCheckbox(NSLocalizedString("Hide menubar icon:", comment: ""), "hideMenubarIcon", extraAction: hideMenubarIconCallback) + let menubarIcon = LabelAndControl.makeLabelWithDropdown(NSLocalizedString("Menubar icon:", comment: ""), "menubarIcon", MenubarIconPreference.allCases, extraAction: Menubar.menubarIconCallback) + let menubarIconDropdown = menubarIcon[1] as! NSPopUpButton + for i in 0...1 { + let image = NSImage(named: "menubar-icon-" + String(i + 1))! + image.isTemplate = true + menubarIconDropdown.item(at: i)!.image = image + } + let cell = menubarIconDropdown.cell! as! NSPopUpButtonCell + cell.bezelStyle = .regularSquare + cell.arrowPosition = .arrowAtBottom + cell.imagePosition = .imageOverlaps let grid = GridView([ startAtLogin, - hideMenubarIcon, + menubarIcon, ]) grid.column(at: 0).xPlacement = .trailing grid.fit() @@ -20,7 +30,6 @@ class GeneralTab: NSViewController, PreferencePane { setView(grid) startAtLoginCallback(startAtLogin[1] as! NSControl) - hideMenubarIconCallback(hideMenubarIcon[1] as! NSControl) } // adding/removing login item depending on the checkbox state @@ -40,8 +49,4 @@ class GeneralTab: NSViewController, PreferencePane { let _ = LSSharedFileListInsertItemURL(loginItems, kLSSharedFileListItemBeforeFirst.takeRetainedValue(), nil, nil, itemUrl, nil, nil).takeRetainedValue() } } - - private func hideMenubarIconCallback(_ sender: NSControl) { - App.statusItem.isVisible = (sender as! NSButton).state == .off - } }