HaikuControlLook: don't modify menu color before applying it
Change-Id: I31838d4c17d4616c2c166197596a93bf51785677 Reviewed-on: https://review.haiku-os.org/c/haiku/+/3410 Reviewed-by: Jérôme Duval <[email protected]>
This commit is contained in:
committed by
Adrien Destugues
parent
1897036191
commit
ff21b4c370
@@ -298,19 +298,16 @@ HaikuControlLook::DrawMenuBackground(BView* view, BRect& rect,
|
|||||||
if (!rect.IsValid() || !rect.Intersects(updateRect))
|
if (!rect.IsValid() || !rect.Intersects(updateRect))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// surface top color
|
|
||||||
rgb_color background = tint_color(base, 0.75);
|
|
||||||
|
|
||||||
// inner bevel colors
|
// inner bevel colors
|
||||||
rgb_color bevelLightColor;
|
rgb_color bevelLightColor;
|
||||||
rgb_color bevelShadowColor;
|
rgb_color bevelShadowColor;
|
||||||
|
|
||||||
if ((flags & B_DISABLED) != 0) {
|
if ((flags & B_DISABLED) != 0) {
|
||||||
bevelLightColor = tint_color(background, 0.80);
|
bevelLightColor = tint_color(base, 0.80);
|
||||||
bevelShadowColor = tint_color(background, 1.07);
|
bevelShadowColor = tint_color(base, 1.07);
|
||||||
} else {
|
} else {
|
||||||
bevelLightColor = tint_color(background, 0.6);
|
bevelLightColor = tint_color(base, 0.6);
|
||||||
bevelShadowColor = tint_color(background, 1.12);
|
bevelShadowColor = tint_color(base, 1.12);
|
||||||
}
|
}
|
||||||
|
|
||||||
// draw inner bevel
|
// draw inner bevel
|
||||||
@@ -320,7 +317,7 @@ HaikuControlLook::DrawMenuBackground(BView* view, BRect& rect,
|
|||||||
borders);
|
borders);
|
||||||
|
|
||||||
// draw surface top
|
// draw surface top
|
||||||
view->SetHighColor(background);
|
view->SetHighColor(base);
|
||||||
view->FillRect(rect);
|
view->FillRect(rect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user