summaryrefslogtreecommitdiff
path: root/src/fl_rounded_box.cxx
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2015-07-09 00:10:44 +0000
committerAlbrecht Schlosser <albrechts.fltk@online.de>2015-07-09 00:10:44 +0000
commit4cea3aee0c4153c7b7c2fc485b2e4ef37cbd3f19 (patch)
treeadfb3257a8138daed5ebd1319b50340017b04afd /src/fl_rounded_box.cxx
parent349f32693398b57d4273f4a6abed9bd9db5d4e56 (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_rounded_box.cxx')
-rw-r--r--src/fl_rounded_box.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/fl_rounded_box.cxx b/src/fl_rounded_box.cxx
index 44fa5c9f7..17cc9de81 100644
--- a/src/fl_rounded_box.cxx
+++ b/src/fl_rounded_box.cxx
@@ -46,15 +46,18 @@ static void rbox(int fill, int x, int y, int w, int h) {
}
static void fl_rflat_box(int x, int y, int w, int h, Fl_Color c) {
- fl_color(c); rbox(1, x, y, w, h); rbox(0, x, y, w, h);
+ Fl::set_box_color(c);
+ rbox(1, x, y, w, h); rbox(0, x, y, w, h);
}
static void fl_rounded_frame(int x, int y, int w, int h, Fl_Color c) {
- fl_color(c); rbox(0, x, y, w, h);
+ Fl::set_box_color(c);
+ rbox(0, x, y, w, h);
}
static void fl_rounded_box(int x, int y, int w, int h, Fl_Color c) {
- fl_color(c); rbox(1, x, y, w, h);
+ Fl::set_box_color(c);
+ rbox(1, x, y, w, h);
fl_color(FL_BLACK); rbox(0, x, y, w, h);
}