diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2005-05-19 12:13:35 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2005-05-19 12:13:35 +0000 |
| commit | 296efbe0929b4d3f7676d5eac62c3a13ba31de1a (patch) | |
| tree | cbea02a1d704fa5c79ddf91a8ed236ca4b3acce6 /src/Fl_Tabs.cxx | |
| parent | 6f946ecfc55a5dee1571c72aae93b086c06370b3 (diff) | |
Update Fl_Tabs to draw selected tabs using labelcolor() of the Fl_Tabs
widget instead of using fl_contrast.
Draw round plastic buttons round...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4357 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Tabs.cxx')
| -rw-r--r-- | src/Fl_Tabs.cxx | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/Fl_Tabs.cxx b/src/Fl_Tabs.cxx index e046ef16e..dc75c064f 100644 --- a/src/Fl_Tabs.cxx +++ b/src/Fl_Tabs.cxx @@ -288,16 +288,13 @@ void Fl_Tabs::draw_tab(int x1, int x2, int W, int H, Fl_Widget* o, int what) { Fl_Color c = sel ? selection_color() : o->selection_color(); - draw_box(box(), x1, y(), W, H, c); - - // Make sure that the label contrasts the tab color... - c = fl_contrast(o->labelcolor(), c); + draw_box(box(), x1, y(), W, H + 10, c); // Save the previous label color Fl_Color oc = o->labelcolor(); - // Draw the label using the contrast color... - o->labelcolor(c); + // Draw the label using the current color... + o->labelcolor(sel ? labelcolor() : o->labelcolor()); o->draw_label(x1, y(), W, H, FL_ALIGN_CENTER); // Restore the original label color... @@ -317,16 +314,13 @@ void Fl_Tabs::draw_tab(int x1, int x2, int W, int H, Fl_Widget* o, int what) { Fl_Color c = sel ? selection_color() : o->selection_color(); - draw_box(box(), x1, y() + h() - H, W, H, c); - - // Make sure that the label contrasts the tab color... - c = fl_contrast(o->labelcolor(), c); + draw_box(box(), x1, y() + h() - H - 10, W, H + 10, c); // Save the previous label color Fl_Color oc = o->labelcolor(); - // Draw the label using the contrast color... - o->labelcolor(c); + // Draw the label using the current color... + o->labelcolor(sel ? labelcolor() : o->labelcolor()); o->draw_label(x1, y() + h() - H, W, H, FL_ALIGN_CENTER); // Restore the original label color... |
