summaryrefslogtreecommitdiffstats
path: root/ds9
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2020-05-17 16:23:00 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2020-05-17 16:23:00 (GMT)
commit12ba409f04912879ec1b4dc6d8262d167f01c55e (patch)
treebf72ee02be3fb121d55a886c71dc877b574a6765 /ds9
parentda5cd2c322733904f67fca4a2314ea89b02f7bbf (diff)
downloadblt-12ba409f04912879ec1b4dc6d8262d167f01c55e.zip
blt-12ba409f04912879ec1b4dc6d8262d167f01c55e.tar.gz
blt-12ba409f04912879ec1b4dc6d8262d167f01c55e.tar.bz2
tweaks to themes
Diffstat (limited to 'ds9')
-rw-r--r--ds9/library/ds9.tcl17
-rw-r--r--ds9/library/prefsdialog.tcl14
2 files changed, 12 insertions, 19 deletions
diff --git a/ds9/library/ds9.tcl b/ds9/library/ds9.tcl
index 7545b21..cdb6dd1 100644
--- a/ds9/library/ds9.tcl
+++ b/ds9/library/ds9.tcl
@@ -224,7 +224,7 @@ switch $ds9(wm) {
# tkthemes
package require ttk::theme::aquativo
# package require ttk::theme::black
- package require ttk::theme::blue
+# package require ttk::theme::blue
package require ttk::theme::clearlooks
package require ttk::theme::elegance
# package require ttk::theme::itft1
@@ -233,7 +233,7 @@ switch $ds9(wm) {
package require ttk::theme::plastik
package require ttk::theme::radiance
# package require ttk::theme::smog
- package require ttk::theme::winxpblue
+# package require ttk::theme::winxpblue
# scidthemes
package require ttk::theme::scidthemes
@@ -260,20 +260,9 @@ switch $ds9(wm) {
set ds9(selectforeground) [ttk::style lookup . -selectforeground]
set ds9(selectbackground) [ttk::style lookup . -selectbackground]
- # fix TEntry/Treeview/TLabel widgets
+ # fix TLabel widgets
foreach tt [ttk::style theme names] {
ttk::style theme use $tt
- set fg [ttk::style lookup . -foreground]
- if {$fg == {}} {
- set fg $ds9(foreground)
- }
- set bg [ttk::style lookup . -background]
- if {$bg == {}} {
- set bg $ds9(background)
- }
- ttk::style configure TEntry -padding 1 \
- -fieldbackground $bg -background $bg -foreground $fg
- ttk::style configure Treeview -background $bg -fieldbackground $bg
ttk::style configure TLabel -borderwidth 2 -padding 1
}
ttk::style theme use default
diff --git a/ds9/library/prefsdialog.tcl b/ds9/library/prefsdialog.tcl
index b01d83a..c7b9286 100644
--- a/ds9/library/prefsdialog.tcl
+++ b/ds9/library/prefsdialog.tcl
@@ -266,16 +266,20 @@ proc PrefsDialogGeneral {} {
win32 {}
}
+ ttk::label $f.tnan -text [msgcat::mc {Blank/Inf/NaN Color}]
+ ColorMenuButton $f.nan pds9 nan PrefsNanColor
+
ttk::label $f.tbg -text [msgcat::mc {Background Color}]
ColorMenuButton $f.bg pds9 bg PrefsBgColor
- ttk::checkbutton $f.ubg -text [msgcat::mc {Use}] -variable pds9(bg,use) \
- -command PrefsBgColor
- ttk::label $f.tnan -text [msgcat::mc {Blank/Inf/NaN Color}]
- ColorMenuButton $f.nan pds9 nan PrefsNanColor
+ ttk::checkbutton $f.ubg -text \
+ [msgcat::mc {Use background color instead of theme color}] \
+ -variable pds9(bg,use) \
+ -command PrefsBgColor
- grid $f.tbg $f.bg $f.ubg -padx 2 -pady 2 -sticky w
grid $f.tnan $f.nan -padx 2 -pady 2 -sticky w
+ grid $f.tbg $f.bg -padx 2 -pady 2 -sticky w
+ grid $f.ubg - -padx 2 -pady 2 -sticky w
# Dialog Box
set f [ttk::labelframe $w.general.box -text [msgcat::mc {Dialog Box}]]