summaryrefslogtreecommitdiff
path: root/src/Fl_get_system_colors.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2006-06-04 10:21:45 +0000
committerMatthias Melcher <fltk@matthiasm.com>2006-06-04 10:21:45 +0000
commit60ece00315eb46a6d4b42bc4243097e8d0c9bcc3 (patch)
treed77f080665c0ed9d98d403af6c78802fcba81588 /src/Fl_get_system_colors.cxx
parentc4b8afdcf9b9c8cca1eab0eb25fdfc508e7e6852 (diff)
OS X Quartz: one pretty essential fix to the call order in Quartz context change which fixed a lot of warnings. I also added a file that helps tremondously to debug Core Graphics calls. This file is not compiled into the source tree by default, but the annotations in "src/cgdebug.h" explain the usage.
In regard to CG Text drawing vs. the new ATSU Text drawing: I now remember why I did not ATSU in the beginning: STDU does not use the CG clipping area or text pen settings. So, if you plan on using the current SVN with --enable-quartz, please be aware that you will not have any text clipping or any other text color than black. Finally, I added code to FLTK on OS X that retreives the selection color from the system instead of assuming dark blue. I am not entirely confident about this change as it may require OS X 10.4 . Feedback appreciiated. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5173 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_get_system_colors.cxx')
-rw-r--r--src/Fl_get_system_colors.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Fl_get_system_colors.cxx b/src/Fl_get_system_colors.cxx
index 67a8802e9..24fae8714 100644
--- a/src/Fl_get_system_colors.cxx
+++ b/src/Fl_get_system_colors.cxx
@@ -165,10 +165,17 @@ void Fl::get_system_colors()
{
fl_open_display();
+ OSStatus err;
if (!fl_bg2_set) background2(0xff, 0xff, 0xff);
if (!fl_fg_set) foreground(0, 0, 0);
if (!fl_bg_set) background(0xd8, 0xd8, 0xd8);
- set_selection_color(0x00, 0x00, 0x80);
+
+ RGBColor c;
+ err = GetThemeBrushAsColor(kThemeBrushPrimaryHighlightColor, 24, true, &c);
+ if (err)
+ set_selection_color(0x00, 0x00, 0x80);
+ else
+ set_selection_color(c.red, c.green, c.blue);
}
#else