diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2019-10-23 21:32:44 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2019-10-23 21:32:44 (GMT) |
commit | 02c78267227b5c3c9e7c93f8df28008109c0c397 (patch) | |
tree | ae88050ff911e594314de7ccf35cc4933fff1f9a /tksao/colorbar | |
parent | 0d38c1909215ac02259dec25a427eff2d2413cd9 (diff) | |
download | blt-02c78267227b5c3c9e7c93f8df28008109c0c397.zip blt-02c78267227b5c3c9e7c93f8df28008109c0c397.tar.gz blt-02c78267227b5c3c9e7c93f8df28008109c0c397.tar.bz2 |
colorbar MacOS darkmode
Diffstat (limited to 'tksao/colorbar')
-rw-r--r-- | tksao/colorbar/colorbarbase.C | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/tksao/colorbar/colorbarbase.C b/tksao/colorbar/colorbarbase.C index 1eb7708..825069a 100644 --- a/tksao/colorbar/colorbarbase.C +++ b/tksao/colorbar/colorbarbase.C @@ -293,11 +293,11 @@ int ColorbarBase::updatePixmap(const BBox& bb) // assume if no pixmap, no xmap // bb is in canvas coords - // MacOS will generate an Expose event (dark mode), so need to update - //#ifndef MAC_OSX_TK + // MacOS will generate an Expose event (dark mode), so need to update anyways + #ifndef MAC_OSX_TK if (pixmap) return TCL_OK; - //#endif + #endif ColorbarBaseOptions* opts = (ColorbarBaseOptions*)options; @@ -309,7 +309,6 @@ int ColorbarBase::updatePixmap(const BBox& bb) if (!gridGC_) gridGC_ = XCreateGC(display, Tk_WindowId(tkwin), 0, NULL); - cerr << "updatePixmap" << endl; if (!pixmap) { if (!(pixmap = Tk_GetPixmap(display, Tk_WindowId(tkwin), options->width, options->height, depth))) { @@ -325,22 +324,24 @@ int ColorbarBase::updatePixmap(const BBox& bb) XFillRectangle(display, pixmap, widgetGC, 0, 0, options->width,options->height); - if (!opts->orientation) { - if (!(xmap = XGetImage(display, pixmap, 1, 1, - options->width-2, - opts->size-2, - AllPlanes, ZPixmap))){ - internalError("Colorbar: Unable to Create XImage"); - return TCL_OK; + if (!xmap) { + if (!opts->orientation) { + if (!(xmap = XGetImage(display, pixmap, 1, 1, + options->width-2, + opts->size-2, + AllPlanes, ZPixmap))){ + internalError("Colorbar: Unable to Create XImage"); + return TCL_OK; + } } - } - else { - if (!(xmap = XGetImage(display, pixmap, 1, 1, - opts->size-2, - options->height-2, - AllPlanes, ZPixmap))){ - internalError("Colorbar: Unable to Create XImage"); - return TCL_OK; + else { + if (!(xmap = XGetImage(display, pixmap, 1, 1, + opts->size-2, + options->height-2, + AllPlanes, ZPixmap))){ + internalError("Colorbar: Unable to Create XImage"); + return TCL_OK; + } } } |