Deskbar: Made expander knobs light when menu background is dark

Change-Id: I56a2fe1d4b1ce66476077e96e64066bf2950b4b4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1846
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
This commit is contained in:
Mikael Konradsson 2019-09-07 11:32:22 +00:00 committed by Stephan Aßmus
parent 0fe6734183
commit 9a9f4ef578
1 changed files with 10 additions and 2 deletions

View File

@ -308,9 +308,17 @@ TTeamMenuItem::DrawExpanderArrow()
rect.OffsetTo(BPoint(frame.right - rect.Width(), rect.OffsetTo(BPoint(frame.right - rect.Width(),
ContentLocation().y + ((frame.Height() - rect.Height()) / 2))); ContentLocation().y + ((frame.Height() - rect.Height()) / 2)));
float colorTint = B_DARKEN_3_TINT;
rgb_color bgColor = ui_color(B_MENU_BACKGROUND_COLOR);
if (bgColor.red + bgColor.green + bgColor.blue <= 128 * 3) {
colorTint = B_LIGHTEN_2_TINT;
}
be_control_look->DrawArrowShape(menu, rect, rect, be_control_look->DrawArrowShape(menu, rect, rect,
ui_color(B_MENU_BACKGROUND_COLOR), fArrowDirection, 0, bgColor, fArrowDirection, 0,
B_DARKEN_3_TINT); colorTint);
} }