diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2019-10-22 20:20:30 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2019-10-22 20:20:30 (GMT) |
commit | 8c008b244bebfe734053259cdcd2469cfec726a6 (patch) | |
tree | 03c0849b4d14f3ad5549cbddd09b7d554428d075 | |
parent | b225ed6764b84b8e0125eff9f90f03de9be4997b (diff) | |
download | blt-8c008b244bebfe734053259cdcd2469cfec726a6.zip blt-8c008b244bebfe734053259cdcd2469cfec726a6.tar.gz blt-8c008b244bebfe734053259cdcd2469cfec726a6.tar.bz2 |
support darkmode MacOS
-rw-r--r-- | ds9/library/print.tcl | 15 | ||||
-rw-r--r-- | tksao/colorbar/cbgrid.C | 2 |
2 files changed, 13 insertions, 4 deletions
diff --git a/ds9/library/print.tcl b/ds9/library/print.tcl index 561c677..251f0e6 100644 --- a/ds9/library/print.tcl +++ b/ds9/library/print.tcl @@ -152,6 +152,7 @@ proc PostScript {} { } } + # delete bg $ds9(canvas) delete $bg } @@ -172,11 +173,18 @@ proc EPS {fn} { set level 2 set resolution 72 - set options {} - # Page size set width [winfo width $ds9(canvas)] set height [winfo height $ds9(canvas)] + + # create a bg + set cc [$ds9(canvas) cget -background] + set bg [$ds9(canvas) create rectangle 0 0 $width $height \ + -fill $cc -outline $cc] + $ds9(canvas) lower $bg 1 + + set options { -colormode color} + append options " -pagex 0 -pagey 0 -pageanchor sw" if ($width>$height) { append options " -pagewidth $width" @@ -207,6 +215,9 @@ proc EPS {fn} { if {[catch {eval $ds9(canvas) postscript $options} rr]} { Error "[msgcat::mc {A postscript generation error has occurred}] $rr" } + + # delete bg + $ds9(canvas) delete $bg } proc PostScriptPageSize {xx yy ww hh unit optname} { diff --git a/tksao/colorbar/cbgrid.C b/tksao/colorbar/cbgrid.C index 3c029d8..4d17cda 100644 --- a/tksao/colorbar/cbgrid.C +++ b/tksao/colorbar/cbgrid.C @@ -24,8 +24,6 @@ CBGrid::CBGrid(Widget* p, int cc, double* ll) str << "Grid=0, DrawAxes=0, MinTickLen(1)=0, MinTickLen(2)=0, Width(ticks)=.5, Style(ticks)=0, Border=1, Width(border)=.5, Style(border)=0, Labelling=exterior, Colour(numlab)=0, TextLab=0, DrawTitle=0"; str << ", Colour(ticks)=0, Colour(border)=0"; - // str << ", Colour(ticks)=" << opts->fgColor->pixel - // << ", Colour(border)=" << opts->fgColor->pixel; if (!opts->orientation) { // horizontal |