diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2020-04-27 19:01:35 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2020-04-27 19:01:35 (GMT) |
commit | dbe966897e2d6f3772d7bc95ca8726ca7627237c (patch) | |
tree | 07452b369c5bafb3eb61f762fac5d83fb7cfb3b4 /ds9 | |
parent | b71d24fcb5f0e9ba57fe2e729ea54d9fd6131e09 (diff) | |
download | blt-dbe966897e2d6f3772d7bc95ca8726ca7627237c.zip blt-dbe966897e2d6f3772d7bc95ca8726ca7627237c.tar.gz blt-dbe966897e2d6f3772d7bc95ca8726ca7627237c.tar.bz2 |
more theme
Diffstat (limited to 'ds9')
-rw-r--r-- | ds9/library/colorbar.tcl | 8 | ||||
-rw-r--r-- | ds9/library/ds9.tcl | 1 | ||||
-rw-r--r-- | ds9/library/frame.tcl | 5 | ||||
-rw-r--r-- | ds9/library/layout.tcl | 9 | ||||
-rw-r--r-- | ds9/library/magnifier.tcl | 6 | ||||
-rw-r--r-- | ds9/library/panner.tcl | 6 | ||||
-rw-r--r-- | ds9/library/prefsdialog.tcl | 4 | ||||
-rw-r--r-- | ds9/library/util.tcl | 2 |
8 files changed, 27 insertions, 14 deletions
diff --git a/ds9/library/colorbar.tcl b/ds9/library/colorbar.tcl index 632fe4e..14d725d 100644 --- a/ds9/library/colorbar.tcl +++ b/ds9/library/colorbar.tcl @@ -71,8 +71,8 @@ proc CreateColorbar {} { -helvetica $ds9(helvetica) \ -courier $ds9(courier) \ -times $ds9(times) \ - -fg $ds9(foreground) \ - -bg $ds9(background) + -fg [ThemeForeground] \ + -bg [ThemeBackground] $ds9(canvas) bind colorbar <Motion> [list ColorbarMotion %x %y] $ds9(canvas) bind colorbar <Enter> [list ColorbarEnter %x %y] @@ -96,8 +96,8 @@ proc CreateColorbar {} { -helvetica $ds9(helvetica) \ -courier $ds9(courier) \ -times $ds9(times) \ - -fg $ds9(foreground) \ - -bg $ds9(background) + -fg [ThemeForeground] \ + -bg [ThemeBackground] $ds9(canvas) bind colorbarrgb <Motion> [list ColorbarMotion %x %y] $ds9(canvas) bind colorbarrgb <Enter> [list ColorbarEnter %x %y] diff --git a/ds9/library/ds9.tcl b/ds9/library/ds9.tcl index 5b2ec5d..1e517bd 100644 --- a/ds9/library/ds9.tcl +++ b/ds9/library/ds9.tcl @@ -143,6 +143,7 @@ proc DS9Def {} { set pds9(prec,angle) 8 set pds9(bg) white + set pds9(bg,use) 0 set pds9(nan) white set pds9(samp) 1 diff --git a/ds9/library/frame.tcl b/ds9/library/frame.tcl index 351a180..a1c1934 100644 --- a/ds9/library/frame.tcl +++ b/ds9/library/frame.tcl @@ -114,8 +114,8 @@ proc CreateNameNumberFrame {which type} { -helvetica $ds9(helvetica) \ -courier $ds9(courier) \ -times $ds9(times) \ - -fg $ds9(foreground) \ - -bg $ds9(background) + -fg [ThemeForeground] \ + -bg [ThemeBackground] $ds9(next) threads $ds9(threads) @@ -145,6 +145,7 @@ proc CreateNameNumberFrame {which type} { $pds9(prec,angle) $ds9(next) bg color $pds9(bg) + $ds9(next) bg color $pds9(bg,use) $ds9(next) nan color $pds9(nan) $ds9(next) iraf align $pds9(iraf) diff --git a/ds9/library/layout.tcl b/ds9/library/layout.tcl index fb2ea4e..bae587c 100644 --- a/ds9/library/layout.tcl +++ b/ds9/library/layout.tcl @@ -120,7 +120,7 @@ proc CreateCanvas {} { set ds9(image) [ttk::frame $ds9(main).f] set ds9(canvas) [canvas $ds9(image).c -width $ww -height $hh \ -highlightthickness 0 -insertofftime 0 \ - -bg $ds9(background) \ + -bg [ThemeBackground] \ ] grid rowconfigure $ds9(image) 0 -weight 1 grid columnconfigure $ds9(image) 0 -weight 1 @@ -154,6 +154,8 @@ proc CreateCanvas {} { } proc ThemeConfigCanvas {w} { + global ds9 + $w configure -bg [ThemeBackground] $w itemconfigure colorbar -fg [ThemeForeground] @@ -161,6 +163,11 @@ proc ThemeConfigCanvas {w} { $w itemconfigure colorbarrgb -fg [ThemeForeground] $w itemconfigure colorbarrgb -bg [ThemeBackground] + + foreach ff $ds9(frames) { + $w itemconfigure $ff -fg [ThemeForeground] + $w itemconfigure $ff -bg [ThemeBackground] + } } proc ThemeConfigCanvasBottom {w} { diff --git a/ds9/library/magnifier.tcl b/ds9/library/magnifier.tcl index 590da3b..98e9141 100644 --- a/ds9/library/magnifier.tcl +++ b/ds9/library/magnifier.tcl @@ -16,7 +16,7 @@ proc CreateMagnifier {} { -highlightthickness 0 \ -insertofftime 0 \ -takefocus 0 \ - -bg $ds9(background) \ + -bg [ThemeBackground] \ ] $ds9(magnifier) create magnifier$ds9(visual) \ @@ -27,8 +27,8 @@ proc CreateMagnifier {} { -helvetica $ds9(helvetica) \ -courier $ds9(courier) \ -times $ds9(times) \ - -fg $ds9(foreground) \ - -bg $ds9(background) + -fg [ThemeForeground] \ + -bg [ThemeBackground] switch $ds9(wm) { x11 {bind $ds9(magnifier) <<ThemeChanged>> {ThemeConfigMagnifier %W}} diff --git a/ds9/library/panner.tcl b/ds9/library/panner.tcl index d326f1e..7e1174e 100644 --- a/ds9/library/panner.tcl +++ b/ds9/library/panner.tcl @@ -15,7 +15,7 @@ proc CreatePanner {} { -highlightthickness 0 \ -insertofftime 0 \ -takefocus 0 \ - -bg $ds9(background) \ + -bg [ThemeBackground] \ ] $ds9(panner) create panner$ds9(visual) \ @@ -26,8 +26,8 @@ proc CreatePanner {} { -helvetica $ds9(helvetica) \ -courier $ds9(courier) \ -times $ds9(times) \ - -fg $ds9(foreground) \ - -bg $ds9(background) + -fg [ThemeForeground] \ + -bg [ThemeBackground] switch $ds9(wm) { x11 {bind $ds9(panner) <<ThemeChanged>> {ThemeConfigPanner %W}} diff --git a/ds9/library/prefsdialog.tcl b/ds9/library/prefsdialog.tcl index 59299ad..71c8525 100644 --- a/ds9/library/prefsdialog.tcl +++ b/ds9/library/prefsdialog.tcl @@ -268,11 +268,13 @@ proc PrefsDialogGeneral {} { 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 - grid $f.tbg $f.bg -padx 2 -pady 2 -sticky w + grid $f.tbg $f.bg $f.ubg -padx 2 -pady 2 -sticky w grid $f.tnan $f.nan -padx 2 -pady 2 -sticky w # Dialog Box diff --git a/ds9/library/util.tcl b/ds9/library/util.tcl index 1a56bdf..840dd2c 100644 --- a/ds9/library/util.tcl +++ b/ds9/library/util.tcl @@ -1088,6 +1088,7 @@ proc PrefsBgColor {} { foreach ff $ds9(frames) { $ff bg color $pds9(bg) + $ff bg color $pds9(bg,use) } } @@ -1412,6 +1413,7 @@ proc DS9Backup {ch which} { puts $ch "$which precision $pds9(prec,linear) $pds9(prec,deg) $pds9(prec,hms) $pds9(prec,dms) $pds9(prec,len,linear) $pds9(prec,len,deg) $pds9(prec,len,arcmin) $pds9(prec,len,arcsec) $pds9(prec,angle)" puts $ch "$which bg color $pds9(bg)" + puts $ch "$which bg color $pds9(bg,use)" puts $ch "$which nan color $pds9(nan)" } |