diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2015-01-29 16:56:12 +0000 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2015-01-29 16:56:12 +0000 |
| commit | a26f08bb618d3af3e7509c4db8e7233ea515da08 (patch) | |
| tree | e80486ad481acd49718130ac43ea43f2bd7b666d /src/Fl_Menu.cxx | |
| parent | 01296095a672565ed8d1f6a6c5e999fa6d6b1ba7 (diff) | |
Use Fl::is_scheme() where appropriate.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10542 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Menu.cxx')
| -rw-r--r-- | src/Fl_Menu.cxx | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/Fl_Menu.cxx b/src/Fl_Menu.cxx index fd0017c38..7493087f2 100644 --- a/src/Fl_Menu.cxx +++ b/src/Fl_Menu.cxx @@ -3,7 +3,7 @@ // // Menu code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2010 by Bill Spitzak and others. +// Copyright 1998-2015 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -189,13 +189,11 @@ void Fl_Menu_Item::draw(int x, int y, int w, int h, const Fl_Menu_* m, int tW = (W - Fl::box_dw(FL_ROUND_DOWN_BOX)) / 2 + 1; if ((W - tW) & 1) tW++; // Make sure difference is even to center int td = (W - tW) / 2; - if (Fl::scheme()) { - if (!strcmp(Fl::scheme(), "gtk+")) { - fl_color(FL_SELECTION_COLOR); - tW --; - fl_pie(x + td + 1, y + d + td - 1, tW + 3, tW + 3, 0.0, 360.0); - fl_color(fl_color_average(FL_WHITE, FL_SELECTION_COLOR, 0.2f)); - } else fl_color(labelcolor_); + if (Fl::is_scheme("gtk+")) { + fl_color(FL_SELECTION_COLOR); + tW --; + fl_pie(x + td + 1, y + d + td - 1, tW + 3, tW + 3, 0.0, 360.0); + fl_color(fl_color_average(FL_WHITE, FL_SELECTION_COLOR, 0.2f)); } else fl_color(labelcolor_); switch (tW) { @@ -224,7 +222,7 @@ void Fl_Menu_Item::draw(int x, int y, int w, int h, const Fl_Menu_* m, break; } - if (Fl::scheme() && !strcmp(Fl::scheme(), "gtk+")) { + if (Fl::is_scheme("gtk+")) { fl_color(fl_color_average(FL_WHITE, FL_SELECTION_COLOR, 0.5)); fl_arc(x + td + 2, y + d + td, tW + 1, tW + 1, 60.0, 180.0); } @@ -232,7 +230,7 @@ void Fl_Menu_Item::draw(int x, int y, int w, int h, const Fl_Menu_* m, } else { fl_draw_box(FL_DOWN_BOX, x+2, y+d, W, W, FL_BACKGROUND2_COLOR); if (value()) { - if (Fl::scheme() && !strcmp(Fl::scheme(), "gtk+")) { + if (Fl::is_scheme("gtk+")) { fl_color(FL_SELECTION_COLOR); } else { fl_color(labelcolor_); |
