Skip to content

Commit

Permalink
experiment
Browse files Browse the repository at this point in the history
  • Loading branch information
Pololot64 committed Dec 27, 2022
1 parent 9e4ddda commit 3ca938c
Show file tree
Hide file tree
Showing 267 changed files with 3,750 additions and 128 deletions.
87 changes: 87 additions & 0 deletions azure.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Copyright © 2021 rdbende <rdbende@gmail.com>

source [file join [file dirname [info script]] theme light.tcl]
source [file join [file dirname [info script]] theme dark.tcl]

option add *tearOff 0

proc set_theme {mode} {
if {$mode == "dark"} {
ttk::style theme use "azure-dark"

array set colors {
-fg "#ffffff"
-bg "#333333"
-disabledfg "#ffffff"
-disabledbg "#737373"
-selectfg "#ffffff"
-selectbg "#007fff"
}

ttk::style configure . \
-background $colors(-bg) \
-foreground $colors(-fg) \
-troughcolor $colors(-bg) \
-focuscolor $colors(-selectbg) \
-selectbackground $colors(-selectbg) \
-selectforeground $colors(-selectfg) \
-insertcolor $colors(-fg) \
-insertwidth 1 \
-fieldbackground $colors(-selectbg) \
-font {"Segoe Ui" 10} \
-borderwidth 1 \
-relief flat

tk_setPalette background [ttk::style lookup . -background] \
foreground [ttk::style lookup . -foreground] \
highlightColor [ttk::style lookup . -focuscolor] \
selectBackground [ttk::style lookup . -selectbackground] \
selectForeground [ttk::style lookup . -selectforeground] \
activeBackground [ttk::style lookup . -selectbackground] \
activeForeground [ttk::style lookup . -selectforeground]

ttk::style map . -foreground [list disabled $colors(-disabledfg)]

option add *font [ttk::style lookup . -font]
option add *Menu.selectcolor $colors(-fg)

} elseif {$mode == "light"} {
ttk::style theme use "azure-light"

array set colors {
-fg "#000000"
-bg "#ffffff"
-disabledfg "#737373"
-disabledbg "#ffffff"
-selectfg "#ffffff"
-selectbg "#007fff"
}

ttk::style configure . \
-background $colors(-bg) \
-foreground $colors(-fg) \
-troughcolor $colors(-bg) \
-focuscolor $colors(-selectbg) \
-selectbackground $colors(-selectbg) \
-selectforeground $colors(-selectfg) \
-insertcolor $colors(-fg) \
-insertwidth 1 \
-fieldbackground $colors(-selectbg) \
-font {"Segoe Ui" 10} \
-borderwidth 1 \
-relief flat

tk_setPalette background [ttk::style lookup . -background] \
foreground [ttk::style lookup . -foreground] \
highlightColor [ttk::style lookup . -focuscolor] \
selectBackground [ttk::style lookup . -selectbackground] \
selectForeground [ttk::style lookup . -selectforeground] \
activeBackground [ttk::style lookup . -selectbackground] \
activeForeground [ttk::style lookup . -selectforeground]

ttk::style map . -foreground [list disabled $colors(-disabledfg)]

option add *font [ttk::style lookup . -font]
option add *Menu.selectcolor $colors(-fg)
}
}
87 changes: 87 additions & 0 deletions azure_png.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Copyright © 2021 rdbende <rdbende@gmail.com>

source [file join [file dirname [info script]] theme light.tcl]
source [file join [file dirname [info script]] theme dark.tcl]

option add *tearOff 0

proc set_theme {mode} {
if {$mode == "dark"} {
ttk::style theme use "azure-dark"

array set colors {
-fg "#ffffff"
-bg "#333333"
-disabledfg "#ffffff"
-disabledbg "#737373"
-selectfg "#ffffff"
-selectbg "#007fff"
}

ttk::style configure . \
-background $colors(-bg) \
-foreground $colors(-fg) \
-troughcolor $colors(-bg) \
-focuscolor $colors(-selectbg) \
-selectbackground $colors(-selectbg) \
-selectforeground $colors(-selectfg) \
-insertcolor $colors(-fg) \
-insertwidth 1 \
-fieldbackground $colors(-selectbg) \
-font {"Segoe Ui" 10} \
-borderwidth 1 \
-relief flat

tk_setPalette background [ttk::style lookup . -background] \
foreground [ttk::style lookup . -foreground] \
highlightColor [ttk::style lookup . -focuscolor] \
selectBackground [ttk::style lookup . -selectbackground] \
selectForeground [ttk::style lookup . -selectforeground] \
activeBackground [ttk::style lookup . -selectbackground] \
activeForeground [ttk::style lookup . -selectforeground]

ttk::style map . -foreground [list disabled $colors(-disabledfg)]

option add *font [ttk::style lookup . -font]
option add *Menu.selectcolor $colors(-fg)

} elseif {$mode == "light"} {
ttk::style theme use "azure-light"

array set colors {
-fg "#000000"
-bg "#ffffff"
-disabledfg "#737373"
-disabledbg "#ffffff"
-selectfg "#ffffff"
-selectbg "#007fff"
}

ttk::style configure . \
-background $colors(-bg) \
-foreground $colors(-fg) \
-troughcolor $colors(-bg) \
-focuscolor $colors(-selectbg) \
-selectbackground $colors(-selectbg) \
-selectforeground $colors(-selectfg) \
-insertcolor $colors(-fg) \
-insertwidth 1 \
-fieldbackground $colors(-selectbg) \
-font {"Segoe Ui" 10} \
-borderwidth 1 \
-relief flat

tk_setPalette background [ttk::style lookup . -background] \
foreground [ttk::style lookup . -foreground] \
highlightColor [ttk::style lookup . -focuscolor] \
selectBackground [ttk::style lookup . -selectbackground] \
selectForeground [ttk::style lookup . -selectforeground] \
activeBackground [ttk::style lookup . -selectbackground] \
activeForeground [ttk::style lookup . -selectforeground]

ttk::style map . -foreground [list disabled $colors(-disabledfg)]

option add *font [ttk::style lookup . -font]
option add *Menu.selectcolor $colors(-fg)
}
}
2 changes: 1 addition & 1 deletion build.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

program_name = "oiw"
main = "main.py"
version = "1_7 WIN32"
version = "1_7 WIN32 build2"
icon = "assets/icon_centered.ico"
folders = ["assets", "ttkbootstrap", "sv_ttk"]

Expand Down
Loading

0 comments on commit 3ca938c

Please sign in to comment.