Open bagnongithub opened 3 years ago
What you are asking for appears to be possible via the ttk._script_from_settings
method. I've created a simple script that takes a ttkbootstrap style and exports the settings to a file.
from tkinter import ttk
from ttkbootstrap import Style
out_path = '.'
theme_name = 'flatly'
# set theme
s = Style(theme_name)
# get theme settings
settings = s._theme_objects[theme_name].settings
# convert settings into TCL script
script = ttk._script_from_settings(settings)
# save script to file
with open(f'{out_path}/{theme_name}.tcl', 'w', encoding='utf-8') as f:
f.write(script)
This produces the code below... which as I mentioned, I'm not sure if it's formatted correctly as I'm not a tck/tk coder.
As someone mentioned in the google group, I'm generating images for some of the widgets on the fly using pillow
. The reason for this is that it makes it easier to scale the project by allowing a wide variety of colors and styles on-demand. So, the images referenced in the code below are to in-memory images.
When I was learning how to do this, I cloned a popular tcl script into python, and that project used image files. So you can compare the two if you want to see a more directly comparison between the python vs. tcl version. https://github.com/israel-dryer/ttk-arc-clone
ttk::style element create Labelframe.Label from {clam}
ttk::style element create Label.fill from {clam}
ttk::style element create Label.text from {clam}
ttk::style configure TLabelframe.Label -foreground #212529;
ttk::style layout TLabelframe.Label {
Label.fill -sticky nswe -children {
Label.text -sticky nswe
}
}
ttk::style configure TLabelframe -relief raised -borderwidth 1 -bordercolor #ced4da -lightcolor #ffffff -darkcolor #ffffff;
ttk::style layout TLabelframe {
Labelframe.border -sticky nswe
}
ttk::style configure primary.TLabelframe -background #2c3e50 -lightcolor #2c3e50 -darkcolor #2c3e50;
ttk::style configure primary.TLabelframe.Label -foreground #ffffff -background #2c3e50 -lightcolor #2c3e50 -darkcolor #2c3e50;
ttk::style configure secondary.TLabelframe -background #95a5a6 -lightcolor #95a5a6 -darkcolor #95a5a6;
ttk::style configure secondary.TLabelframe.Label -foreground #ffffff -background #95a5a6 -lightcolor #95a5a6 -darkcolor #95a5a6;
ttk::style configure success.TLabelframe -background #18bc9c -lightcolor #18bc9c -darkcolor #18bc9c;
ttk::style configure success.TLabelframe.Label -foreground #ffffff -background #18bc9c -lightcolor #18bc9c -darkcolor #18bc9c;
ttk::style configure info.TLabelframe -background #3498db -lightcolor #3498db -darkcolor #3498db;
ttk::style configure info.TLabelframe.Label -foreground #ffffff -background #3498db -lightcolor #3498db -darkcolor #3498db;
ttk::style configure warning.TLabelframe -background #f39c12 -lightcolor #f39c12 -darkcolor #f39c12;
ttk::style configure warning.TLabelframe.Label -foreground #ffffff -background #f39c12 -lightcolor #f39c12 -darkcolor #f39c12;
ttk::style configure danger.TLabelframe -background #e74c3c -lightcolor #e74c3c -darkcolor #e74c3c;
ttk::style configure danger.TLabelframe.Label -foreground #ffffff -background #e74c3c -lightcolor #e74c3c -darkcolor #e74c3c;
ttk::style element create Spinbox.uparrow from {default}
ttk::style element create Spinbox.downarrow from {default}
ttk::style configure TSpinbox -bordercolor #ced4da -darkcolor #ecf0f1 -lightcolor #ecf0f1 -fieldbackground #ecf0f1 -foreground #212529 -borderwidth 0 -background #ecf0f1 -relief flat -arrowcolor #212529 -arrowsize 14 -padding {10 5};
ttk::style map TSpinbox -foreground {disabled #bdbfc1} -bordercolor {{focus !disabled} #2c3e50 {hover !disabled} #ffffff} -lightcolor {{focus !disabled} #2c3e50 {hover !disabled} #2c3e50} -darkcolor {{focus !disabled} #2c3e50 {hover !disabled} #2c3e50} -arrowcolor {{disabled !disabled} #bdbfc1 {pressed !disabled} #2c3e50 {focus !disabled} #212529 {hover !disabled} #212529};
ttk::style layout TSpinbox {
custom.Spinbox.field -side top -sticky we -children {
null -side right -sticky {} -children {
Spinbox.uparrow -side top -sticky e
Spinbox.downarrow -side bottom -sticky e
}
Spinbox.padding -sticky nswe -children {
Spinbox.textarea -sticky nswe
}
}
}
ttk::style map primary.TSpinbox -foreground {disabled #bdbfc1} -bordercolor {{focus !disabled} #2c3e50 {hover !disabled} #2c3e50} -arrowcolor {{disabled !disabled} #bdbfc1 {pressed !disabled} #2c3e50 {hover !disabled} #212529} -lightcolor {{focus !disabled} #2c3e50} -darkcolor {{focus !disabled} #2c3e50};
ttk::style map secondary.TSpinbox -foreground {disabled #bdbfc1} -bordercolor {{focus !disabled} #95a5a6 {hover !disabled} #95a5a6} -arrowcolor {{disabled !disabled} #bdbfc1 {pressed !disabled} #95a5a6 {hover !disabled} #212529} -lightcolor {{focus !disabled} #95a5a6} -darkcolor {{focus !disabled} #95a5a6};
ttk::style map success.TSpinbox -foreground {disabled #bdbfc1} -bordercolor {{focus !disabled} #18bc9c {hover !disabled} #18bc9c} -arrowcolor {{disabled !disabled} #bdbfc1 {pressed !disabled} #18bc9c {hover !disabled} #212529} -lightcolor {{focus !disabled} #18bc9c} -darkcolor {{focus !disabled} #18bc9c};
ttk::style map info.TSpinbox -foreground {disabled #bdbfc1} -bordercolor {{focus !disabled} #3498db {hover !disabled} #3498db} -arrowcolor {{disabled !disabled} #bdbfc1 {pressed !disabled} #3498db {hover !disabled} #212529} -lightcolor {{focus !disabled} #3498db} -darkcolor {{focus !disabled} #3498db};
ttk::style map warning.TSpinbox -foreground {disabled #bdbfc1} -bordercolor {{focus !disabled} #f39c12 {hover !disabled} #f39c12} -arrowcolor {{disabled !disabled} #bdbfc1 {pressed !disabled} #f39c12 {hover !disabled} #212529} -lightcolor {{focus !disabled} #f39c12} -darkcolor {{focus !disabled} #f39c12};
ttk::style map danger.TSpinbox -foreground {disabled #bdbfc1} -bordercolor {{focus !disabled} #e74c3c {hover !disabled} #e74c3c} -arrowcolor {{disabled !disabled} #bdbfc1 {pressed !disabled} #e74c3c {hover !disabled} #212529} -lightcolor {{focus !disabled} #e74c3c} -darkcolor {{focus !disabled} #e74c3c};
ttk::style layout Horizontal.TScale {
Scale.focus -expand 1 -sticky nswe -children {
Horizontal.Scale.track -sticky we
Horizontal.Scale.slider -side left -sticky {}
}
}
ttk::style layout Vertical.TScale {
Scale.focus -expand 1 -sticky nswe -children {
Vertical.Scale.track -sticky ns
Vertical.Scale.slider -side top -sticky {}
}
}
ttk::style element create Horizontal.Scale.track image {pyimage5 }
ttk::style element create Vertical.Scale.track image {pyimage6 }
ttk::style element create Scale.slider image {pyimage2 disabled pyimage1 {pressed !disabled} pyimage3 {hover !disabled} pyimage4}
ttk::style layout primary.Horizontal.TScale {
Scale.focus -expand 1 -sticky nswe -children {
Horizontal.Scale.track -sticky we
primary.Scale.slider -side left -sticky {}
}
}
ttk::style layout primary.Vertical.TScale {
primary.Scale.focus -expand 1 -sticky nswe -children {
Vertical.Scale.track -sticky ns
primary.Scale.slider -side top -sticky {}
}
}
ttk::style element create primary.Scale.slider image {pyimage7 disabled pyimage1 pressed pyimage8 hover pyimage9}
ttk::style layout secondary.Horizontal.TScale {
Scale.focus -expand 1 -sticky nswe -children {
Horizontal.Scale.track -sticky we
secondary.Scale.slider -side left -sticky {}
}
}
ttk::style layout secondary.Vertical.TScale {
secondary.Scale.focus -expand 1 -sticky nswe -children {
Vertical.Scale.track -sticky ns
secondary.Scale.slider -side top -sticky {}
}
}
ttk::style element create secondary.Scale.slider image {pyimage10 disabled pyimage1 pressed pyimage11 hover pyimage12}
ttk::style layout success.Horizontal.TScale {
Scale.focus -expand 1 -sticky nswe -children {
Horizontal.Scale.track -sticky we
success.Scale.slider -side left -sticky {}
}
}
ttk::style layout success.Vertical.TScale {
success.Scale.focus -expand 1 -sticky nswe -children {
Vertical.Scale.track -sticky ns
success.Scale.slider -side top -sticky {}
}
}
ttk::style element create success.Scale.slider image {pyimage13 disabled pyimage1 pressed pyimage14 hover pyimage15}
ttk::style layout info.Horizontal.TScale {
Scale.focus -expand 1 -sticky nswe -children {
Horizontal.Scale.track -sticky we
info.Scale.slider -side left -sticky {}
}
}
ttk::style layout info.Vertical.TScale {
info.Scale.focus -expand 1 -sticky nswe -children {
Vertical.Scale.track -sticky ns
info.Scale.slider -side top -sticky {}
}
}
ttk::style element create info.Scale.slider image {pyimage16 disabled pyimage1 pressed pyimage17 hover pyimage18}
ttk::style layout warning.Horizontal.TScale {
Scale.focus -expand 1 -sticky nswe -children {
Horizontal.Scale.track -sticky we
warning.Scale.slider -side left -sticky {}
}
}
ttk::style layout warning.Vertical.TScale {
warning.Scale.focus -expand 1 -sticky nswe -children {
Vertical.Scale.track -sticky ns
warning.Scale.slider -side top -sticky {}
}
}
ttk::style element create warning.Scale.slider image {pyimage19 disabled pyimage1 pressed pyimage20 hover pyimage21}
ttk::style layout danger.Horizontal.TScale {
Scale.focus -expand 1 -sticky nswe -children {
Horizontal.Scale.track -sticky we
danger.Scale.slider -side left -sticky {}
}
}
ttk::style layout danger.Vertical.TScale {
danger.Scale.focus -expand 1 -sticky nswe -children {
Vertical.Scale.track -sticky ns
danger.Scale.slider -side top -sticky {}
}
}
ttk::style element create danger.Scale.slider image {pyimage22 disabled pyimage1 pressed pyimage23 hover pyimage24}
ttk::style element create Vertical.Scrollbar.trough from {alt}
ttk::style element create Vertical.Scrollbar.thumb from {alt}
ttk::style element create Vertical.Scrollbar.uparrow image {pyimage25 }
ttk::style element create Vertical.Scrollbar.downarrow image {pyimage26 }
ttk::style element create Horizontal.Scrollbar.trough from {alt}
ttk::style element create Horizontal.Scrollbar.thumb from {alt}
ttk::style element create Horizontal.Scrollbar.leftarrow image {pyimage27 }
ttk::style element create Horizontal.Scrollbar.rightarrow image {pyimage28 }
ttk::style configure TScrollbar -troughrelief flat -relief flat -troughborderwidth 2 -troughcolor #f2f2f2 -background #d8d8d8 -width 16;
ttk::style map TScrollbar -background {pressed #a5a5a5 active #bfbfbf};
ttk::style element create Combobox.downarrow from {default}
ttk::style element create Combobox.padding from {clam}
ttk::style element create Combobox.textarea from {clam}
ttk::style configure TCombobox -bordercolor #ced4da -darkcolor #ecf0f1 -lightcolor #ecf0f1 -arrowcolor #212529 -foreground #212529 -fieldbackground #ecf0f1 -background #ecf0f1 -relief flat -borderwidth 0 -padding 5 -arrowsize 14;
ttk::style map TCombobox -foreground {disabled #bdbfc1} -bordercolor {{focus !disabled} #2c3e50 {hover !disabled} #ffffff} -lightcolor {{focus !disabled} #2c3e50 {hover !disabled} #2c3e50} -darkcolor {{focus !disabled} #2c3e50 {hover !disabled} #2c3e50} -arrowcolor {disabled #bdbfc1 {pressed !disabled} #ecf0f1 {focus !disabled} #212529 {hover !disabled} #2c3e50};
ttk::style layout TCombobox {
combo.Spinbox.field -side top -sticky we -children {
Combobox.downarrow -side right -sticky ns
Combobox.padding -expand 1 -sticky nswe -children {
Combobox.textarea -sticky nswe
}
}
}
ttk::style map primary.TCombobox -foreground {disabled #bdbfc1} -bordercolor {{focus !disabled} #2c3e50 {hover !disabled} #2c3e50} -lightcolor {{focus !disabled} #2c3e50 {pressed !disabled} #2c3e50} -darkcolor {{focus !disabled} #2c3e50 {pressed !disabled} #2c3e50} -arrowcolor {disabled #bdbfc1 {pressed !disabled} #ecf0f1 {focus !disabled} #212529 {hover !disabled} #2c3e50};
ttk::style map secondary.TCombobox -foreground {disabled #bdbfc1} -bordercolor {{focus !disabled} #95a5a6 {hover !disabled} #95a5a6} -lightcolor {{focus !disabled} #95a5a6 {pressed !disabled} #95a5a6} -darkcolor {{focus !disabled} #95a5a6 {pressed !disabled} #95a5a6} -arrowcolor {disabled #bdbfc1 {pressed !disabled} #ecf0f1 {focus !disabled} #212529 {hover !disabled} #2c3e50};
ttk::style map success.TCombobox -foreground {disabled #bdbfc1} -bordercolor {{focus !disabled} #18bc9c {hover !disabled} #18bc9c} -lightcolor {{focus !disabled} #18bc9c {pressed !disabled} #18bc9c} -darkcolor {{focus !disabled} #18bc9c {pressed !disabled} #18bc9c} -arrowcolor {disabled #bdbfc1 {pressed !disabled} #ecf0f1 {focus !disabled} #212529 {hover !disabled} #2c3e50};
ttk::style map info.TCombobox -foreground {disabled #bdbfc1} -bordercolor {{focus !disabled} #3498db {hover !disabled} #3498db} -lightcolor {{focus !disabled} #3498db {pressed !disabled} #3498db} -darkcolor {{focus !disabled} #3498db {pressed !disabled} #3498db} -arrowcolor {disabled #bdbfc1 {pressed !disabled} #ecf0f1 {focus !disabled} #212529 {hover !disabled} #2c3e50};
ttk::style map warning.TCombobox -foreground {disabled #bdbfc1} -bordercolor {{focus !disabled} #f39c12 {hover !disabled} #f39c12} -lightcolor {{focus !disabled} #f39c12 {pressed !disabled} #f39c12} -darkcolor {{focus !disabled} #f39c12 {pressed !disabled} #f39c12} -arrowcolor {disabled #bdbfc1 {pressed !disabled} #ecf0f1 {focus !disabled} #212529 {hover !disabled} #2c3e50};
ttk::style map danger.TCombobox -foreground {disabled #bdbfc1} -bordercolor {{focus !disabled} #e74c3c {hover !disabled} #e74c3c} -lightcolor {{focus !disabled} #e74c3c {pressed !disabled} #e74c3c} -darkcolor {{focus !disabled} #e74c3c {pressed !disabled} #e74c3c} -arrowcolor {disabled #bdbfc1 {pressed !disabled} #ecf0f1 {focus !disabled} #212529 {hover !disabled} #2c3e50};
ttk::style configure TFrame -background #ffffff;
ttk::style configure primary.TFrame -background #2c3e50;
ttk::style configure secondary.TFrame -background #95a5a6;
ttk::style configure success.TFrame -background #18bc9c;
ttk::style configure info.TFrame -background #3498db;
ttk::style configure warning.TFrame -background #f39c12;
ttk::style configure danger.TFrame -background #e74c3c;
ttk::style element create Checkbutton.indicator image {pyimage30 disabled pyimage31 !selected pyimage29} -width 20 -border 4 -sticky w
ttk::style configure TCheckbutton -foreground #212529 -background #ffffff -focuscolor {};
ttk::style map TCheckbutton -foreground {disabled #bdbfc1 {active !disabled} #2c3e50};
ttk::style layout TCheckbutton {
Checkbutton.padding -sticky nswe -children {
primary.Checkbutton.indicator -side left -sticky {}
Checkbutton.focus -side left -sticky {} -children {
Checkbutton.label -sticky nswe
}
}
}
ttk::style element create primary.Checkbutton.indicator image {pyimage33 disabled pyimage34 !selected pyimage32} -width 20 -border 4 -sticky w
ttk::style map primary.TCheckbutton -foreground {disabled #bdbfc1 {active !disabled} #22303f};
ttk::style layout primary.TCheckbutton {
Checkbutton.padding -sticky nswe -children {
primary.Checkbutton.indicator -side left -sticky {}
Checkbutton.focus -side left -sticky {} -children {
Checkbutton.label -sticky nswe
}
}
}
ttk::style element create secondary.Checkbutton.indicator image {pyimage36 disabled pyimage37 !selected pyimage35} -width 20 -border 4 -sticky w
ttk::style map secondary.TCheckbutton -foreground {disabled #bdbfc1 {active !disabled} #768484};
ttk::style layout secondary.TCheckbutton {
Checkbutton.padding -sticky nswe -children {
secondary.Checkbutton.indicator -side left -sticky {}
Checkbutton.focus -side left -sticky {} -children {
Checkbutton.label -sticky nswe
}
}
}
ttk::style element create success.Checkbutton.indicator image {pyimage39 disabled pyimage40 !selected pyimage38} -width 20 -border 4 -sticky w
ttk::style map success.TCheckbutton -foreground {disabled #bdbfc1 {active !disabled} #12967c};
ttk::style layout success.TCheckbutton {
Checkbutton.padding -sticky nswe -children {
success.Checkbutton.indicator -side left -sticky {}
Checkbutton.focus -side left -sticky {} -children {
Checkbutton.label -sticky nswe
}
}
}
ttk::style element create info.Checkbutton.indicator image {pyimage42 disabled pyimage43 !selected pyimage41} -width 20 -border 4 -sticky w
ttk::style map info.TCheckbutton -foreground {disabled #bdbfc1 {active !disabled} #287aaf};
ttk::style layout info.TCheckbutton {
Checkbutton.padding -sticky nswe -children {
info.Checkbutton.indicator -side left -sticky {}
Checkbutton.focus -side left -sticky {} -children {
Checkbutton.label -sticky nswe
}
}
}
ttk::style element create warning.Checkbutton.indicator image {pyimage45 disabled pyimage46 !selected pyimage44} -width 20 -border 4 -sticky w
ttk::style map warning.TCheckbutton -foreground {disabled #bdbfc1 {active !disabled} #c17c0e};
ttk::style layout warning.TCheckbutton {
Checkbutton.padding -sticky nswe -children {
warning.Checkbutton.indicator -side left -sticky {}
Checkbutton.focus -side left -sticky {} -children {
Checkbutton.label -sticky nswe
}
}
}
ttk::style element create danger.Checkbutton.indicator image {pyimage48 disabled pyimage49 !selected pyimage47} -width 20 -border 4 -sticky w
ttk::style map danger.TCheckbutton -foreground {disabled #bdbfc1 {active !disabled} #b93d30};
ttk::style layout danger.TCheckbutton {
Checkbutton.padding -sticky nswe -children {
danger.Checkbutton.indicator -side left -sticky {}
Checkbutton.focus -side left -sticky {} -children {
Checkbutton.label -sticky nswe
}
}
}
ttk::style configure TEntry -bordercolor #ced4da -darkcolor #ecf0f1 -lightcolor #ecf0f1 -fieldbackground #ecf0f1 -foreground #212529 -borderwidth 0 -padding 5;
ttk::style map TEntry -foreground {disabled #bdbfc1} -bordercolor {{focus !disabled} #2c3e50 {hover !disabled} #ffffff} -lightcolor {{focus !disabled} #2c3e50 {hover !disabled} #2c3e50} -darkcolor {{focus !disabled} #2c3e50 {hover !disabled} #2c3e50};
ttk::style map primary.TEntry -foreground {disabled #bdbfc1} -bordercolor {{focus !disabled} #2c3e50 {hover !disabled} #ffffff} -lightcolor {{focus !disabled} #2c3e50 {hover !disabled} #2c3e50} -darkcolor {{focus !disabled} #2c3e50 {hover !disabled} #2c3e50};
ttk::style map secondary.TEntry -foreground {disabled #bdbfc1} -bordercolor {{focus !disabled} #95a5a6 {hover !disabled} #ffffff} -lightcolor {{focus !disabled} #95a5a6 {hover !disabled} #95a5a6} -darkcolor {{focus !disabled} #95a5a6 {hover !disabled} #95a5a6};
ttk::style map success.TEntry -foreground {disabled #bdbfc1} -bordercolor {{focus !disabled} #18bc9c {hover !disabled} #ffffff} -lightcolor {{focus !disabled} #18bc9c {hover !disabled} #18bc9c} -darkcolor {{focus !disabled} #18bc9c {hover !disabled} #18bc9c};
ttk::style map info.TEntry -foreground {disabled #bdbfc1} -bordercolor {{focus !disabled} #3498db {hover !disabled} #ffffff} -lightcolor {{focus !disabled} #3498db {hover !disabled} #3498db} -darkcolor {{focus !disabled} #3498db {hover !disabled} #3498db};
ttk::style map warning.TEntry -foreground {disabled #bdbfc1} -bordercolor {{focus !disabled} #f39c12 {hover !disabled} #ffffff} -lightcolor {{focus !disabled} #f39c12 {hover !disabled} #f39c12} -darkcolor {{focus !disabled} #f39c12 {hover !disabled} #f39c12};
ttk::style map danger.TEntry -foreground {disabled #bdbfc1} -bordercolor {{focus !disabled} #e74c3c {hover !disabled} #ffffff} -lightcolor {{focus !disabled} #e74c3c {hover !disabled} #e74c3c} -darkcolor {{focus !disabled} #e74c3c {hover !disabled} #e74c3c};
ttk::style configure TLabel -foreground #212529;
ttk::style configure Inverse.TLabel -foreground #ffffff -background #212529;
ttk::style configure primary.TLabel -foreground #2c3e50;
ttk::style configure primary.Inverse.TLabel -foreground #ffffff -background #2c3e50;
ttk::style configure primary.Invert.TLabel -foreground #ffffff -background #2c3e50;
ttk::style configure secondary.TLabel -foreground #95a5a6;
ttk::style configure secondary.Inverse.TLabel -foreground #ffffff -background #95a5a6;
ttk::style configure secondary.Invert.TLabel -foreground #ffffff -background #95a5a6;
ttk::style configure success.TLabel -foreground #18bc9c;
ttk::style configure success.Inverse.TLabel -foreground #ffffff -background #18bc9c;
ttk::style configure success.Invert.TLabel -foreground #ffffff -background #18bc9c;
ttk::style configure info.TLabel -foreground #3498db;
ttk::style configure info.Inverse.TLabel -foreground #ffffff -background #3498db;
ttk::style configure info.Invert.TLabel -foreground #ffffff -background #3498db;
ttk::style configure warning.TLabel -foreground #f39c12;
ttk::style configure warning.Inverse.TLabel -foreground #ffffff -background #f39c12;
ttk::style configure warning.Invert.TLabel -foreground #ffffff -background #f39c12;
ttk::style configure danger.TLabel -foreground #e74c3c;
ttk::style configure danger.Inverse.TLabel -foreground #ffffff -background #e74c3c;
ttk::style configure danger.Invert.TLabel -foreground #ffffff -background #e74c3c;
ttk::style configure TNotebook -bordercolor #ced4da -lightcolor #ffffff -darkcolor #ffffff -borderwidth 1;
ttk::style configure TNotebook.Tab -bordercolor #ced4da -lightcolor #ffffff -foreground #212529 -padding {10 5};
ttk::style map TNotebook.Tab -background {!selected #ecf0f1} -lightcolor {!selected #ecf0f1} -darkcolor {!selected #ecf0f1} -bordercolor {!selected #ced4da} -foreground {!selected #212529};
ttk::style configure Outline.TButton -foreground #2c3e50 -background #ffffff -bordercolor #2c3e50 -darkcolor #ffffff -lightcolor #ffffff -relief raised -font {Helvetica 10} -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map Outline.TButton -foreground {disabled #bdbfc1 {pressed !disabled} #ffffff {hover !disabled} #ffffff} -background {{pressed !disabled} #273747 {hover !disabled} #2c3e50} -bordercolor {disabled #bdbfc1 {pressed !disabled} #273747 {hover !disabled} #2c3e50} -darkcolor {{pressed !disabled} #273747 {hover !disabled} #2c3e50} -lightcolor {{pressed !disabled} #273747 {hover !disabled} #2c3e50};
ttk::style configure primary.Outline.TButton -foreground #2c3e50 -background #ffffff -bordercolor #2c3e50 -darkcolor #ffffff -lightcolor #ffffff -relief raised -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map primary.Outline.TButton -foreground {disabled #bdbfc1 {pressed !disabled} #ffffff {hover !disabled} #ffffff} -background {{pressed !disabled} #273747 {hover !disabled} #2c3e50} -bordercolor {disabled #bdbfc1 {pressed !disabled} #273747 {hover !disabled} #2c3e50} -darkcolor {{pressed !disabled} #273747 {hover !disabled} #2c3e50} -lightcolor {{pressed !disabled} #273747 {hover !disabled} #2c3e50};
ttk::style configure secondary.Outline.TButton -foreground #95a5a6 -background #ffffff -bordercolor #95a5a6 -darkcolor #ffffff -lightcolor #ffffff -relief raised -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map secondary.Outline.TButton -foreground {disabled #bdbfc1 {pressed !disabled} #ffffff {hover !disabled} #ffffff} -background {{pressed !disabled} #859595 {hover !disabled} #95a5a6} -bordercolor {disabled #bdbfc1 {pressed !disabled} #859595 {hover !disabled} #95a5a6} -darkcolor {{pressed !disabled} #859595 {hover !disabled} #95a5a6} -lightcolor {{pressed !disabled} #859595 {hover !disabled} #95a5a6};
ttk::style configure success.Outline.TButton -foreground #18bc9c -background #ffffff -bordercolor #18bc9c -darkcolor #ffffff -lightcolor #ffffff -relief raised -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map success.Outline.TButton -foreground {disabled #bdbfc1 {pressed !disabled} #ffffff {hover !disabled} #ffffff} -background {{pressed !disabled} #14a98b {hover !disabled} #18bc9c} -bordercolor {disabled #bdbfc1 {pressed !disabled} #14a98b {hover !disabled} #18bc9c} -darkcolor {{pressed !disabled} #14a98b {hover !disabled} #18bc9c} -lightcolor {{pressed !disabled} #14a98b {hover !disabled} #18bc9c};
ttk::style configure info.Outline.TButton -foreground #3498db -background #ffffff -bordercolor #3498db -darkcolor #ffffff -lightcolor #ffffff -relief raised -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map info.Outline.TButton -foreground {disabled #bdbfc1 {pressed !disabled} #ffffff {hover !disabled} #ffffff} -background {{pressed !disabled} #2d89c5 {hover !disabled} #3498db} -bordercolor {disabled #bdbfc1 {pressed !disabled} #2d89c5 {hover !disabled} #3498db} -darkcolor {{pressed !disabled} #2d89c5 {hover !disabled} #3498db} -lightcolor {{pressed !disabled} #2d89c5 {hover !disabled} #3498db};
ttk::style configure warning.Outline.TButton -foreground #f39c12 -background #ffffff -bordercolor #f39c12 -darkcolor #ffffff -lightcolor #ffffff -relief raised -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map warning.Outline.TButton -foreground {disabled #bdbfc1 {pressed !disabled} #ffffff {hover !disabled} #ffffff} -background {{pressed !disabled} #da8b10 {hover !disabled} #f39c12} -bordercolor {disabled #bdbfc1 {pressed !disabled} #da8b10 {hover !disabled} #f39c12} -darkcolor {{pressed !disabled} #da8b10 {hover !disabled} #f39c12} -lightcolor {{pressed !disabled} #da8b10 {hover !disabled} #f39c12};
ttk::style configure danger.Outline.TButton -foreground #e74c3c -background #ffffff -bordercolor #e74c3c -darkcolor #ffffff -lightcolor #ffffff -relief raised -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map danger.Outline.TButton -foreground {disabled #bdbfc1 {pressed !disabled} #ffffff {hover !disabled} #ffffff} -background {{pressed !disabled} #d04437 {hover !disabled} #e74c3c} -bordercolor {disabled #bdbfc1 {pressed !disabled} #d04437 {hover !disabled} #e74c3c} -darkcolor {{pressed !disabled} #d04437 {hover !disabled} #e74c3c} -lightcolor {{pressed !disabled} #d04437 {hover !disabled} #e74c3c};
ttk::style configure Outline.TMenubutton -font {Helvetica 10} -foreground #2c3e50 -background #ffffff -bordercolor #2c3e50 -darkcolor #ffffff -lightcolor #ffffff -arrowcolor #2c3e50 -arrowpadding {0 0 15 0} -relief raised -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map Outline.TMenubutton -foreground {disabled #bdbfc1 {pressed !disabled} #ffffff {hover !disabled} #ffffff} -background {{pressed !disabled} #22303f {hover !disabled} #273747} -bordercolor {disabled #bdbfc1 {pressed !disabled} #22303f {hover !disabled} #273747} -darkcolor {{pressed !disabled} #22303f {hover !disabled} #273747} -lightcolor {{pressed !disabled} #22303f {hover !disabled} #273747} -arrowcolor {disabled #bdbfc1 {pressed !disabled} #ffffff {hover !disabled} #ffffff};
ttk::style configure primary.Outline.TMenubutton -foreground #2c3e50 -background #ffffff -bordercolor #2c3e50 -darkcolor #ffffff -lightcolor #ffffff -arrowcolor #2c3e50 -arrowpadding {0 0 15 0} -relief raised -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map primary.Outline.TMenubutton -foreground {disabled #bdbfc1 {pressed !disabled} #ffffff {hover !disabled} #ffffff} -background {{pressed !disabled} #22303f {hover !disabled} #273747} -bordercolor {disabled #bdbfc1 {pressed !disabled} #22303f {hover !disabled} #273747} -darkcolor {{pressed !disabled} #22303f {hover !disabled} #273747} -lightcolor {{pressed !disabled} #22303f {hover !disabled} #273747} -arrowcolor {disabled #bdbfc1 {pressed !disabled} #ffffff {hover !disabled} #ffffff};
ttk::style configure secondary.Outline.TMenubutton -foreground #95a5a6 -background #ffffff -bordercolor #95a5a6 -darkcolor #ffffff -lightcolor #ffffff -arrowcolor #95a5a6 -arrowpadding {0 0 15 0} -relief raised -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map secondary.Outline.TMenubutton -foreground {disabled #bdbfc1 {pressed !disabled} #ffffff {hover !disabled} #ffffff} -background {{pressed !disabled} #768484 {hover !disabled} #859595} -bordercolor {disabled #bdbfc1 {pressed !disabled} #768484 {hover !disabled} #859595} -darkcolor {{pressed !disabled} #768484 {hover !disabled} #859595} -lightcolor {{pressed !disabled} #768484 {hover !disabled} #859595} -arrowcolor {disabled #bdbfc1 {pressed !disabled} #ffffff {hover !disabled} #ffffff};
ttk::style configure success.Outline.TMenubutton -foreground #18bc9c -background #ffffff -bordercolor #18bc9c -darkcolor #ffffff -lightcolor #ffffff -arrowcolor #18bc9c -arrowpadding {0 0 15 0} -relief raised -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map success.Outline.TMenubutton -foreground {disabled #bdbfc1 {pressed !disabled} #ffffff {hover !disabled} #ffffff} -background {{pressed !disabled} #12967c {hover !disabled} #14a98b} -bordercolor {disabled #bdbfc1 {pressed !disabled} #12967c {hover !disabled} #14a98b} -darkcolor {{pressed !disabled} #12967c {hover !disabled} #14a98b} -lightcolor {{pressed !disabled} #12967c {hover !disabled} #14a98b} -arrowcolor {disabled #bdbfc1 {pressed !disabled} #ffffff {hover !disabled} #ffffff};
ttk::style configure info.Outline.TMenubutton -foreground #3498db -background #ffffff -bordercolor #3498db -darkcolor #ffffff -lightcolor #ffffff -arrowcolor #3498db -arrowpadding {0 0 15 0} -relief raised -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map info.Outline.TMenubutton -foreground {disabled #bdbfc1 {pressed !disabled} #ffffff {hover !disabled} #ffffff} -background {{pressed !disabled} #287aaf {hover !disabled} #2d89c5} -bordercolor {disabled #bdbfc1 {pressed !disabled} #287aaf {hover !disabled} #2d89c5} -darkcolor {{pressed !disabled} #287aaf {hover !disabled} #2d89c5} -lightcolor {{pressed !disabled} #287aaf {hover !disabled} #2d89c5} -arrowcolor {disabled #bdbfc1 {pressed !disabled} #ffffff {hover !disabled} #ffffff};
ttk::style configure warning.Outline.TMenubutton -foreground #f39c12 -background #ffffff -bordercolor #f39c12 -darkcolor #ffffff -lightcolor #ffffff -arrowcolor #f39c12 -arrowpadding {0 0 15 0} -relief raised -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map warning.Outline.TMenubutton -foreground {disabled #bdbfc1 {pressed !disabled} #ffffff {hover !disabled} #ffffff} -background {{pressed !disabled} #c17c0e {hover !disabled} #da8b10} -bordercolor {disabled #bdbfc1 {pressed !disabled} #c17c0e {hover !disabled} #da8b10} -darkcolor {{pressed !disabled} #c17c0e {hover !disabled} #da8b10} -lightcolor {{pressed !disabled} #c17c0e {hover !disabled} #da8b10} -arrowcolor {disabled #bdbfc1 {pressed !disabled} #ffffff {hover !disabled} #ffffff};
ttk::style configure danger.Outline.TMenubutton -foreground #e74c3c -background #ffffff -bordercolor #e74c3c -darkcolor #ffffff -lightcolor #ffffff -arrowcolor #e74c3c -arrowpadding {0 0 15 0} -relief raised -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map danger.Outline.TMenubutton -foreground {disabled #bdbfc1 {pressed !disabled} #ffffff {hover !disabled} #ffffff} -background {{pressed !disabled} #b93d30 {hover !disabled} #d04437} -bordercolor {disabled #bdbfc1 {pressed !disabled} #b93d30 {hover !disabled} #d04437} -darkcolor {{pressed !disabled} #b93d30 {hover !disabled} #d04437} -lightcolor {{pressed !disabled} #b93d30 {hover !disabled} #d04437} -arrowcolor {disabled #bdbfc1 {pressed !disabled} #ffffff {hover !disabled} #ffffff};
ttk::style configure Outline.Toolbutton -foreground #2c3e50 -background #ffffff -bordercolor #ced4da -darkcolor #ffffff -lightcolor #ffffff -relief raised -font {Helvetica 10} -focusthickness 0 -focuscolor {} -borderwidth 1 -padding {10 5};
ttk::style map Outline.Toolbutton -foreground {disabled #bdbfc1 {pressed !disabled} #ffffff {selected !disabled} #ffffff {hover !disabled} #ffffff} -background {{pressed !disabled} #273747 {selected !disabled} #273747 {hover !disabled} #2c3e50} -bordercolor {disabled #bdbfc1 {pressed !disabled} #273747 {selected !disabled} #273747 {hover !disabled} #2c3e50} -darkcolor {{pressed !disabled} #273747 {selected !disabled} #273747 {hover !disabled} #2c3e50} -lightcolor {{pressed !disabled} #273747 {selected !disabled} #273747 {hover !disabled} #2c3e50};
ttk::style configure primary.Outline.Toolbutton -foreground #2c3e50 -background #ffffff -bordercolor #ced4da -darkcolor #ffffff -lightcolor #ffffff -relief raised -focusthickness 0 -focuscolor {} -borderwidth 1 -padding {10 5};
ttk::style map primary.Outline.Toolbutton -foreground {disabled #bdbfc1 {pressed !disabled} #ffffff {selected !disabled} #ffffff {hover !disabled} #ffffff} -background {{pressed !disabled} #273747 {selected !disabled} #273747 {hover !disabled} #2c3e50} -bordercolor {disabled #bdbfc1 {pressed !disabled} #273747 {selected !disabled} #273747 {hover !disabled} #2c3e50} -darkcolor {{pressed !disabled} #273747 {selected !disabled} #273747 {hover !disabled} #2c3e50} -lightcolor {{pressed !disabled} #273747 {selected !disabled} #273747 {hover !disabled} #2c3e50};
ttk::style configure secondary.Outline.Toolbutton -foreground #95a5a6 -background #ffffff -bordercolor #ced4da -darkcolor #ffffff -lightcolor #ffffff -relief raised -focusthickness 0 -focuscolor {} -borderwidth 1 -padding {10 5};
ttk::style map secondary.Outline.Toolbutton -foreground {disabled #bdbfc1 {pressed !disabled} #ffffff {selected !disabled} #ffffff {hover !disabled} #ffffff} -background {{pressed !disabled} #859595 {selected !disabled} #859595 {hover !disabled} #95a5a6} -bordercolor {disabled #bdbfc1 {pressed !disabled} #859595 {selected !disabled} #859595 {hover !disabled} #95a5a6} -darkcolor {{pressed !disabled} #859595 {selected !disabled} #859595 {hover !disabled} #95a5a6} -lightcolor {{pressed !disabled} #859595 {selected !disabled} #859595 {hover !disabled} #95a5a6};
ttk::style configure success.Outline.Toolbutton -foreground #18bc9c -background #ffffff -bordercolor #ced4da -darkcolor #ffffff -lightcolor #ffffff -relief raised -focusthickness 0 -focuscolor {} -borderwidth 1 -padding {10 5};
ttk::style map success.Outline.Toolbutton -foreground {disabled #bdbfc1 {pressed !disabled} #ffffff {selected !disabled} #ffffff {hover !disabled} #ffffff} -background {{pressed !disabled} #14a98b {selected !disabled} #14a98b {hover !disabled} #18bc9c} -bordercolor {disabled #bdbfc1 {pressed !disabled} #14a98b {selected !disabled} #14a98b {hover !disabled} #18bc9c} -darkcolor {{pressed !disabled} #14a98b {selected !disabled} #14a98b {hover !disabled} #18bc9c} -lightcolor {{pressed !disabled} #14a98b {selected !disabled} #14a98b {hover !disabled} #18bc9c};
ttk::style configure info.Outline.Toolbutton -foreground #3498db -background #ffffff -bordercolor #ced4da -darkcolor #ffffff -lightcolor #ffffff -relief raised -focusthickness 0 -focuscolor {} -borderwidth 1 -padding {10 5};
ttk::style map info.Outline.Toolbutton -foreground {disabled #bdbfc1 {pressed !disabled} #ffffff {selected !disabled} #ffffff {hover !disabled} #ffffff} -background {{pressed !disabled} #2d89c5 {selected !disabled} #2d89c5 {hover !disabled} #3498db} -bordercolor {disabled #bdbfc1 {pressed !disabled} #2d89c5 {selected !disabled} #2d89c5 {hover !disabled} #3498db} -darkcolor {{pressed !disabled} #2d89c5 {selected !disabled} #2d89c5 {hover !disabled} #3498db} -lightcolor {{pressed !disabled} #2d89c5 {selected !disabled} #2d89c5 {hover !disabled} #3498db};
ttk::style configure warning.Outline.Toolbutton -foreground #f39c12 -background #ffffff -bordercolor #ced4da -darkcolor #ffffff -lightcolor #ffffff -relief raised -focusthickness 0 -focuscolor {} -borderwidth 1 -padding {10 5};
ttk::style map warning.Outline.Toolbutton -foreground {disabled #bdbfc1 {pressed !disabled} #ffffff {selected !disabled} #ffffff {hover !disabled} #ffffff} -background {{pressed !disabled} #da8b10 {selected !disabled} #da8b10 {hover !disabled} #f39c12} -bordercolor {disabled #bdbfc1 {pressed !disabled} #da8b10 {selected !disabled} #da8b10 {hover !disabled} #f39c12} -darkcolor {{pressed !disabled} #da8b10 {selected !disabled} #da8b10 {hover !disabled} #f39c12} -lightcolor {{pressed !disabled} #da8b10 {selected !disabled} #da8b10 {hover !disabled} #f39c12};
ttk::style configure danger.Outline.Toolbutton -foreground #e74c3c -background #ffffff -bordercolor #ced4da -darkcolor #ffffff -lightcolor #ffffff -relief raised -focusthickness 0 -focuscolor {} -borderwidth 1 -padding {10 5};
ttk::style map danger.Outline.Toolbutton -foreground {disabled #bdbfc1 {pressed !disabled} #ffffff {selected !disabled} #ffffff {hover !disabled} #ffffff} -background {{pressed !disabled} #d04437 {selected !disabled} #d04437 {hover !disabled} #e74c3c} -bordercolor {disabled #bdbfc1 {pressed !disabled} #d04437 {selected !disabled} #d04437 {hover !disabled} #e74c3c} -darkcolor {{pressed !disabled} #d04437 {selected !disabled} #d04437 {hover !disabled} #e74c3c} -lightcolor {{pressed !disabled} #d04437 {selected !disabled} #d04437 {hover !disabled} #e74c3c};
ttk::style element create Progressbar.trough from {clam}
ttk::style element create Progressbar.pbar from {default}
ttk::style configure TProgressbar -thickness 20 -borderwidth 1 -bordercolor #ced4da -lightcolor #ced4da -pbarrelief flat -troughcolor #ecf0f1 -background #2c3e50;
ttk::style configure primary.Horizontal.TProgressbar -background #2c3e50;
ttk::style configure primary.Vertical.TProgressbar -background #2c3e50;
ttk::style configure secondary.Horizontal.TProgressbar -background #95a5a6;
ttk::style configure secondary.Vertical.TProgressbar -background #95a5a6;
ttk::style configure success.Horizontal.TProgressbar -background #18bc9c;
ttk::style configure success.Vertical.TProgressbar -background #18bc9c;
ttk::style configure info.Horizontal.TProgressbar -background #3498db;
ttk::style configure info.Vertical.TProgressbar -background #3498db;
ttk::style configure warning.Horizontal.TProgressbar -background #f39c12;
ttk::style configure warning.Vertical.TProgressbar -background #f39c12;
ttk::style configure danger.Horizontal.TProgressbar -background #e74c3c;
ttk::style configure danger.Vertical.TProgressbar -background #e74c3c;
ttk::style element create Striped.Horizontal.Progressbar.pbar image {pyimage50 } -width 20 -sticky ew
ttk::style configure Striped.Horizontal.TProgressbar -troughcolor #ecf0f1 -thickness 20 -borderwidth 1 -lightcolor #ced4da;
ttk::style layout Striped.Horizontal.TProgressbar {
Horizontal.Progressbar.trough -sticky nswe -children {
Striped.Horizontal.Progressbar.pbar -side left -sticky ns
}
}
ttk::style element create primary.Striped.Horizontal.Progressbar.pbar image {pyimage51 } -width 20 -sticky ew
ttk::style configure primary.Striped.Horizontal.TProgressbar -troughcolor #ecf0f1 -thickness 20 -borderwidth 1 -lightcolor #ced4da;
ttk::style layout primary.Striped.Horizontal.TProgressbar {
Horizontal.Progressbar.trough -sticky nswe -children {
primary.Striped.Horizontal.Progressbar.pbar -side left -sticky ns
}
}
ttk::style element create secondary.Striped.Horizontal.Progressbar.pbar image {pyimage52 } -width 20 -sticky ew
ttk::style configure secondary.Striped.Horizontal.TProgressbar -troughcolor #ecf0f1 -thickness 20 -borderwidth 1 -lightcolor #ced4da;
ttk::style layout secondary.Striped.Horizontal.TProgressbar {
Horizontal.Progressbar.trough -sticky nswe -children {
secondary.Striped.Horizontal.Progressbar.pbar -side left -sticky ns
}
}
ttk::style element create success.Striped.Horizontal.Progressbar.pbar image {pyimage53 } -width 20 -sticky ew
ttk::style configure success.Striped.Horizontal.TProgressbar -troughcolor #ecf0f1 -thickness 20 -borderwidth 1 -lightcolor #ced4da;
ttk::style layout success.Striped.Horizontal.TProgressbar {
Horizontal.Progressbar.trough -sticky nswe -children {
success.Striped.Horizontal.Progressbar.pbar -side left -sticky ns
}
}
ttk::style element create info.Striped.Horizontal.Progressbar.pbar image {pyimage54 } -width 20 -sticky ew
ttk::style configure info.Striped.Horizontal.TProgressbar -troughcolor #ecf0f1 -thickness 20 -borderwidth 1 -lightcolor #ced4da;
ttk::style layout info.Striped.Horizontal.TProgressbar {
Horizontal.Progressbar.trough -sticky nswe -children {
info.Striped.Horizontal.Progressbar.pbar -side left -sticky ns
}
}
ttk::style element create warning.Striped.Horizontal.Progressbar.pbar image {pyimage55 } -width 20 -sticky ew
ttk::style configure warning.Striped.Horizontal.TProgressbar -troughcolor #ecf0f1 -thickness 20 -borderwidth 1 -lightcolor #ced4da;
ttk::style layout warning.Striped.Horizontal.TProgressbar {
Horizontal.Progressbar.trough -sticky nswe -children {
warning.Striped.Horizontal.Progressbar.pbar -side left -sticky ns
}
}
ttk::style element create danger.Striped.Horizontal.Progressbar.pbar image {pyimage56 } -width 20 -sticky ew
ttk::style configure danger.Striped.Horizontal.TProgressbar -troughcolor #ecf0f1 -thickness 20 -borderwidth 1 -lightcolor #ced4da;
ttk::style layout danger.Striped.Horizontal.TProgressbar {
Horizontal.Progressbar.trough -sticky nswe -children {
danger.Striped.Horizontal.Progressbar.pbar -side left -sticky ns
}
}
ttk::style element create Floodgauge.trough from {clam}
ttk::style element create Floodgauge.pbar from {default}
ttk::style configure Horizontal.TFloodgauge -thickness 100 -borderwidth 1 -bordercolor #2c3e50 -lightcolor #2c3e50 -pbarrelief flat -troughcolor #61778e -background #2c3e50 -foreground #ffffff -justify center -anchor center -font {helvetica 16};
ttk::style layout Horizontal.TFloodgauge {
Floodgauge.trough -sticky nswe -children {
Floodgauge.pbar -side left -sticky ns
Floodgauge.label -sticky {}
}
}
ttk::style configure Vertical.TFloodgauge -thickness 100 -borderwidth 1 -bordercolor #2c3e50 -lightcolor #2c3e50 -pbarrelief flat -troughcolor #61778e -background #2c3e50 -foreground #ffffff -justify center -anchor center -font {helvetica 16};
ttk::style layout Vertical.TFloodgauge {
Floodgauge.trough -sticky nswe -children {
Floodgauge.pbar -side bottom -sticky we
Floodgauge.label -sticky {}
}
}
ttk::style element create Radiobutton.indicator image {pyimage58 disabled pyimage59 !selected pyimage57} -width 20 -border 4 -sticky w
ttk::style configure TRadiobutton -font {Helvetica 10};
ttk::style map TRadiobutton -foreground {disabled #bdbfc1 active #2c3e50} -indicatorforeground {disabled #bdbfc1 {active selected !disabled} #2c3e50};
ttk::style layout TRadiobutton {
Radiobutton.padding -sticky nswe -children {
Radiobutton.indicator -side left -sticky {}
Radiobutton.focus -side left -sticky {} -children {
Radiobutton.label -sticky nswe
}
}
}
ttk::style element create primary.Radiobutton.indicator image {pyimage61 disabled pyimage62 !selected pyimage60} -width 20 -border 4 -sticky w
ttk::style configure primary.TRadiobutton -font {Helvetica 10};
ttk::style map primary.TRadiobutton -foreground {disabled #bdbfc1 active #22303f} -indicatorforeground {disabled #bdbfc1 {active selected !disabled} #22303f};
ttk::style layout primary.TRadiobutton {
Radiobutton.padding -sticky nswe -children {
primary.Radiobutton.indicator -side left -sticky {}
Radiobutton.focus -side left -sticky {} -children {
Radiobutton.label -sticky nswe
}
}
}
ttk::style element create secondary.Radiobutton.indicator image {pyimage64 disabled pyimage65 !selected pyimage63} -width 20 -border 4 -sticky w
ttk::style configure secondary.TRadiobutton -font {Helvetica 10};
ttk::style map secondary.TRadiobutton -foreground {disabled #bdbfc1 active #768484} -indicatorforeground {disabled #bdbfc1 {active selected !disabled} #768484};
ttk::style layout secondary.TRadiobutton {
Radiobutton.padding -sticky nswe -children {
secondary.Radiobutton.indicator -side left -sticky {}
Radiobutton.focus -side left -sticky {} -children {
Radiobutton.label -sticky nswe
}
}
}
ttk::style element create success.Radiobutton.indicator image {pyimage67 disabled pyimage68 !selected pyimage66} -width 20 -border 4 -sticky w
ttk::style configure success.TRadiobutton -font {Helvetica 10};
ttk::style map success.TRadiobutton -foreground {disabled #bdbfc1 active #12967c} -indicatorforeground {disabled #bdbfc1 {active selected !disabled} #12967c};
ttk::style layout success.TRadiobutton {
Radiobutton.padding -sticky nswe -children {
success.Radiobutton.indicator -side left -sticky {}
Radiobutton.focus -side left -sticky {} -children {
Radiobutton.label -sticky nswe
}
}
}
ttk::style element create info.Radiobutton.indicator image {pyimage70 disabled pyimage71 !selected pyimage69} -width 20 -border 4 -sticky w
ttk::style configure info.TRadiobutton -font {Helvetica 10};
ttk::style map info.TRadiobutton -foreground {disabled #bdbfc1 active #287aaf} -indicatorforeground {disabled #bdbfc1 {active selected !disabled} #287aaf};
ttk::style layout info.TRadiobutton {
Radiobutton.padding -sticky nswe -children {
info.Radiobutton.indicator -side left -sticky {}
Radiobutton.focus -side left -sticky {} -children {
Radiobutton.label -sticky nswe
}
}
}
ttk::style element create warning.Radiobutton.indicator image {pyimage73 disabled pyimage74 !selected pyimage72} -width 20 -border 4 -sticky w
ttk::style configure warning.TRadiobutton -font {Helvetica 10};
ttk::style map warning.TRadiobutton -foreground {disabled #bdbfc1 active #c17c0e} -indicatorforeground {disabled #bdbfc1 {active selected !disabled} #c17c0e};
ttk::style layout warning.TRadiobutton {
Radiobutton.padding -sticky nswe -children {
warning.Radiobutton.indicator -side left -sticky {}
Radiobutton.focus -side left -sticky {} -children {
Radiobutton.label -sticky nswe
}
}
}
ttk::style element create danger.Radiobutton.indicator image {pyimage76 disabled pyimage77 !selected pyimage75} -width 20 -border 4 -sticky w
ttk::style configure danger.TRadiobutton -font {Helvetica 10};
ttk::style map danger.TRadiobutton -foreground {disabled #bdbfc1 active #b93d30} -indicatorforeground {disabled #bdbfc1 {active selected !disabled} #b93d30};
ttk::style layout danger.TRadiobutton {
Radiobutton.padding -sticky nswe -children {
danger.Radiobutton.indicator -side left -sticky {}
Radiobutton.focus -side left -sticky {} -children {
Radiobutton.label -sticky nswe
}
}
}
ttk::style configure TButton -foreground #ffffff -background #2c3e50 -bordercolor #2c3e50 -darkcolor #2c3e50 -lightcolor #2c3e50 -font {Helvetica 10} -anchor center -relief raised -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map TButton -foreground {disabled #212529} -background {disabled #bdbfc1 {pressed !disabled} #22303f {hover !disabled} #273747} -bordercolor {disabled #bdbfc1 {pressed !disabled} #22303f {hover !disabled} #273747} -darkcolor {disabled #bdbfc1 {pressed !disabled} #22303f {hover !disabled} #273747} -lightcolor {disabled #bdbfc1 {pressed !disabled} #22303f {hover !disabled} #273747};
ttk::style configure primary.TButton -foreground #ffffff -background #2c3e50 -bordercolor #2c3e50 -darkcolor #2c3e50 -lightcolor #2c3e50 -relief raised -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map primary.TButton -foreground {disabled #212529} -background {disabled #bdbfc1 {pressed !disabled} #22303f {hover !disabled} #273747} -bordercolor {disabled #bdbfc1 {hover !disabled} #273747} -darkcolor {disabled #bdbfc1 {pressed !disabled} #22303f {hover !disabled} #273747} -lightcolor {disabled #bdbfc1 {pressed !disabled} #22303f {hover !disabled} #273747};
ttk::style configure secondary.TButton -foreground #ffffff -background #95a5a6 -bordercolor #95a5a6 -darkcolor #95a5a6 -lightcolor #95a5a6 -relief raised -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map secondary.TButton -foreground {disabled #212529} -background {disabled #bdbfc1 {pressed !disabled} #768484 {hover !disabled} #859595} -bordercolor {disabled #bdbfc1 {hover !disabled} #859595} -darkcolor {disabled #bdbfc1 {pressed !disabled} #768484 {hover !disabled} #859595} -lightcolor {disabled #bdbfc1 {pressed !disabled} #768484 {hover !disabled} #859595};
ttk::style configure success.TButton -foreground #ffffff -background #18bc9c -bordercolor #18bc9c -darkcolor #18bc9c -lightcolor #18bc9c -relief raised -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map success.TButton -foreground {disabled #212529} -background {disabled #bdbfc1 {pressed !disabled} #12967c {hover !disabled} #14a98b} -bordercolor {disabled #bdbfc1 {hover !disabled} #14a98b} -darkcolor {disabled #bdbfc1 {pressed !disabled} #12967c {hover !disabled} #14a98b} -lightcolor {disabled #bdbfc1 {pressed !disabled} #12967c {hover !disabled} #14a98b};
ttk::style configure info.TButton -foreground #ffffff -background #3498db -bordercolor #3498db -darkcolor #3498db -lightcolor #3498db -relief raised -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map info.TButton -foreground {disabled #212529} -background {disabled #bdbfc1 {pressed !disabled} #287aaf {hover !disabled} #2d89c5} -bordercolor {disabled #bdbfc1 {hover !disabled} #2d89c5} -darkcolor {disabled #bdbfc1 {pressed !disabled} #287aaf {hover !disabled} #2d89c5} -lightcolor {disabled #bdbfc1 {pressed !disabled} #287aaf {hover !disabled} #2d89c5};
ttk::style configure warning.TButton -foreground #ffffff -background #f39c12 -bordercolor #f39c12 -darkcolor #f39c12 -lightcolor #f39c12 -relief raised -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map warning.TButton -foreground {disabled #212529} -background {disabled #bdbfc1 {pressed !disabled} #c17c0e {hover !disabled} #da8b10} -bordercolor {disabled #bdbfc1 {hover !disabled} #da8b10} -darkcolor {disabled #bdbfc1 {pressed !disabled} #c17c0e {hover !disabled} #da8b10} -lightcolor {disabled #bdbfc1 {pressed !disabled} #c17c0e {hover !disabled} #da8b10};
ttk::style configure danger.TButton -foreground #ffffff -background #e74c3c -bordercolor #e74c3c -darkcolor #e74c3c -lightcolor #e74c3c -relief raised -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map danger.TButton -foreground {disabled #212529} -background {disabled #bdbfc1 {pressed !disabled} #b93d30 {hover !disabled} #d04437} -bordercolor {disabled #bdbfc1 {hover !disabled} #d04437} -darkcolor {disabled #bdbfc1 {pressed !disabled} #b93d30 {hover !disabled} #d04437} -lightcolor {disabled #bdbfc1 {pressed !disabled} #b93d30 {hover !disabled} #d04437};
ttk::style configure Link.TButton -foreground #212529 -background #ffffff -bordercolor #ffffff -darkcolor #ffffff -lightcolor #ffffff -relief raised -font {Helvetica 10} -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map Link.TButton -foreground {disabled #bdbfc1 {pressed !disabled} #3399db {hover !disabled} #3399db} -shiftrelief {{pressed !disabled} -1} -background {{pressed !disabled} #ffffff {hover !disabled} #ffffff} -bordercolor {disabled #bdbfc1 {pressed !disabled} #ffffff {hover !disabled} #ffffff} -darkcolor {{pressed !disabled} #ffffff {hover !disabled} #ffffff} -lightcolor {{pressed !disabled} #ffffff {hover !disabled} #ffffff};
ttk::style configure primary.Link.TButton -foreground #2c3e50 -background #ffffff -bordercolor #ffffff -darkcolor #ffffff -lightcolor #ffffff -relief raised -font {Helvetica 10} -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map primary.Link.TButton -foreground {disabled #bdbfc1 {pressed !disabled} #3399db {hover !disabled} #3399db} -shiftrelief {{pressed !disabled} -1} -background {{pressed !disabled} #ffffff {hover !disabled} #ffffff} -bordercolor {disabled #bdbfc1 {pressed !disabled} #ffffff {hover !disabled} #ffffff} -darkcolor {{pressed !disabled} #ffffff {hover !disabled} #ffffff} -lightcolor {{pressed !disabled} #ffffff {hover !disabled} #ffffff};
ttk::style configure secondary.Link.TButton -foreground #95a5a6 -background #ffffff -bordercolor #ffffff -darkcolor #ffffff -lightcolor #ffffff -relief raised -font {Helvetica 10} -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map secondary.Link.TButton -foreground {disabled #bdbfc1 {pressed !disabled} #3399db {hover !disabled} #3399db} -shiftrelief {{pressed !disabled} -1} -background {{pressed !disabled} #ffffff {hover !disabled} #ffffff} -bordercolor {disabled #bdbfc1 {pressed !disabled} #ffffff {hover !disabled} #ffffff} -darkcolor {{pressed !disabled} #ffffff {hover !disabled} #ffffff} -lightcolor {{pressed !disabled} #ffffff {hover !disabled} #ffffff};
ttk::style configure success.Link.TButton -foreground #18bc9c -background #ffffff -bordercolor #ffffff -darkcolor #ffffff -lightcolor #ffffff -relief raised -font {Helvetica 10} -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map success.Link.TButton -foreground {disabled #bdbfc1 {pressed !disabled} #3399db {hover !disabled} #3399db} -shiftrelief {{pressed !disabled} -1} -background {{pressed !disabled} #ffffff {hover !disabled} #ffffff} -bordercolor {disabled #bdbfc1 {pressed !disabled} #ffffff {hover !disabled} #ffffff} -darkcolor {{pressed !disabled} #ffffff {hover !disabled} #ffffff} -lightcolor {{pressed !disabled} #ffffff {hover !disabled} #ffffff};
ttk::style configure info.Link.TButton -foreground #3498db -background #ffffff -bordercolor #ffffff -darkcolor #ffffff -lightcolor #ffffff -relief raised -font {Helvetica 10} -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map info.Link.TButton -foreground {disabled #bdbfc1 {pressed !disabled} #3399db {hover !disabled} #3399db} -shiftrelief {{pressed !disabled} -1} -background {{pressed !disabled} #ffffff {hover !disabled} #ffffff} -bordercolor {disabled #bdbfc1 {pressed !disabled} #ffffff {hover !disabled} #ffffff} -darkcolor {{pressed !disabled} #ffffff {hover !disabled} #ffffff} -lightcolor {{pressed !disabled} #ffffff {hover !disabled} #ffffff};
ttk::style configure warning.Link.TButton -foreground #f39c12 -background #ffffff -bordercolor #ffffff -darkcolor #ffffff -lightcolor #ffffff -relief raised -font {Helvetica 10} -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map warning.Link.TButton -foreground {disabled #bdbfc1 {pressed !disabled} #3399db {hover !disabled} #3399db} -shiftrelief {{pressed !disabled} -1} -background {{pressed !disabled} #ffffff {hover !disabled} #ffffff} -bordercolor {disabled #bdbfc1 {pressed !disabled} #ffffff {hover !disabled} #ffffff} -darkcolor {{pressed !disabled} #ffffff {hover !disabled} #ffffff} -lightcolor {{pressed !disabled} #ffffff {hover !disabled} #ffffff};
ttk::style configure danger.Link.TButton -foreground #e74c3c -background #ffffff -bordercolor #ffffff -darkcolor #ffffff -lightcolor #ffffff -relief raised -font {Helvetica 10} -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map danger.Link.TButton -foreground {disabled #bdbfc1 {pressed !disabled} #3399db {hover !disabled} #3399db} -shiftrelief {{pressed !disabled} -1} -background {{pressed !disabled} #ffffff {hover !disabled} #ffffff} -bordercolor {disabled #bdbfc1 {pressed !disabled} #ffffff {hover !disabled} #ffffff} -darkcolor {{pressed !disabled} #ffffff {hover !disabled} #ffffff} -lightcolor {{pressed !disabled} #ffffff {hover !disabled} #ffffff};
ttk::style configure TMenubutton -foreground #ffffff -background #2c3e50 -bordercolor #2c3e50 -darkcolor #2c3e50 -lightcolor #2c3e50 -arrowsize 4 -arrowcolor #ffffff -arrowpadding {0 0 15 0} -relief raised -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map TMenubutton -arrowcolor {disabled #212529} -foreground {disabled #212529} -background {disabled #bdbfc1 {pressed !disabled} #22303f {hover !disabled} #273747} -bordercolor {disabled #bdbfc1 {pressed !disabled} #22303f {hover !disabled} #273747} -darkcolor {disabled #bdbfc1 {pressed !disabled} #22303f {hover !disabled} #273747} -lightcolor {disabled #bdbfc1 {pressed !disabled} #22303f {hover !disabled} #273747};
ttk::style configure primary.TMenubutton -foreground #ffffff -background #2c3e50 -bordercolor #2c3e50 -darkcolor #2c3e50 -lightcolor #2c3e50 -arrowsize 4 -arrowcolor #ffffff -arrowpadding {0 0 15 0} -relief raised -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map primary.TMenubutton -arrowcolor {disabled #212529} -foreground {disabled #212529} -background {disabled #bdbfc1 {pressed !disabled} #22303f {hover !disabled} #273747} -bordercolor {disabled #bdbfc1 {pressed !disabled} #22303f {hover !disabled} #273747} -darkcolor {disabled #bdbfc1 {pressed !disabled} #22303f {hover !disabled} #273747} -lightcolor {disabled #bdbfc1 {pressed !disabled} #22303f {hover !disabled} #273747};
ttk::style configure secondary.TMenubutton -foreground #ffffff -background #95a5a6 -bordercolor #95a5a6 -darkcolor #95a5a6 -lightcolor #95a5a6 -arrowsize 4 -arrowcolor #ffffff -arrowpadding {0 0 15 0} -relief raised -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map secondary.TMenubutton -arrowcolor {disabled #212529} -foreground {disabled #212529} -background {disabled #bdbfc1 {pressed !disabled} #768484 {hover !disabled} #859595} -bordercolor {disabled #bdbfc1 {pressed !disabled} #768484 {hover !disabled} #859595} -darkcolor {disabled #bdbfc1 {pressed !disabled} #768484 {hover !disabled} #859595} -lightcolor {disabled #bdbfc1 {pressed !disabled} #768484 {hover !disabled} #859595};
ttk::style configure success.TMenubutton -foreground #ffffff -background #18bc9c -bordercolor #18bc9c -darkcolor #18bc9c -lightcolor #18bc9c -arrowsize 4 -arrowcolor #ffffff -arrowpadding {0 0 15 0} -relief raised -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map success.TMenubutton -arrowcolor {disabled #212529} -foreground {disabled #212529} -background {disabled #bdbfc1 {pressed !disabled} #12967c {hover !disabled} #14a98b} -bordercolor {disabled #bdbfc1 {pressed !disabled} #12967c {hover !disabled} #14a98b} -darkcolor {disabled #bdbfc1 {pressed !disabled} #12967c {hover !disabled} #14a98b} -lightcolor {disabled #bdbfc1 {pressed !disabled} #12967c {hover !disabled} #14a98b};
ttk::style configure info.TMenubutton -foreground #ffffff -background #3498db -bordercolor #3498db -darkcolor #3498db -lightcolor #3498db -arrowsize 4 -arrowcolor #ffffff -arrowpadding {0 0 15 0} -relief raised -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map info.TMenubutton -arrowcolor {disabled #212529} -foreground {disabled #212529} -background {disabled #bdbfc1 {pressed !disabled} #287aaf {hover !disabled} #2d89c5} -bordercolor {disabled #bdbfc1 {pressed !disabled} #287aaf {hover !disabled} #2d89c5} -darkcolor {disabled #bdbfc1 {pressed !disabled} #287aaf {hover !disabled} #2d89c5} -lightcolor {disabled #bdbfc1 {pressed !disabled} #287aaf {hover !disabled} #2d89c5};
ttk::style configure warning.TMenubutton -foreground #ffffff -background #f39c12 -bordercolor #f39c12 -darkcolor #f39c12 -lightcolor #f39c12 -arrowsize 4 -arrowcolor #ffffff -arrowpadding {0 0 15 0} -relief raised -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map warning.TMenubutton -arrowcolor {disabled #212529} -foreground {disabled #212529} -background {disabled #bdbfc1 {pressed !disabled} #c17c0e {hover !disabled} #da8b10} -bordercolor {disabled #bdbfc1 {pressed !disabled} #c17c0e {hover !disabled} #da8b10} -darkcolor {disabled #bdbfc1 {pressed !disabled} #c17c0e {hover !disabled} #da8b10} -lightcolor {disabled #bdbfc1 {pressed !disabled} #c17c0e {hover !disabled} #da8b10};
ttk::style configure danger.TMenubutton -foreground #ffffff -background #e74c3c -bordercolor #e74c3c -darkcolor #e74c3c -lightcolor #e74c3c -arrowsize 4 -arrowcolor #ffffff -arrowpadding {0 0 15 0} -relief raised -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map danger.TMenubutton -arrowcolor {disabled #212529} -foreground {disabled #212529} -background {disabled #bdbfc1 {pressed !disabled} #b93d30 {hover !disabled} #d04437} -bordercolor {disabled #bdbfc1 {pressed !disabled} #b93d30 {hover !disabled} #d04437} -darkcolor {disabled #bdbfc1 {pressed !disabled} #b93d30 {hover !disabled} #d04437} -lightcolor {disabled #bdbfc1 {pressed !disabled} #b93d30 {hover !disabled} #d04437};
ttk::style configure Toolbutton -foreground #ffffff -background #434d56 -bordercolor #434d56 -darkcolor #434d56 -lightcolor #434d56 -font {Helvetica 10} -anchor center -relief raised -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map Toolbutton -foreground {disabled #212529} -background {disabled #bdbfc1 {pressed !disabled} #2c3e50 {selected !disabled} #2c3e50 {hover !disabled} #2c3e50} -bordercolor {disabled #bdbfc1 {selected !disabled} #2c3e50 {pressed !disabled} #2c3e50 {hover !disabled} #2c3e50} -darkcolor {disabled #bdbfc1 {pressed !disabled} #2c3e50 {selected !disabled} #2c3e50 {hover !disabled} #2c3e50} -lightcolor {disabled #bdbfc1 {pressed !disabled} #2c3e50 {selected !disabled} #2c3e50 {hover !disabled} #2c3e50};
ttk::style configure primary.Toolbutton -foreground #ffffff -background #434d56 -bordercolor #434d56 -darkcolor #434d56 -lightcolor #434d56 -relief raised -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map primary.Toolbutton -foreground {disabled #212529} -background {disabled #bdbfc1 {pressed !disabled} #2c3e50 {selected !disabled} #2c3e50 {hover !disabled} #2c3e50} -bordercolor {disabled #bdbfc1 {pressed !disabled} #2c3e50 {selected !disabled} #2c3e50 {hover !disabled} #2c3e50} -darkcolor {disabled #bdbfc1 {pressed !disabled} #2c3e50 {selected !disabled} #2c3e50 {hover !disabled} #2c3e50} -lightcolor {disabled #bdbfc1 {pressed !disabled} #2c3e50 {selected !disabled} #2c3e50 {hover !disabled} #2c3e50};
ttk::style configure secondary.Toolbutton -foreground #ffffff -background #acb6b6 -bordercolor #acb6b6 -darkcolor #acb6b6 -lightcolor #acb6b6 -relief raised -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map secondary.Toolbutton -foreground {disabled #212529} -background {disabled #bdbfc1 {pressed !disabled} #95a5a6 {selected !disabled} #95a5a6 {hover !disabled} #95a5a6} -bordercolor {disabled #bdbfc1 {pressed !disabled} #95a5a6 {selected !disabled} #95a5a6 {hover !disabled} #95a5a6} -darkcolor {disabled #bdbfc1 {pressed !disabled} #95a5a6 {selected !disabled} #95a5a6 {hover !disabled} #95a5a6} -lightcolor {disabled #bdbfc1 {pressed !disabled} #95a5a6 {selected !disabled} #95a5a6 {hover !disabled} #95a5a6};
ttk::style configure success.Toolbutton -foreground #ffffff -background #74cfbd -bordercolor #74cfbd -darkcolor #74cfbd -lightcolor #74cfbd -relief raised -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map success.Toolbutton -foreground {disabled #212529} -background {disabled #bdbfc1 {pressed !disabled} #18bc9c {selected !disabled} #18bc9c {hover !disabled} #18bc9c} -bordercolor {disabled #bdbfc1 {pressed !disabled} #18bc9c {selected !disabled} #18bc9c {hover !disabled} #18bc9c} -darkcolor {disabled #bdbfc1 {pressed !disabled} #18bc9c {selected !disabled} #18bc9c {hover !disabled} #18bc9c} -lightcolor {disabled #bdbfc1 {pressed !disabled} #18bc9c {selected !disabled} #18bc9c {hover !disabled} #18bc9c};
ttk::style configure info.Toolbutton -foreground #ffffff -background #94ccf1 -bordercolor #94ccf1 -darkcolor #94ccf1 -lightcolor #94ccf1 -relief raised -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map info.Toolbutton -foreground {disabled #212529} -background {disabled #bdbfc1 {pressed !disabled} #3498db {selected !disabled} #3498db {hover !disabled} #3498db} -bordercolor {disabled #bdbfc1 {pressed !disabled} #3498db {selected !disabled} #3498db {hover !disabled} #3498db} -darkcolor {disabled #bdbfc1 {pressed !disabled} #3498db {selected !disabled} #3498db {hover !disabled} #3498db} -lightcolor {disabled #bdbfc1 {pressed !disabled} #3498db {selected !disabled} #3498db {hover !disabled} #3498db};
ttk::style configure warning.Toolbutton -foreground #ffffff -background #f2c682 -bordercolor #f2c682 -darkcolor #f2c682 -lightcolor #f2c682 -relief raised -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map warning.Toolbutton -foreground {disabled #212529} -background {disabled #bdbfc1 {pressed !disabled} #f39c12 {selected !disabled} #f39c12 {hover !disabled} #f39c12} -bordercolor {disabled #bdbfc1 {pressed !disabled} #f39c12 {selected !disabled} #f39c12 {hover !disabled} #f39c12} -darkcolor {disabled #bdbfc1 {pressed !disabled} #f39c12 {selected !disabled} #f39c12 {hover !disabled} #f39c12} -lightcolor {disabled #bdbfc1 {pressed !disabled} #f39c12 {selected !disabled} #f39c12 {hover !disabled} #f39c12};
ttk::style configure danger.Toolbutton -foreground #ffffff -background #f2a199 -bordercolor #f2a199 -darkcolor #f2a199 -lightcolor #f2a199 -relief raised -focusthickness 0 -focuscolor {} -padding {10 5};
ttk::style map danger.Toolbutton -foreground {disabled #212529} -background {disabled #bdbfc1 {pressed !disabled} #e74c3c {selected !disabled} #e74c3c {hover !disabled} #e74c3c} -bordercolor {disabled #bdbfc1 {pressed !disabled} #e74c3c {selected !disabled} #e74c3c {hover !disabled} #e74c3c} -darkcolor {disabled #bdbfc1 {pressed !disabled} #e74c3c {selected !disabled} #e74c3c {hover !disabled} #e74c3c} -lightcolor {disabled #bdbfc1 {pressed !disabled} #e74c3c {selected !disabled} #e74c3c {hover !disabled} #e74c3c};
ttk::style configure Treeview -background #ecf0f1 -foreground #212529 -bordercolor #ffffff -lightcolor #ced4da -darkcolor #ced4da -relief raised -padding 0;
ttk::style map Treeview -background {selected #95a5a6} -foreground {disabled #bdbfc1 selected #ffffff};
ttk::style layout Treeview {
Button.border -sticky nswe -border 1 -children {
Treeview.padding -sticky nswe -children {
Treeview.treearea -sticky nswe
}
}
}
ttk::style configure Treeview.Heading -background #2c3e50 -foreground #ffffff -relief flat -padding 5;
ttk::style element create Treeitem.indicator from {alt}
ttk::style configure primary.Treeview.Heading -background #2c3e50;
ttk::style map primary.Treeview.Heading -foreground {disabled #bdbfc1} -bordercolor {{focus !disabled} #2c3e50};
ttk::style configure secondary.Treeview.Heading -background #95a5a6;
ttk::style map secondary.Treeview.Heading -foreground {disabled #bdbfc1} -bordercolor {{focus !disabled} #95a5a6};
ttk::style configure success.Treeview.Heading -background #18bc9c;
ttk::style map success.Treeview.Heading -foreground {disabled #bdbfc1} -bordercolor {{focus !disabled} #18bc9c};
ttk::style configure info.Treeview.Heading -background #3498db;
ttk::style map info.Treeview.Heading -foreground {disabled #bdbfc1} -bordercolor {{focus !disabled} #3498db};
ttk::style configure warning.Treeview.Heading -background #f39c12;
ttk::style map warning.Treeview.Heading -foreground {disabled #bdbfc1} -bordercolor {{focus !disabled} #f39c12};
ttk::style configure danger.Treeview.Heading -background #e74c3c;
ttk::style map danger.Treeview.Heading -foreground {disabled #bdbfc1} -bordercolor {{focus !disabled} #e74c3c};
ttk::style element create Horizontal.Separator.separator image {pyimage78 }
ttk::style layout Horizontal.TSeparator {
Horizontal.Separator.separator -sticky ew
}
ttk::style element create primary.Horizontal.Separator.separator image {pyimage79 }
ttk::style layout primary.Horizontal.TSeparator {
primary.Horizontal.Separator.separator -sticky ew
}
ttk::style element create secondary.Horizontal.Separator.separator image {pyimage80 }
ttk::style layout secondary.Horizontal.TSeparator {
secondary.Horizontal.Separator.separator -sticky ew
}
ttk::style element create success.Horizontal.Separator.separator image {pyimage81 }
ttk::style layout success.Horizontal.TSeparator {
success.Horizontal.Separator.separator -sticky ew
}
ttk::style element create info.Horizontal.Separator.separator image {pyimage82 }
ttk::style layout info.Horizontal.TSeparator {
info.Horizontal.Separator.separator -sticky ew
}
ttk::style element create warning.Horizontal.Separator.separator image {pyimage83 }
ttk::style layout warning.Horizontal.TSeparator {
warning.Horizontal.Separator.separator -sticky ew
}
ttk::style element create danger.Horizontal.Separator.separator image {pyimage84 }
ttk::style layout danger.Horizontal.TSeparator {
danger.Horizontal.Separator.separator -sticky ew
}
ttk::style element create Vertical.Separator.separator image {pyimage85 }
ttk::style layout Vertical.TSeparator {
Vertical.Separator.separator -sticky ns
}
ttk::style element create primary.Vertical.Separator.separator image {pyimage86 }
ttk::style layout primary.Vertical.TSeparator {
primary.Vertical.Separator.separator -sticky ns
}
ttk::style element create secondary.Vertical.Separator.separator image {pyimage87 }
ttk::style layout secondary.Vertical.TSeparator {
secondary.Vertical.Separator.separator -sticky ns
}
ttk::style element create success.Vertical.Separator.separator image {pyimage88 }
ttk::style layout success.Vertical.TSeparator {
success.Vertical.Separator.separator -sticky ns
}
ttk::style element create info.Vertical.Separator.separator image {pyimage89 }
ttk::style layout info.Vertical.TSeparator {
info.Vertical.Separator.separator -sticky ns
}
ttk::style element create warning.Vertical.Separator.separator image {pyimage90 }
ttk::style layout warning.Vertical.TSeparator {
warning.Vertical.Separator.separator -sticky ns
}
ttk::style element create danger.Vertical.Separator.separator image {pyimage91 }
ttk::style layout danger.Vertical.TSeparator {
danger.Vertical.Separator.separator -sticky ns
}
ttk::style configure TPanedwindow -background #ffffff;
ttk::style configure Sash -bordercolor #ffffff -lightcolor #ffffff -sashthickness 8 -sashpad 0 -gripcount 0;
ttk::style element create Roundtoggle.Toolbutton.indicator image {pyimage92 disabled pyimage94 !selected pyimage93} -width 28 -border 4 -sticky w
ttk::style configure Roundtoggle.Toolbutton -relief flat -borderwidth 0 -foreground #212529;
ttk::style map Roundtoggle.Toolbutton -foreground {disabled #bdbfc1 hover #2c3e50} -background {selected #ffffff !selected #ffffff};
ttk::style layout Roundtoggle.Toolbutton {
Toolbutton.border -sticky nswe -children {
Toolbutton.padding -sticky nswe -children {
Roundtoggle.Toolbutton.indicator -side left
Toolbutton.label -side left
}
}
}
ttk::style element create primary.Roundtoggle.Toolbutton.indicator image {pyimage95 disabled pyimage97 !selected pyimage96} -width 28 -border 4 -sticky w
ttk::style configure primary.Roundtoggle.Toolbutton -relief flat -borderwidth 0 -foreground #212529;
ttk::style map primary.Roundtoggle.Toolbutton -foreground {disabled #bdbfc1 hover #2c3e50} -background {selected #ffffff !selected #ffffff};
ttk::style layout primary.Roundtoggle.Toolbutton {
Toolbutton.border -sticky nswe -children {
Toolbutton.padding -sticky nswe -children {
primary.Roundtoggle.Toolbutton.indicator -side left
Toolbutton.label -side left
}
}
}
ttk::style element create secondary.Roundtoggle.Toolbutton.indicator image {pyimage98 disabled pyimage100 !selected pyimage99} -width 28 -border 4 -sticky w
ttk::style configure secondary.Roundtoggle.Toolbutton -relief flat -borderwidth 0 -foreground #212529;
ttk::style map secondary.Roundtoggle.Toolbutton -foreground {disabled #bdbfc1 hover #95a5a6} -background {selected #ffffff !selected #ffffff};
ttk::style layout secondary.Roundtoggle.Toolbutton {
Toolbutton.border -sticky nswe -children {
Toolbutton.padding -sticky nswe -children {
secondary.Roundtoggle.Toolbutton.indicator -side left
Toolbutton.label -side left
}
}
}
ttk::style element create success.Roundtoggle.Toolbutton.indicator image {pyimage101 disabled pyimage103 !selected pyimage102} -width 28 -border 4 -sticky w
ttk::style configure success.Roundtoggle.Toolbutton -relief flat -borderwidth 0 -foreground #212529;
ttk::style map success.Roundtoggle.Toolbutton -foreground {disabled #bdbfc1 hover #18bc9c} -background {selected #ffffff !selected #ffffff};
ttk::style layout success.Roundtoggle.Toolbutton {
Toolbutton.border -sticky nswe -children {
Toolbutton.padding -sticky nswe -children {
success.Roundtoggle.Toolbutton.indicator -side left
Toolbutton.label -side left
}
}
}
ttk::style element create info.Roundtoggle.Toolbutton.indicator image {pyimage104 disabled pyimage106 !selected pyimage105} -width 28 -border 4 -sticky w
ttk::style configure info.Roundtoggle.Toolbutton -relief flat -borderwidth 0 -foreground #212529;
ttk::style map info.Roundtoggle.Toolbutton -foreground {disabled #bdbfc1 hover #3498db} -background {selected #ffffff !selected #ffffff};
ttk::style layout info.Roundtoggle.Toolbutton {
Toolbutton.border -sticky nswe -children {
Toolbutton.padding -sticky nswe -children {
info.Roundtoggle.Toolbutton.indicator -side left
Toolbutton.label -side left
}
}
}
ttk::style element create warning.Roundtoggle.Toolbutton.indicator image {pyimage107 disabled pyimage109 !selected pyimage108} -width 28 -border 4 -sticky w
ttk::style configure warning.Roundtoggle.Toolbutton -relief flat -borderwidth 0 -foreground #212529;
ttk::style map warning.Roundtoggle.Toolbutton -foreground {disabled #bdbfc1 hover #f39c12} -background {selected #ffffff !selected #ffffff};
ttk::style layout warning.Roundtoggle.Toolbutton {
Toolbutton.border -sticky nswe -children {
Toolbutton.padding -sticky nswe -children {
warning.Roundtoggle.Toolbutton.indicator -side left
Toolbutton.label -side left
}
}
}
ttk::style element create danger.Roundtoggle.Toolbutton.indicator image {pyimage110 disabled pyimage112 !selected pyimage111} -width 28 -border 4 -sticky w
ttk::style configure danger.Roundtoggle.Toolbutton -relief flat -borderwidth 0 -foreground #212529;
ttk::style map danger.Roundtoggle.Toolbutton -foreground {disabled #bdbfc1 hover #e74c3c} -background {selected #ffffff !selected #ffffff};
ttk::style layout danger.Roundtoggle.Toolbutton {
Toolbutton.border -sticky nswe -children {
Toolbutton.padding -sticky nswe -children {
danger.Roundtoggle.Toolbutton.indicator -side left
Toolbutton.label -side left
}
}
}
ttk::style element create Squaretoggle.Toolbutton.indicator image {pyimage113 disabled pyimage115 !selected pyimage114} -width 28 -border 4 -sticky w
ttk::style configure Squaretoggle.Toolbutton -relief flat -borderwidth 0 -foreground #212529;
ttk::style map Squaretoggle.Toolbutton -foreground {disabled #bdbfc1 hover #2c3e50} -background {selected #ffffff !selected #ffffff};
ttk::style layout Squaretoggle.Toolbutton {
Toolbutton.border -sticky nswe -children {
Toolbutton.padding -sticky nswe -children {
Squaretoggle.Toolbutton.indicator -side left
Toolbutton.label -side left
}
}
}
ttk::style element create primary.Squaretoggle.Toolbutton.indicator image {pyimage116 disabled pyimage118 !selected pyimage117} -width 28 -border 4 -sticky w
ttk::style configure primary.Squaretoggle.Toolbutton -relief flat -borderwidth 0 -foreground #212529;
ttk::style map primary.Squaretoggle.Toolbutton -foreground {disabled #bdbfc1 hover #2c3e50} -background {selected #ffffff !selected #ffffff};
ttk::style layout primary.Squaretoggle.Toolbutton {
Toolbutton.border -sticky nswe -children {
Toolbutton.padding -sticky nswe -children {
primary.Squaretoggle.Toolbutton.indicator -side left
Toolbutton.label -side left
}
}
}
ttk::style element create secondary.Squaretoggle.Toolbutton.indicator image {pyimage119 disabled pyimage121 !selected pyimage120} -width 28 -border 4 -sticky w
ttk::style configure secondary.Squaretoggle.Toolbutton -relief flat -borderwidth 0 -foreground #212529;
ttk::style map secondary.Squaretoggle.Toolbutton -foreground {disabled #bdbfc1 hover #95a5a6} -background {selected #ffffff !selected #ffffff};
ttk::style layout secondary.Squaretoggle.Toolbutton {
Toolbutton.border -sticky nswe -children {
Toolbutton.padding -sticky nswe -children {
secondary.Squaretoggle.Toolbutton.indicator -side left
Toolbutton.label -side left
}
}
}
ttk::style element create success.Squaretoggle.Toolbutton.indicator image {pyimage122 disabled pyimage124 !selected pyimage123} -width 28 -border 4 -sticky w
ttk::style configure success.Squaretoggle.Toolbutton -relief flat -borderwidth 0 -foreground #212529;
ttk::style map success.Squaretoggle.Toolbutton -foreground {disabled #bdbfc1 hover #18bc9c} -background {selected #ffffff !selected #ffffff};
ttk::style layout success.Squaretoggle.Toolbutton {
Toolbutton.border -sticky nswe -children {
Toolbutton.padding -sticky nswe -children {
success.Squaretoggle.Toolbutton.indicator -side left
Toolbutton.label -side left
}
}
}
ttk::style element create info.Squaretoggle.Toolbutton.indicator image {pyimage125 disabled pyimage127 !selected pyimage126} -width 28 -border 4 -sticky w
ttk::style configure info.Squaretoggle.Toolbutton -relief flat -borderwidth 0 -foreground #212529;
ttk::style map info.Squaretoggle.Toolbutton -foreground {disabled #bdbfc1 hover #3498db} -background {selected #ffffff !selected #ffffff};
ttk::style layout info.Squaretoggle.Toolbutton {
Toolbutton.border -sticky nswe -children {
Toolbutton.padding -sticky nswe -children {
info.Squaretoggle.Toolbutton.indicator -side left
Toolbutton.label -side left
}
}
}
ttk::style element create warning.Squaretoggle.Toolbutton.indicator image {pyimage128 disabled pyimage130 !selected pyimage129} -width 28 -border 4 -sticky w
ttk::style configure warning.Squaretoggle.Toolbutton -relief flat -borderwidth 0 -foreground #212529;
ttk::style map warning.Squaretoggle.Toolbutton -foreground {disabled #bdbfc1 hover #f39c12} -background {selected #ffffff !selected #ffffff};
ttk::style layout warning.Squaretoggle.Toolbutton {
Toolbutton.border -sticky nswe -children {
Toolbutton.padding -sticky nswe -children {
warning.Squaretoggle.Toolbutton.indicator -side left
Toolbutton.label -side left
}
}
}
ttk::style element create danger.Squaretoggle.Toolbutton.indicator image {pyimage131 disabled pyimage133 !selected pyimage132} -width 28 -border 4 -sticky w
ttk::style configure danger.Squaretoggle.Toolbutton -relief flat -borderwidth 0 -foreground #212529;
ttk::style map danger.Squaretoggle.Toolbutton -foreground {disabled #bdbfc1 hover #e74c3c} -background {selected #ffffff !selected #ffffff};
ttk::style layout danger.Squaretoggle.Toolbutton {
Toolbutton.border -sticky nswe -children {
Toolbutton.padding -sticky nswe -children {
danger.Squaretoggle.Toolbutton.indicator -side left
Toolbutton.label -side left
}
}
}
ttk::style element create Sizegrip.sizegrip image {pyimage134 }
ttk::style layout TSizegrip {
Sizegrip.sizegrip -side bottom -sticky se
}
ttk::style element create primary.Sizegrip.sizegrip image {pyimage135 }
ttk::style layout primary.TSizegrip {
primary.Sizegrip.sizegrip -side bottom -sticky se
}
ttk::style element create secondary.Sizegrip.sizegrip image {pyimage136 }
ttk::style layout secondary.TSizegrip {
secondary.Sizegrip.sizegrip -side bottom -sticky se
}
ttk::style element create success.Sizegrip.sizegrip image {pyimage137 }
ttk::style layout success.TSizegrip {
success.Sizegrip.sizegrip -side bottom -sticky se
}
ttk::style element create info.Sizegrip.sizegrip image {pyimage138 }
ttk::style layout info.TSizegrip {
info.Sizegrip.sizegrip -side bottom -sticky se
}
ttk::style element create warning.Sizegrip.sizegrip image {pyimage139 }
ttk::style layout warning.TSizegrip {
warning.Sizegrip.sizegrip -side bottom -sticky se
}
ttk::style element create danger.Sizegrip.sizegrip image {pyimage140 }
ttk::style layout danger.TSizegrip {
danger.Sizegrip.sizegrip -side bottom -sticky se
}
ttk::style configure . -background #ffffff -darkcolor #ced4da -foreground #212529 -troughcolor #ffffff -selectbg #95a5a6 -selectfg #ffffff -selectforeground #ffffff -selectbackground #95a5a6 -fieldbg white -font {Helvetica 10} -borderwidth 1 -focuscolor {};
@bagnongithub , while it would take a little work, it's possible to modify the python script so that the image variables are given meaningful names that would correspond to and actual image file that could be saved into an assets folder along with the theme script. The only thing that would need to be added after that is the section of the tcl/tk script that loads all of the images and assigns them to variables that correspond to the file name (which should already be reflected in the tcl script that styles various widgets).
@bagnongithub , here's a sample of how you could go about modifying the script to generate tcl scripts for those widgets with images.... here's a simple example using the Separator.
The first thing I would do is generate the folders to contain the theme and assets by adding this into the StylerTTK.create_theme
method.
def create_theme(self):
"""
Create and style a new ttk theme. A wrapper around internal style methods.
"""
# create the theme directory if it doesn't exist
self.path = Path(f'themes/{self.theme.name}/assets')
self.path.mkdir(parents=True, exist_ok=True)
self.update_ttk_theme_settings()
self.style.theme_create(self.theme.name, 'clam', self.settings)
Append the following to the end of the StylerTTK.update_ttk_theme_settings
method:
script = ttk._script_from_settings(self.settings)
script_path = self.path.parent / f'{self.theme.name}.tcl'
script_path.write_text(script, encoding='utf-8')
Next, I would add some logic into the StylerTTK._style_separator
method to:
def _style_separator(self):
"""
Create style configuration for ttk separator: *ttk.Separator*. The default style for light will be border, but
dark will be primary, as this makes the most sense for general use. However, all other colors will be available
as well through styling.
The options available in this widget include:
- Separator.separator: orient, background
"""
# horizontal separator default
default_color = self.theme.colors.border if self.theme.type == 'light' else self.theme.colors.selectbg
h_im = Image.new('RGB', (40, 1))
draw = ImageDraw.Draw(h_im)
draw.rectangle([0, 0, 40, 1], fill=default_color)
# save the image to local storage and give it a meaningful name
h_im.save(self.path / 'hseparator.png')
self.theme_images['hseparator'] = ImageTk.PhotoImage(h_im, name='hseparator')
self.settings.update({
'Horizontal.Separator.separator': {
'element create': ('image', 'hseparator')},
'Horizontal.TSeparator': {
'layout': [
('Horizontal.Separator.separator', {'sticky': 'ew'})]}})
# horizontal separator variations
for color in self.theme.colors:
h_im = Image.new('RGB', (40, 1))
draw = ImageDraw.Draw(h_im)
draw.rectangle([0, 0, 40, 1], fill=self.theme.colors.get(color))
# save the image to local storage and give it a meaningful name
img_name = f'{color}_hseparator'
h_im.save(self.path / f'{img_name}.png')
self.theme_images[img_name] = ImageTk.PhotoImage(h_im, name=img_name)
self.settings.update({
f'{color}.Horizontal.Separator.separator': {
'element create': ('image', img_name)},
f'{color}.Horizontal.TSeparator': {
'layout': [
(f'{color}.Horizontal.Separator.separator', {'sticky': 'ew'})]}})
# vertical separator default
default_color = self.theme.colors.border if self.theme.type == 'light' else self.theme.colors.selectbg
v_im = Image.new('RGB', (1, 40))
draw = ImageDraw.Draw(v_im)
draw.rectangle([0, 0, 1, 40], fill=default_color)
# save the image to local storage and give it a meaningful name
v_im.save(self.path / 'veparator.png')
self.theme_images['vseparator'] = ImageTk.PhotoImage(v_im, name='vseparator')
self.settings.update({
'Vertical.Separator.separator': {
'element create': ('image', 'vseparator')},
'Vertical.TSeparator': {
'layout': [
('Vertical.Separator.separator', {'sticky': 'ns'})]}})
# vertical separator variations
for color in self.theme.colors:
v_im = Image.new('RGB', (1, 40))
draw = ImageDraw.Draw(v_im)
draw.rectangle([0, 0, 1, 40], fill=self.theme.colors.get(color))
# save the image to local storage, and give it a meaningful name
img_name = f'{color}_veparator'
v_im.save(self.path / f'{img_name}.png')
self.theme_images[img_name] = ImageTk.PhotoImage(v_im, name=img_name)
self.settings.update({
f'{color}.Vertical.Separator.separator': {
'element create': ('image', img_name)},
f'{color}.Vertical.TSeparator': {
'layout': [
(f'{color}.Vertical.Separator.separator', {'sticky': 'ns'})]}})
Now, all you need to do is iterate through the styles, to generate all the assets and scripts:
s = Style()
for theme in s._theme_definitions.keys():
s.theme_use(theme)
This produces the following results:
ttk::style element create Horizontal.Separator.separator image {hseparator }
ttk::style layout Horizontal.TSeparator {
Horizontal.Separator.separator -sticky ew
}
ttk::style element create primary.Horizontal.Separator.separator image {primary_hseparator }
ttk::style layout primary.Horizontal.TSeparator {
primary.Horizontal.Separator.separator -sticky ew
}
ttk::style element create secondary.Horizontal.Separator.separator image {secondary_hseparator }
ttk::style layout secondary.Horizontal.TSeparator {
secondary.Horizontal.Separator.separator -sticky ew
}
ttk::style element create success.Horizontal.Separator.separator image {success_hseparator }
ttk::style layout success.Horizontal.TSeparator {
success.Horizontal.Separator.separator -sticky ew
}
ttk::style element create info.Horizontal.Separator.separator image {info_hseparator }
ttk::style layout info.Horizontal.TSeparator {
info.Horizontal.Separator.separator -sticky ew
}
ttk::style element create warning.Horizontal.Separator.separator image {warning_hseparator }
ttk::style layout warning.Horizontal.TSeparator {
warning.Horizontal.Separator.separator -sticky ew
}
ttk::style element create danger.Horizontal.Separator.separator image {danger_hseparator }
ttk::style layout danger.Horizontal.TSeparator {
danger.Horizontal.Separator.separator -sticky ew
}
ttk::style element create Vertical.Separator.separator image {vseparator }
ttk::style layout Vertical.TSeparator {
Vertical.Separator.separator -sticky ns
}
ttk::style element create primary.Vertical.Separator.separator image {primary_veparator }
ttk::style layout primary.Vertical.TSeparator {
primary.Vertical.Separator.separator -sticky ns
}
ttk::style element create secondary.Vertical.Separator.separator image {secondary_veparator }
ttk::style layout secondary.Vertical.TSeparator {
secondary.Vertical.Separator.separator -sticky ns
}
ttk::style element create success.Vertical.Separator.separator image {success_veparator }
ttk::style layout success.Vertical.TSeparator {
success.Vertical.Separator.separator -sticky ns
}
ttk::style element create info.Vertical.Separator.separator image {info_veparator }
ttk::style layout info.Vertical.TSeparator {
info.Vertical.Separator.separator -sticky ns
}
ttk::style element create warning.Vertical.Separator.separator image {warning_veparator }
ttk::style layout warning.Vertical.TSeparator {
warning.Vertical.Separator.separator -sticky ns
}
ttk::style element create danger.Vertical.Separator.separator image {danger_veparator }
ttk::style layout danger.Vertical.TSeparator {
danger.Vertical.Separator.separator -sticky ns
}
You would need to fill in the gaps in the script, such as loading the images and giving them variable names, etc...
This is not how I'd setup the program if I were going to write it from scratch. But, it does show how you could modify the existing code to generate most of what you'd need, including the image assets.
If you just want to get it to work, there is also an easier way. After loading the theme into tkinter, run this script in th embedded Tc interpreter:
set imgs [image names]
foreach img $imgs { catch {$img write $img.png} }
You can do this via tk.eval(). This will give nonsensical image names, but it could be easily read back in a similar loop and does then not require to change the theme script.
Loading all files in a directory back into Tcl would then simply be
foreach img [glob -directory MyDir -tails *.png] {
set imgname [file rootname $img]
image create photo $imgname -file MyDir/$img
}
Because Python simply numbers all images in sequence, you'd need to load all themes at once, otherwise the image names would conflict.
I have (some) success with
import os
import tkinter
from ttkbootstrap import Style
root = tkinter.Tk()
theme_name = 'flatly'
out_path = f"{theme_name}-export"
s = Style(theme_name)
settings = s._theme_objects[theme_name].settings
script = tkinter.ttk._script_from_settings(settings)
os.makedirs(out_path, exist_ok=True)
with open(f'{out_path}/{theme_name}.tcl', 'w', encoding='utf-8') as f:
for image in tkinter.image_names():
if image.startswith("pyimage"):
f.write(f'image create photo {image} -file [file join [file dirname [info script]] {image}.png]\n')
root.call(image, 'write', f'{out_path}/{image}.png')
f.write(script)
When loading the created Tcl script, Tk complains about
-focuscolor {}
Checkbutton.indicator
in ttk::style element create Checkbutton.indicator ...
Would be nice to integrate this feature in ttkcreator. That way we could load a ttkbootstrap theme without importing Pillow at runtime
Here my contribution.
This code is working:
import os
import tkinter
from ttkbootstrap import Style
basedir = os.path.normpath(os.path.join(__file__, '../'))
themes_file = os.path.join(basedir, 'themes.json')
assert os.path.isfile(themes_file)
theme_name = 'minarca'
out_path = os.path.join(basedir, "export")
# Create output directory
os.makedirs(out_path, exist_ok=True)
fn = f'{out_path}/{theme_name}.tcl'
# Open ttkbootstrap
root = tkinter.Tk()
s = Style(theme_name, themes_file=themes_file, master=root)
settings = s._theme_objects[theme_name].settings
# Export settings
script = tkinter.ttk._script_from_settings(settings)
# Loop on image to export theme.
with open(fn, 'w', encoding='utf-8') as f:
for image in tkinter.image_names():
if image.startswith("pyimage"):
f.write(f'image create photo {image} -file [file join [file dirname [info script]] {image}.png]\n')
root.call(image, 'write', f'{out_path}/{image}.png')
f.write(f'ttk::style theme create {theme_name} -parent clam -settings {{')
f.write(script)
f.write(f'}}')
# Try loading the new theme.
root.destroy()
root = tkinter.Tk()
root.call('source', fn)
Them I'm able to load the style without ttkbootstrap at runtime like this:
s = ttk.Style(master=master)
s.tk.call('source', minarca_theme)
s.theme_use('minarca')
Hope it help
When I run the proposed code I get the following error:
Traceback (most recent call last):
File "...\themeBuilder.py", line 12, in <module>
settings = s._theme_objects[theme_name].settings
AttributeError: 'StyleBuilderTTK' object has no attribute 'settings'
I would love to be able to create TCL files that can later be applied as a theme. Can anyone help me get past this issue so I can create the .tcl?
I understand that the file might need some modifications, per previous comments, but I cant get this much to work to get me started.
The script worked but only with version <1.0 or something like that.
Too many changes were done after that to make it worked.
I was able to load the theme working on the tk side. I added the following to /usr/share/tk8.6/ttk/ttk.tcl
if { [file exist ttkdumper.tcl] } { source ttkdumper.tcl }
then i wrote the file ttkdumper.tcl as follow
rename ttk::style ttk::style_tk rename image image_tk close [open theme.tcl w] proc image { args } { set cmd [list image] set cmd [concat $cmd $args] set fd [open theme.tcl a] puts $fd $cmd close $fd image_tk {*}$args } proc ttk::style { args } { set cmd [list ttk::style] set cmd [concat $cmd $args] set fd [open theme.tcl a] puts $fd $cmd close $fd ttk::style_tk {*}$args }
Run ttkcreator. The result is a file theme.tcl that can be sourced in a standard tk application.
"The following TK style for Tkinker looks imho just amazing..."
https://groups.google.com/g/comp.lang.tcl/c/5IZBq5x1XUg
Would it be possible to export the styles to plain Tk?