Synchronize all arrow colors and inactive drawing (#791)
This commit is contained in:
parent
e2c2ba7773
commit
33b601e574
@ -136,10 +136,10 @@ Fl_Input_Choice::InputMenuButton::InputMenuButton(int x,int y,int w,int h,const
|
|||||||
|
|
||||||
void Fl_Input_Choice::InputMenuButton::draw() {
|
void Fl_Input_Choice::InputMenuButton::draw() {
|
||||||
draw_box();
|
draw_box();
|
||||||
fl_color(active_r() ? labelcolor() : fl_inactive(labelcolor()));
|
Fl_Color arrow_color = parent()->active_r() ? parent()->labelcolor() : fl_inactive(parent()->labelcolor());
|
||||||
Fl_Rect ab(this);
|
Fl_Rect ab(this);
|
||||||
ab.inset(1);
|
ab.inset(1);
|
||||||
fl_draw_arrow(ab, FL_ARROW_CHOICE, FL_ORIENT_NONE, fl_color());
|
fl_draw_arrow(ab, FL_ARROW_CHOICE, FL_ORIENT_NONE, arrow_color);
|
||||||
if (Fl::focus() == this) draw_focus();
|
if (Fl::focus() == this) draw_focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -561,7 +561,7 @@ void menuwindow::drawentry(const Fl_Menu_Item* m, int n, int eraseit) {
|
|||||||
int x1 = xx + ww - sz - 2;
|
int x1 = xx + ww - sz - 2;
|
||||||
int y1 = yy + (hh-sz)/2 + 1;
|
int y1 = yy + (hh-sz)/2 + 1;
|
||||||
|
|
||||||
// draw an arrow whose style dependends on the active scheme
|
// draw an arrow whose style depends on the active scheme
|
||||||
fl_draw_arrow(Fl_Rect(x1, y1, sz, sz), FL_ARROW_SINGLE, FL_ORIENT_RIGHT, fl_color());
|
fl_draw_arrow(Fl_Rect(x1, y1, sz, sz), FL_ARROW_SINGLE, FL_ORIENT_RIGHT, fl_color());
|
||||||
|
|
||||||
} else if (m->shortcut_) {
|
} else if (m->shortcut_) {
|
||||||
|
@ -41,7 +41,7 @@ void Fl_Menu_Button::draw() {
|
|||||||
|
|
||||||
// draw the arrow (choice button)
|
// draw the arrow (choice button)
|
||||||
|
|
||||||
Fl_Color arrow_color = active_r() ? FL_DARK3 : fl_inactive(FL_DARK3);
|
Fl_Color arrow_color = active_r() ? labelcolor() : fl_inactive(labelcolor());
|
||||||
fl_draw_arrow(Fl_Rect(ax, ay, aw, ah), FL_ARROW_SINGLE, FL_ORIENT_DOWN, arrow_color);
|
fl_draw_arrow(Fl_Rect(ax, ay, aw, ah), FL_ARROW_SINGLE, FL_ORIENT_DOWN, arrow_color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,13 +132,14 @@ void Fl_Spinner::draw() {
|
|||||||
Fl_Group::draw();
|
Fl_Group::draw();
|
||||||
|
|
||||||
// draw up/down arrows over the button's empty labels
|
// draw up/down arrows over the button's empty labels
|
||||||
|
Fl_Color arrow_color = active_r() ? labelcolor() : fl_inactive(labelcolor());
|
||||||
Fl_Rect up(up_button_);
|
Fl_Rect up(up_button_);
|
||||||
up.inset(up_button_.box());
|
up.inset(up_button_.box());
|
||||||
fl_draw_arrow(up, FL_ARROW_SINGLE, FL_ORIENT_UP, labelcolor());
|
fl_draw_arrow(up, FL_ARROW_SINGLE, FL_ORIENT_UP, arrow_color);
|
||||||
|
|
||||||
Fl_Rect down(down_button_);
|
Fl_Rect down(down_button_);
|
||||||
down.inset(down_button_.box());
|
down.inset(down_button_.box());
|
||||||
fl_draw_arrow(down, FL_ARROW_SINGLE, FL_ORIENT_DOWN, labelcolor());
|
fl_draw_arrow(down, FL_ARROW_SINGLE, FL_ORIENT_DOWN, arrow_color);
|
||||||
}
|
}
|
||||||
|
|
||||||
int Fl_Spinner::handle(int event) {
|
int Fl_Spinner::handle(int event) {
|
||||||
|
@ -438,9 +438,10 @@ void Fl_Tabs::draw_overflow_menu_button() {
|
|||||||
X = x() + w() - H;
|
X = x() + w() - H;
|
||||||
Y = y() + h() - H - 1;
|
Y = y() + h() - H - 1;
|
||||||
}
|
}
|
||||||
fl_draw_box(box(), X, Y, H, H, color());
|
draw_box(box(), X, Y, H, H, color());
|
||||||
Fl_Rect r(X, Y, H, H);
|
Fl_Rect r(X, Y, H, H);
|
||||||
fl_draw_arrow(r, FL_ARROW_CHOICE, FL_ORIENT_NONE, fl_contrast(FL_BLACK, color()));
|
Fl_Color arrow_color = active_r() ? labelcolor() : fl_inactive(labelcolor());
|
||||||
|
fl_draw_arrow(r, FL_ARROW_CHOICE, FL_ORIENT_NONE, arrow_color);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user