Skip to content

Commit 5252e01

Browse files
committed
Have Theme Take Priority
1 parent 1843260 commit 5252e01

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ WhyNot.txt
33
WhyNotWin11_stripped.au3
44
del.au3
55
Config/config.st
6+
theme.def

ExampleTheme.def

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
#Rename file to theme.def
12
[Colors]
2-
Background=
3-
Text=
4-
Sidebar=
5-
Footer=
3+
Background=0xFFFFFF
4+
Text=0x000000
5+
Sidebar=0xF7A8B8
6+
Footer=0x55CDFC

includes/_Theming.au3

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,11 @@ Func _SetTheme()
104104
$aColors[3] = 0xF2F2F2 ; Footer
105105

106106
Select
107+
Case FileExists(@ScriptDir & "\theme.def")
108+
$aColors[0] = IniRead(@ScriptDir & "\theme.def", "Colors", "Background", $aColors[0])
109+
$aColors[1] = IniRead(@ScriptDir & "\theme.def", "Colors", "Text", $aColors[1])
110+
$aColors[2] = IniRead(@ScriptDir & "\theme.def", "Colors", "Sidebar", $aColors[2])
111+
$aColors[3] = IniRead(@ScriptDir & "\theme.def", "Colors", "Footer", $aColors[3])
107112
Case $dWindow = 0x000000
108113
ContinueCase
109114
Case $dWindow = 0xFFFFFF And Not $bLTheme
@@ -118,11 +123,6 @@ Func _SetTheme()
118123
$aColors[3] = $dWindow + 0xF2F2F3
119124
Case $bLTheme
120125
;;;
121-
Case FileExists(@ScriptDir & "\theme.def")
122-
$aColors[0] = IniRead(@ScriptDir & "\theme.def", "Colors", "Background", $aColors[0])
123-
$aColors[1] = IniRead(@ScriptDir & "\theme.def", "Colors", "Text", $aColors[1])
124-
$aColors[2] = IniRead(@ScriptDir & "\theme.def", "Colors", "Sidebar", $aColors[2])
125-
$aColors[3] = IniRead(@ScriptDir & "\theme.def", "Colors", "Footer", $aColors[3])
126126
Case Else
127127
;;;
128128
EndSelect

0 commit comments

Comments
 (0)