diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2019-03-22 21:11:22 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2019-03-22 21:11:22 (GMT) |
commit | ef0aaff5e62f47b4b5e3d9a6d2ececc098234ea5 (patch) | |
tree | 792b46c148240a7c72a1bc8994336c95060d9484 /ds9/library/ds9.tcl | |
parent | 736080723a58faec0035b9d61985537bd7215f18 (diff) | |
download | blt-ef0aaff5e62f47b4b5e3d9a6d2ececc098234ea5.zip blt-ef0aaff5e62f47b4b5e3d9a6d2ececc098234ea5.tar.gz blt-ef0aaff5e62f47b4b5e3d9a6d2ececc098234ea5.tar.bz2 |
add background color option
Diffstat (limited to 'ds9/library/ds9.tcl')
-rw-r--r-- | ds9/library/ds9.tcl | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/ds9/library/ds9.tcl b/ds9/library/ds9.tcl index 2153905..8d5878b 100644 --- a/ds9/library/ds9.tcl +++ b/ds9/library/ds9.tcl @@ -173,27 +173,34 @@ if {[catch {tk windowingsystem} ds9(wm)]} { set ds9(app) [file tail [info nameofexecutable]] # Themes are now hardcoded +# can't be defined in ds9def() +set ds9(background) #d9d9d9 +#set ds9(background) white + switch $ds9(wm) { x11 { - # set bg for non ttk widgets - set bg [ttk::style lookup "." -background] - # standard widgets - option add {*Text.Background} $bg - option add {*Listbox.Background} $bg - option add {*PlotBackground} $bg + option add {*background} $ds9(background) # ttk widgets - ttk::style configure TLabel -borderwidth 2 -padding 1 - ttk::style configure TEntry -fieldbackground $bg -padding 1 - } - aqua { - # set bg for non ttk widgets - set bg [ttk::style lookup "." -background] - - # standard widgets - option add {*PlotBackground} $bg + ttk::style configure TFrame -background $ds9(background) + ttk::style configure TLabelframe -background $ds9(background) + ttk::style configure TLabelframe.Label -background $ds9(background) + ttk::style configure TLabel -background $ds9(background) + ttk::style configure TEntry -fieldbackground $ds9(background) + ttk::style configure TButton -background $ds9(background) + ttk::style configure TCheckbutton -background $ds9(background) + ttk::style configure TRadiobutton -background $ds9(background) + ttk::style configure TMenubutton -background $ds9(background) + ttk::style configure TScale -background $ds9(background) + ttk::style configure TScrollbar -background $ds9(background) \ + -troughcolor $ds9(background) + ttk::style configure TProgressbar -troughcolor $ds9(background) + + ttk::style configure TEntry -padding 1 + ttk::style configure TLabel -borderwidth 2 -padding 1 } + aqua {} win32 {ttk::style theme use xpnative} } |