Selected tabs are now drawn slightly larger than unselected tabs
so they stand out more (STR #882) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4371 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
d47f353023
commit
db98aaac86
2
CHANGES
2
CHANGES
@ -2,6 +2,8 @@ CHANGES IN FLTK 1.1.7
|
||||
|
||||
- Documentation fixes (STR #648, STR #692, STR #730, STR
|
||||
#744, STR #745)
|
||||
- Selected tabs are now drawn slightly larger than
|
||||
unselected tabs so they stand out more (STR #882)
|
||||
- FL_PLASTIC_DOWN_BOX drew with artifacts (STR #852)
|
||||
- Changed initializations on WIN32 (STR #862)
|
||||
- Fl_Preferences::getUserdataPath() didn't work for
|
||||
|
@ -281,6 +281,9 @@ void Fl_Tabs::draw_tab(int x1, int x2, int W, int H, Fl_Widget* o, int what) {
|
||||
int dh = Fl::box_dh(box());
|
||||
int dy = Fl::box_dy(box());
|
||||
|
||||
// compute offsets to make selected tab look bigger
|
||||
int yofs = sel ? 0 : BORDER;
|
||||
|
||||
if ((x2 < x1+W) && what == RIGHT) x1 = x2 - W;
|
||||
|
||||
if (H >= 0) {
|
||||
@ -291,14 +294,14 @@ 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 + 10, c);
|
||||
draw_box(box(), x1, y() + yofs, W, H + 10 - yofs, c);
|
||||
|
||||
// Save the previous label color
|
||||
Fl_Color oc = o->labelcolor();
|
||||
|
||||
// Draw the label using the current color...
|
||||
o->labelcolor(sel ? labelcolor() : o->labelcolor());
|
||||
o->draw_label(x1, y(), W, H, FL_ALIGN_CENTER);
|
||||
o->draw_label(x1, y() + yofs, W, H - yofs, FL_ALIGN_CENTER);
|
||||
|
||||
// Restore the original label color...
|
||||
o->labelcolor(oc);
|
||||
@ -317,14 +320,14 @@ 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 - 10, W, H + 10, c);
|
||||
draw_box(box(), x1, y() + h() - H - 10, W, H + 10 - yofs, c);
|
||||
|
||||
// Save the previous label color
|
||||
Fl_Color oc = o->labelcolor();
|
||||
|
||||
// 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);
|
||||
o->draw_label(x1, y() + h() - H, W, H - yofs, FL_ALIGN_CENTER);
|
||||
|
||||
// Restore the original label color...
|
||||
o->labelcolor(oc);
|
||||
|
Loading…
x
Reference in New Issue
Block a user