diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2015-07-09 00:10:44 +0000 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2015-07-09 00:10:44 +0000 |
| commit | 4cea3aee0c4153c7b7c2fc485b2e4ef37cbd3f19 (patch) | |
| tree | adfb3257a8138daed5ebd1319b50340017b04afd /src/fl_round_box.cxx | |
| parent | 349f32693398b57d4273f4a6abed9bd9db5d4e56 (diff) | |
Fix box background drawing for deactivated widgets (STR #2907).
Two new static methods have been introduced:
- Fl::box_color(Fl_Color c) returns the bg color dependent on the
widget's state (inactive_r()).
- Fl::set_box_color(Fl_Color c) sets the correct bg color dependent
on the widget's state by calling fl_color(Fl::box_color(c)).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10781 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/fl_round_box.cxx')
| -rw-r--r-- | src/fl_round_box.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fl_round_box.cxx b/src/fl_round_box.cxx index e31a8c26f..4adbfccb7 100644 --- a/src/fl_round_box.cxx +++ b/src/fl_round_box.cxx @@ -75,7 +75,7 @@ extern const uchar* fl_gray_ramp(); void fl_round_down_box(int x, int y, int w, int h, Fl_Color bgcolor) { const uchar *g = fl_gray_ramp(); - draw(FILL, x, y, w, h, 2, bgcolor); + draw(FILL, x, y, w, h, 2, Fl::box_color(bgcolor)); draw(UPPER_LEFT, x+1, y, w-2, h, 0, (Fl_Color)g[(int)'N']); draw(UPPER_LEFT, x+1, y, w-2, h, 1, (Fl_Color)g[(int)'H']); draw(UPPER_LEFT, x, y, w, h, 0, (Fl_Color)g[(int)'N']); @@ -89,7 +89,7 @@ void fl_round_down_box(int x, int y, int w, int h, Fl_Color bgcolor) { void fl_round_up_box(int x, int y, int w, int h, Fl_Color bgcolor) { const uchar *g = fl_gray_ramp(); - draw(FILL, x, y, w, h, 2, bgcolor); + draw(FILL, x, y, w, h, 2, Fl::box_color(bgcolor)); draw(LOWER_RIGHT, x+1, y, w-2, h, 0, (Fl_Color)g[(int)'H']); draw(LOWER_RIGHT, x+1, y, w-2, h, 1, (Fl_Color)g[(int)'N']); draw(LOWER_RIGHT, x, y, w, h, 1, (Fl_Color)g[(int)'H']); |
