Skip to content

Commit

Permalink
Have Theme Take Priority
Browse files Browse the repository at this point in the history
  • Loading branch information
rcmaehl committed Jul 11, 2021
1 parent 1843260 commit 5252e01
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ WhyNot.txt
WhyNotWin11_stripped.au3
del.au3
Config/config.st
theme.def
9 changes: 5 additions & 4 deletions ExampleTheme.def
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#Rename file to theme.def
[Colors]
Background=
Text=
Sidebar=
Footer=
Background=0xFFFFFF
Text=0x000000
Sidebar=0xF7A8B8
Footer=0x55CDFC
10 changes: 5 additions & 5 deletions includes/_Theming.au3
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ Func _SetTheme()
$aColors[3] = 0xF2F2F2 ; Footer

Select
Case FileExists(@ScriptDir & "\theme.def")
$aColors[0] = IniRead(@ScriptDir & "\theme.def", "Colors", "Background", $aColors[0])
$aColors[1] = IniRead(@ScriptDir & "\theme.def", "Colors", "Text", $aColors[1])
$aColors[2] = IniRead(@ScriptDir & "\theme.def", "Colors", "Sidebar", $aColors[2])
$aColors[3] = IniRead(@ScriptDir & "\theme.def", "Colors", "Footer", $aColors[3])
Case $dWindow = 0x000000
ContinueCase
Case $dWindow = 0xFFFFFF And Not $bLTheme
Expand All @@ -118,11 +123,6 @@ Func _SetTheme()
$aColors[3] = $dWindow + 0xF2F2F3
Case $bLTheme
;;;
Case FileExists(@ScriptDir & "\theme.def")
$aColors[0] = IniRead(@ScriptDir & "\theme.def", "Colors", "Background", $aColors[0])
$aColors[1] = IniRead(@ScriptDir & "\theme.def", "Colors", "Text", $aColors[1])
$aColors[2] = IniRead(@ScriptDir & "\theme.def", "Colors", "Sidebar", $aColors[2])
$aColors[3] = IniRead(@ScriptDir & "\theme.def", "Colors", "Footer", $aColors[3])
Case Else
;;;
EndSelect
Expand Down

0 comments on commit 5252e01

Please sign in to comment.