Skip to content

Commit 6361a88

Browse files
Refactored how themes are stored and loaded (#1601)
* Pulling themes from app bundle without needing to copy them and the users themes folder. Corrected some theme colors to sRGB color space. * Resolved SwiftLint errors * Capitalized themes folder in application support. * Update CodeEdit/Features/Settings/Pages/ThemeSettings/Models/ThemeModel.swift
1 parent 6ce81ec commit 6361a88

21 files changed

Lines changed: 344 additions & 437 deletions

CodeEdit.xcodeproj/project.pbxproj

Lines changed: 4 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -449,24 +449,6 @@
449449
B6C6A42A297716A500A3D28F /* EditorTabCloseButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6C6A429297716A500A3D28F /* EditorTabCloseButton.swift */; };
450450
B6C6A42E29771A8D00A3D28F /* EditorTabButtonStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6C6A42D29771A8D00A3D28F /* EditorTabButtonStyle.swift */; };
451451
B6C6A43029771F7100A3D28F /* EditorTabBackground.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6C6A42F29771F7100A3D28F /* EditorTabBackground.swift */; };
452-
B6D26E6C2B686DE300B4C14F /* High Contrast (Light).cetheme in Resources */ = {isa = PBXBuildFile; fileRef = B6D26E5A2B686DE200B4C14F /* High Contrast (Light).cetheme */; };
453-
B6D26E6D2B686DE300B4C14F /* Presentation (Light).cetheme in Resources */ = {isa = PBXBuildFile; fileRef = B6D26E5B2B686DE200B4C14F /* Presentation (Light).cetheme */; };
454-
B6D26E6E2B686DE300B4C14F /* Solarized (Light).cetheme in Resources */ = {isa = PBXBuildFile; fileRef = B6D26E5C2B686DE200B4C14F /* Solarized (Light).cetheme */; };
455-
B6D26E6F2B686DE300B4C14F /* Classic (Dark).cetheme in Resources */ = {isa = PBXBuildFile; fileRef = B6D26E5D2B686DE200B4C14F /* Classic (Dark).cetheme */; };
456-
B6D26E702B686DE300B4C14F /* Midnight.cetheme in Resources */ = {isa = PBXBuildFile; fileRef = B6D26E5E2B686DE200B4C14F /* Midnight.cetheme */; };
457-
B6D26E712B686DE300B4C14F /* GitHub (Dark).cetheme in Resources */ = {isa = PBXBuildFile; fileRef = B6D26E5F2B686DE200B4C14F /* GitHub (Dark).cetheme */; };
458-
B6D26E722B686DE300B4C14F /* Dusk.cetheme in Resources */ = {isa = PBXBuildFile; fileRef = B6D26E602B686DE200B4C14F /* Dusk.cetheme */; };
459-
B6D26E732B686DE300B4C14F /* Classic (Light).cetheme in Resources */ = {isa = PBXBuildFile; fileRef = B6D26E612B686DE200B4C14F /* Classic (Light).cetheme */; };
460-
B6D26E742B686DE300B4C14F /* Presentation (Dark).cetheme in Resources */ = {isa = PBXBuildFile; fileRef = B6D26E622B686DE200B4C14F /* Presentation (Dark).cetheme */; };
461-
B6D26E752B686DE300B4C14F /* Default (Dark).cetheme in Resources */ = {isa = PBXBuildFile; fileRef = B6D26E632B686DE300B4C14F /* Default (Dark).cetheme */; };
462-
B6D26E762B686DE300B4C14F /* Low Key.cetheme in Resources */ = {isa = PBXBuildFile; fileRef = B6D26E642B686DE300B4C14F /* Low Key.cetheme */; };
463-
B6D26E772B686DE300B4C14F /* High Contrast (Dark).cetheme in Resources */ = {isa = PBXBuildFile; fileRef = B6D26E652B686DE300B4C14F /* High Contrast (Dark).cetheme */; };
464-
B6D26E782B686DE300B4C14F /* GitHub (Light).cetheme in Resources */ = {isa = PBXBuildFile; fileRef = B6D26E662B686DE300B4C14F /* GitHub (Light).cetheme */; };
465-
B6D26E792B686DE300B4C14F /* Basic.cetheme in Resources */ = {isa = PBXBuildFile; fileRef = B6D26E672B686DE300B4C14F /* Basic.cetheme */; };
466-
B6D26E7A2B686DE300B4C14F /* Sunset.cetheme in Resources */ = {isa = PBXBuildFile; fileRef = B6D26E682B686DE300B4C14F /* Sunset.cetheme */; };
467-
B6D26E7B2B686DE300B4C14F /* Default (Light).cetheme in Resources */ = {isa = PBXBuildFile; fileRef = B6D26E692B686DE300B4C14F /* Default (Light).cetheme */; };
468-
B6D26E7C2B686DE300B4C14F /* Civic.cetheme in Resources */ = {isa = PBXBuildFile; fileRef = B6D26E6A2B686DE300B4C14F /* Civic.cetheme */; };
469-
B6D26E7D2B686DE300B4C14F /* Solarized (Dark).cetheme in Resources */ = {isa = PBXBuildFile; fileRef = B6D26E6B2B686DE300B4C14F /* Solarized (Dark).cetheme */; };
470452
B6D7EA592971078500301FAC /* InspectorSection.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6D7EA582971078500301FAC /* InspectorSection.swift */; };
471453
B6D7EA5C297107DD00301FAC /* InspectorField.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6D7EA5B297107DD00301FAC /* InspectorField.swift */; };
472454
B6E41C7029DD157F0088F9F4 /* AccountsSettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6E41C6F29DD157F0088F9F4 /* AccountsSettingsView.swift */; };
@@ -491,6 +473,7 @@
491473
B6F0517929D9E3C900D72287 /* SourceControlGitView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6F0517829D9E3C900D72287 /* SourceControlGitView.swift */; };
492474
B6F0517B29D9E46400D72287 /* SourceControlSettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6F0517A29D9E46400D72287 /* SourceControlSettingsView.swift */; };
493475
B6F0517D29D9E4B100D72287 /* TerminalSettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6F0517C29D9E4B100D72287 /* TerminalSettingsView.swift */; };
476+
B6FF04782B6C08AC002C2C78 /* DefaultThemes in Resources */ = {isa = PBXBuildFile; fileRef = B6FF04772B6C08AC002C2C78 /* DefaultThemes */; };
494477
D7012EE827E757850001E1EF /* FindNavigatorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7012EE727E757850001E1EF /* FindNavigatorView.swift */; };
495478
D7211D4327E066CE008F2ED7 /* Localized+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7211D4227E066CE008F2ED7 /* Localized+Ex.swift */; };
496479
D7211D4727E06BFE008F2ED7 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = D7211D4927E06BFE008F2ED7 /* Localizable.strings */; };
@@ -997,24 +980,6 @@
997980
B6C6A429297716A500A3D28F /* EditorTabCloseButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditorTabCloseButton.swift; sourceTree = "<group>"; };
998981
B6C6A42D29771A8D00A3D28F /* EditorTabButtonStyle.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EditorTabButtonStyle.swift; sourceTree = "<group>"; };
999982
B6C6A42F29771F7100A3D28F /* EditorTabBackground.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditorTabBackground.swift; sourceTree = "<group>"; };
1000-
B6D26E5A2B686DE200B4C14F /* High Contrast (Light).cetheme */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "High Contrast (Light).cetheme"; sourceTree = "<group>"; };
1001-
B6D26E5B2B686DE200B4C14F /* Presentation (Light).cetheme */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "Presentation (Light).cetheme"; sourceTree = "<group>"; };
1002-
B6D26E5C2B686DE200B4C14F /* Solarized (Light).cetheme */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "Solarized (Light).cetheme"; sourceTree = "<group>"; };
1003-
B6D26E5D2B686DE200B4C14F /* Classic (Dark).cetheme */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "Classic (Dark).cetheme"; sourceTree = "<group>"; };
1004-
B6D26E5E2B686DE200B4C14F /* Midnight.cetheme */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Midnight.cetheme; sourceTree = "<group>"; };
1005-
B6D26E5F2B686DE200B4C14F /* GitHub (Dark).cetheme */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "GitHub (Dark).cetheme"; sourceTree = "<group>"; };
1006-
B6D26E602B686DE200B4C14F /* Dusk.cetheme */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Dusk.cetheme; sourceTree = "<group>"; };
1007-
B6D26E612B686DE200B4C14F /* Classic (Light).cetheme */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "Classic (Light).cetheme"; sourceTree = "<group>"; };
1008-
B6D26E622B686DE200B4C14F /* Presentation (Dark).cetheme */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "Presentation (Dark).cetheme"; sourceTree = "<group>"; };
1009-
B6D26E632B686DE300B4C14F /* Default (Dark).cetheme */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "Default (Dark).cetheme"; sourceTree = "<group>"; };
1010-
B6D26E642B686DE300B4C14F /* Low Key.cetheme */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "Low Key.cetheme"; sourceTree = "<group>"; };
1011-
B6D26E652B686DE300B4C14F /* High Contrast (Dark).cetheme */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "High Contrast (Dark).cetheme"; sourceTree = "<group>"; };
1012-
B6D26E662B686DE300B4C14F /* GitHub (Light).cetheme */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "GitHub (Light).cetheme"; sourceTree = "<group>"; };
1013-
B6D26E672B686DE300B4C14F /* Basic.cetheme */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Basic.cetheme; sourceTree = "<group>"; };
1014-
B6D26E682B686DE300B4C14F /* Sunset.cetheme */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Sunset.cetheme; sourceTree = "<group>"; };
1015-
B6D26E692B686DE300B4C14F /* Default (Light).cetheme */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "Default (Light).cetheme"; sourceTree = "<group>"; };
1016-
B6D26E6A2B686DE300B4C14F /* Civic.cetheme */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Civic.cetheme; sourceTree = "<group>"; };
1017-
B6D26E6B2B686DE300B4C14F /* Solarized (Dark).cetheme */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "Solarized (Dark).cetheme"; sourceTree = "<group>"; };
1018983
B6D7EA582971078500301FAC /* InspectorSection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InspectorSection.swift; sourceTree = "<group>"; };
1019984
B6D7EA5B297107DD00301FAC /* InspectorField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InspectorField.swift; sourceTree = "<group>"; };
1020985
B6E41C6F29DD157F0088F9F4 /* AccountsSettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountsSettingsView.swift; sourceTree = "<group>"; };
@@ -1039,6 +1004,7 @@
10391004
B6F0517829D9E3C900D72287 /* SourceControlGitView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SourceControlGitView.swift; sourceTree = "<group>"; };
10401005
B6F0517A29D9E46400D72287 /* SourceControlSettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SourceControlSettingsView.swift; sourceTree = "<group>"; };
10411006
B6F0517C29D9E4B100D72287 /* TerminalSettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TerminalSettingsView.swift; sourceTree = "<group>"; };
1007+
B6FF04772B6C08AC002C2C78 /* DefaultThemes */ = {isa = PBXFileReference; lastKnownFileType = folder; path = DefaultThemes; sourceTree = "<group>"; };
10421008
D7012EE727E757850001E1EF /* FindNavigatorView.swift */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.swift; path = FindNavigatorView.swift; sourceTree = "<group>"; tabWidth = 4; };
10431009
D7211D4227E066CE008F2ED7 /* Localized+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Localized+Ex.swift"; sourceTree = "<group>"; };
10441010
D7211D4827E06BFE008F2ED7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
@@ -1200,31 +1166,6 @@
12001166
path = Configs;
12011167
sourceTree = "<group>";
12021168
};
1203-
28069DA527F5BD320016BC47 /* DefaultThemes */ = {
1204-
isa = PBXGroup;
1205-
children = (
1206-
B6D26E672B686DE300B4C14F /* Basic.cetheme */,
1207-
B6D26E6A2B686DE300B4C14F /* Civic.cetheme */,
1208-
B6D26E5D2B686DE200B4C14F /* Classic (Dark).cetheme */,
1209-
B6D26E612B686DE200B4C14F /* Classic (Light).cetheme */,
1210-
B6D26E632B686DE300B4C14F /* Default (Dark).cetheme */,
1211-
B6D26E692B686DE300B4C14F /* Default (Light).cetheme */,
1212-
B6D26E602B686DE200B4C14F /* Dusk.cetheme */,
1213-
B6D26E5F2B686DE200B4C14F /* GitHub (Dark).cetheme */,
1214-
B6D26E662B686DE300B4C14F /* GitHub (Light).cetheme */,
1215-
B6D26E652B686DE300B4C14F /* High Contrast (Dark).cetheme */,
1216-
B6D26E5A2B686DE200B4C14F /* High Contrast (Light).cetheme */,
1217-
B6D26E642B686DE300B4C14F /* Low Key.cetheme */,
1218-
B6D26E5E2B686DE200B4C14F /* Midnight.cetheme */,
1219-
B6D26E622B686DE200B4C14F /* Presentation (Dark).cetheme */,
1220-
B6D26E5B2B686DE200B4C14F /* Presentation (Light).cetheme */,
1221-
B6D26E6B2B686DE300B4C14F /* Solarized (Dark).cetheme */,
1222-
B6D26E5C2B686DE200B4C14F /* Solarized (Light).cetheme */,
1223-
B6D26E682B686DE300B4C14F /* Sunset.cetheme */,
1224-
);
1225-
path = DefaultThemes;
1226-
sourceTree = "<group>";
1227-
};
12281169
2806E8FE2979587A000040F4 /* Model */ = {
12291170
isa = PBXGroup;
12301171
children = (
@@ -2610,6 +2551,7 @@
26102551
B658FB2E27DA9E0F00EA4DBD /* CodeEdit */,
26112552
587B60F329340A8000D5CD8F /* CodeEditTests */,
26122553
28052E0129730F2F00F4F90A /* Configs */,
2554+
B6FF04772B6C08AC002C2C78 /* DefaultThemes */,
26132555
58F2EACE292FB2B0004A9BDE /* Documentation.docc */,
26142556
2BE487ED28245162003F3F64 /* OpenWithCodeEdit */,
26152557
284DC8502978BA2600BF2770 /* .all-contributorsrc */,
@@ -2635,7 +2577,6 @@
26352577
B658FB2E27DA9E0F00EA4DBD /* CodeEdit */ = {
26362578
isa = PBXGroup;
26372579
children = (
2638-
28069DA527F5BD320016BC47 /* DefaultThemes */,
26392580
5831E3C52933E6CB00D5A6D2 /* Features */,
26402581
D7211D4427E066D4008F2ED7 /* Localization */,
26412582
B658FB3527DA9E1000EA4DBD /* Preview Content */,
@@ -3155,32 +3096,15 @@
31553096
isa = PBXResourcesBuildPhase;
31563097
buildActionMask = 2147483647;
31573098
files = (
3158-
B6D26E732B686DE300B4C14F /* Classic (Light).cetheme in Resources */,
3159-
B6D26E6F2B686DE300B4C14F /* Classic (Dark).cetheme in Resources */,
3160-
B6D26E712B686DE300B4C14F /* GitHub (Dark).cetheme in Resources */,
3161-
B6D26E752B686DE300B4C14F /* Default (Dark).cetheme in Resources */,
3162-
B6D26E792B686DE300B4C14F /* Basic.cetheme in Resources */,
3163-
B6D26E7B2B686DE300B4C14F /* Default (Light).cetheme in Resources */,
3164-
B6D26E7D2B686DE300B4C14F /* Solarized (Dark).cetheme in Resources */,
3165-
B6D26E6E2B686DE300B4C14F /* Solarized (Light).cetheme in Resources */,
3099+
B6FF04782B6C08AC002C2C78 /* DefaultThemes in Resources */,
31663100
283BDCBD2972EEBD002AFF81 /* Package.resolved in Resources */,
3167-
B6D26E6C2B686DE300B4C14F /* High Contrast (Light).cetheme in Resources */,
31683101
B658FB3727DA9E1000EA4DBD /* Preview Assets.xcassets in Resources */,
31693102
3E0196732A3921AC002648D8 /* codeedit_shell_integration.zsh in Resources */,
3170-
B6D26E6D2B686DE300B4C14F /* Presentation (Light).cetheme in Resources */,
3171-
B6D26E742B686DE300B4C14F /* Presentation (Dark).cetheme in Resources */,
3172-
B6D26E702B686DE300B4C14F /* Midnight.cetheme in Resources */,
31733103
58A5DFA529339F6400D1BD5D /* default_keybindings.json in Resources */,
3174-
B6D26E782B686DE300B4C14F /* GitHub (Light).cetheme in Resources */,
31753104
3E01967A2A392B45002648D8 /* codeedit_shell_integration.bash in Resources */,
31763105
D7211D4727E06BFE008F2ED7 /* Localizable.strings in Resources */,
3177-
B6D26E7A2B686DE300B4C14F /* Sunset.cetheme in Resources */,
3178-
B6D26E762B686DE300B4C14F /* Low Key.cetheme in Resources */,
3179-
B6D26E7C2B686DE300B4C14F /* Civic.cetheme in Resources */,
3180-
B6D26E722B686DE300B4C14F /* Dusk.cetheme in Resources */,
31813106
284DC8512978BA2600BF2770 /* .all-contributorsrc in Resources */,
31823107
B658FB3427DA9E1000EA4DBD /* Assets.xcassets in Resources */,
3183-
B6D26E772B686DE300B4C14F /* High Contrast (Dark).cetheme in Resources */,
31843108
6C6BD6FC29CD152400235D17 /* codeedit.extension.appextensionpoint in Resources */,
31853109
);
31863110
runOnlyForDeploymentPostprocessing = 0;

0 commit comments

Comments
 (0)