From bf767efcdc8d5ccaf871d3ae589c83100ff02696 Mon Sep 17 00:00:00 2001 From: BrentBoyMeBob Date: Mon, 16 Oct 2023 11:09:44 -0700 Subject: [PATCH] feat: add preference option to change MiniSim icon feat: implement menu icons with enum plus accomodations --- MiniSim.xcodeproj/project.pbxproj | 4 +++ MiniSim/.DS_Store | Bin 6148 -> 0 bytes MiniSim/Assets.xcassets/.DS_Store | Bin 6148 -> 0 bytes .../box.imageset/Contents.json | 21 +++++++++++++ .../box.imageset/archivebox@2x.png | Bin 0 -> 636 bytes .../ipad.imageset/Contents.json | 21 +++++++++++++ .../ipad.imageset/ipad.landscape@2x.png | Bin 0 -> 570 bytes .../Contents.json | 2 +- .../iphone@2x.png} | Bin MiniSim/Extensions/MenuIcons.swift | 28 ++++++++++++++++++ .../UserDefaults+Configuration.swift | 6 ++++ MiniSim/MiniSim.swift | 15 ++++++---- MiniSim/Views/Preferences.swift | 23 ++++++++++++++ 13 files changed, 114 insertions(+), 6 deletions(-) delete mode 100644 MiniSim/.DS_Store delete mode 100644 MiniSim/Assets.xcassets/.DS_Store create mode 100644 MiniSim/Assets.xcassets/box.imageset/Contents.json create mode 100644 MiniSim/Assets.xcassets/box.imageset/archivebox@2x.png create mode 100644 MiniSim/Assets.xcassets/ipad.imageset/Contents.json create mode 100644 MiniSim/Assets.xcassets/ipad.imageset/ipad.landscape@2x.png rename MiniSim/Assets.xcassets/{menu_icon.imageset => iphone.imageset}/Contents.json (88%) rename MiniSim/Assets.xcassets/{menu_icon.imageset/menu_icon.png => iphone.imageset/iphone@2x.png} (100%) create mode 100644 MiniSim/Extensions/MenuIcons.swift diff --git a/MiniSim.xcodeproj/project.pbxproj b/MiniSim.xcodeproj/project.pbxproj index ea7a113..89d643a 100644 --- a/MiniSim.xcodeproj/project.pbxproj +++ b/MiniSim.xcodeproj/project.pbxproj @@ -75,6 +75,7 @@ 76AC9AF62A0EA82C00864A8B /* CustomCommands.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76AC9AF52A0EA82C00864A8B /* CustomCommands.swift */; }; 76AC9AF92A0EB50800864A8B /* SymbolPicker in Frameworks */ = {isa = PBXBuildFile; productRef = 76AC9AF82A0EB50800864A8B /* SymbolPicker */; }; 76B70F7E2B0D361A009D87A4 /* UserDefaultsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76B70F7D2B0D361A009D87A4 /* UserDefaultsTests.swift */; }; + 76C1396A2C849A3F006CD80C /* MenuIcons.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76C139692C849A3F006CD80C /* MenuIcons.swift */; }; 76E4451229D4391000039025 /* Onboarding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76E4451129D4391000039025 /* Onboarding.swift */; }; 76E4451429D4403F00039025 /* NSNotificationName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76E4451329D4403F00039025 /* NSNotificationName.swift */; }; 76F04A11298A5AE000BF9CA3 /* ADB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76F04A10298A5AE000BF9CA3 /* ADB.swift */; }; @@ -165,6 +166,7 @@ 76AC9AF52A0EA82C00864A8B /* CustomCommands.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomCommands.swift; sourceTree = ""; }; 76B70F742B0D359D009D87A4 /* MiniSimTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MiniSimTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 76B70F7D2B0D361A009D87A4 /* UserDefaultsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserDefaultsTests.swift; sourceTree = ""; }; + 76C139692C849A3F006CD80C /* MenuIcons.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MenuIcons.swift; sourceTree = ""; }; 76E4451129D4391000039025 /* Onboarding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Onboarding.swift; sourceTree = ""; }; 76E4451329D4403F00039025 /* NSNotificationName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSNotificationName.swift; sourceTree = ""; }; 76F04A10298A5AE000BF9CA3 /* ADB.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ADB.swift; sourceTree = ""; }; @@ -225,6 +227,7 @@ 762CF1E12981DDD400099999 /* Extensions */ = { isa = PBXGroup; children = ( + 76C139692C849A3F006CD80C /* MenuIcons.swift */, 762CF1DF2981968F00099999 /* String+match.swift */, 7645D5022983186100019227 /* NSMenuItem+ImageInit.swift */, 7630B26C2986B4FD00D8B57D /* KeyboardShortcuts.swift */, @@ -629,6 +632,7 @@ 7630B26D2986B4FD00D8B57D /* KeyboardShortcuts.swift in Sources */, 76059BF52AD4361C0008D38B /* SetupPreferences.swift in Sources */, 7684FAAF29D202F500230BB0 /* AndroidHomeError.swift in Sources */, + 76C1396A2C849A3F006CD80C /* MenuIcons.swift in Sources */, 55CDB0782B1B6D24002418D7 /* TerminalApps.swift in Sources */, 7645D4BE2982A1B100019227 /* DeviceService.swift in Sources */, 765ABF382A8BECD900A063CB /* ExecuteCommand.swift in Sources */, diff --git a/MiniSim/.DS_Store b/MiniSim/.DS_Store deleted file mode 100644 index ac0456cc77d8d0fa378a3287bb25e1bd027784f9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKJ5EC}5S)b+ktj$>=@TGv0}~}D$OV9eE>emI66LEn7e{0EBc!JXRYVibO6#%L zJGMN<+qVF0{eE}=RsfcCM|}D)H{W-k*;Pf1Naq=E7;ujd?D0Iy{ypH_TRf6C;B~_P zi5!Og@#SA)nZuE8E=)>3&+Hy!>akPy4k8jvACV*w@8QeM2%8F z3QQHa&gIJM|Cato|34*ZB?Y9wMJZs5&2F>ild87P9_O{T(Vys^^F?>#JSZHZ9227) hbK&LqE|M~@`JDT`a7+w3<3T6tXTWulNrC@X;2UNu7f=8I diff --git a/MiniSim/Assets.xcassets/.DS_Store b/MiniSim/Assets.xcassets/.DS_Store deleted file mode 100644 index ebde57b8f3a9bc1e51f3bb2065a8c46178f21ae7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKyH3ME5S)b+k!T_+%KHK&{=h_`pymgFgaRqTmJ)hbd>5a_>_bSFgG57vW~JS^ z+uJ$IQ+T}qZ2i8w0agH(bVq!6n46!w&+M!+Mx^tOEqc7+8c!Hz)u$8Ay~Hi+2i#Bi z172%?zzdGM!*>7N_xsb=C@Te|fE17dQa}p)QUUM1wB<#jq7;w zEy`hCqM{U#0#gOfbG!2Xe@Fje{-2VxlLAuUUnyXV&BJERSE}ARdpYm5js8gYnoqhL p*Fj;3c1(t0>C4=4+mJg=1pSnGZTqKLf6dObYz90$&ch7(W02 diff --git a/MiniSim/Assets.xcassets/box.imageset/Contents.json b/MiniSim/Assets.xcassets/box.imageset/Contents.json new file mode 100644 index 0000000..d0d8cc5 --- /dev/null +++ b/MiniSim/Assets.xcassets/box.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "archivebox@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MiniSim/Assets.xcassets/box.imageset/archivebox@2x.png b/MiniSim/Assets.xcassets/box.imageset/archivebox@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..90151e907322a7ac6790292951863741d29510d9 GIT binary patch literal 636 zcmeAS@N?(olHy`uVBq!ia0vp^>Oic*!3HF`%#~*YDaPU;cPEB*=VV?2IWDOYo@u_m z3|c@o2Loe!CIbsd2@p#GF#`kh0!9XAAk7F8TfhXDRbRjiXRCk|R!-Sb0aW(P)5S3) zg7fW+-TE$p0>{eta$n2}krEVQ72M+Dyj-Zi&24F5=YI#MjFL|PXEfHroBMACH5MVVfz8kCY{xnkJPh-=0^TM5q$UE zn|Z}+)5CVIDOx95(0lsZo&D?Q>rp zb?Wac$vU5V%3AF>p0rzXO{{#n*888Yk>&XkrQaLVo6gzVGQ|G7a9MQguDNI3lwPlW zA^9fv^mF6u8_t+_Zod0rbP0l+XkK`MCx9 literal 0 HcmV?d00001 diff --git a/MiniSim/Assets.xcassets/ipad.imageset/Contents.json b/MiniSim/Assets.xcassets/ipad.imageset/Contents.json new file mode 100644 index 0000000..85e006c --- /dev/null +++ b/MiniSim/Assets.xcassets/ipad.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ipad.landscape@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MiniSim/Assets.xcassets/ipad.imageset/ipad.landscape@2x.png b/MiniSim/Assets.xcassets/ipad.imageset/ipad.landscape@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..f1ebaf595fc69b4a0a7ccb3e3e5044a304ae51e8 GIT binary patch literal 570 zcmeAS@N?(olHy`uVBq!ia0vp^dO)ng!3HG1DRBe>DaPU;cPEB*=VV?2IWDOYo@u_m z3|c@o2Loe!CIbsd2@p#GF#`kh0!9XAAk7F8TfhXD)my*}XRCk|N+{VZ1u9$O>Eaj? z!TENEuePhB%(3^Pr(Rz>6tpRD(}k@cHhmSCS9@lYHj@eT>Y`)dBy9F?vMF(jp4HDjE1<3cB4N_?S4M?FJL{s zfiFGavd-r8fW$L<9_0%f@fOuK&fwjB@7~9#%x9aJbQM-6h<}O5Q)DYmP7+C5aB{<{ z@*hmU9B(zA%@MnwD&_t8*tMkw+^c(#s}d$~^X^M{Jw9!lnuFi!FWbs9AV^LDSTwN19z7pUNM(f1#=KoBaRCxQ$XSUL5C6~9opAjCvU+?nrukmI-)_mK3wYNvU(KOCf zTfN7w|HGXt;<8pZHKbN{ALTk@>G~-~ifwOxp0@e3pX_nR6)!V|o1RTJ)5)*ed+kAc t+m9`bS=Ot6N}l$$dGu6hTLOzwEn^|m&vVKdJ550G=IQF^vd$@?2>^4X Bool {