WebPositive: fix close tab button in dark mode
Change-Id: Id133626247b8a763d8befd87cc8db0a7048d1218 Reviewed-on: https://review.haiku-os.org/c/haiku/+/7935 Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
d404a2f036
commit
65de39a14b
@@ -623,19 +623,36 @@ WebTabView::_DrawCloseButton(BView* owner, BRect& frame,
|
|||||||
closeRect.bottom = closeRect.top + 6;
|
closeRect.bottom = closeRect.top + 6;
|
||||||
|
|
||||||
rgb_color base = ui_color(B_PANEL_BACKGROUND_COLOR);
|
rgb_color base = ui_color(B_PANEL_BACKGROUND_COLOR);
|
||||||
float tint = B_DARKEN_1_TINT;
|
|
||||||
|
float tint;
|
||||||
float isFront = ContainerView()->SelectedTab()
|
if (base.IsLight())
|
||||||
== static_cast<TabView*>(this);
|
tint = B_DARKEN_1_TINT;
|
||||||
if (!isFront) {
|
|
||||||
base = tint_color(base, tint);
|
|
||||||
tint *= 1.02;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fOverCloseRect)
|
|
||||||
tint *= 1.4;
|
|
||||||
else
|
else
|
||||||
tint *= 1.2;
|
tint = 0.50;
|
||||||
|
|
||||||
|
float isFront = ContainerView()->SelectedTab() == static_cast<TabView*>(this);
|
||||||
|
|
||||||
|
if (base.IsLight()){
|
||||||
|
if (!isFront) {
|
||||||
|
base = tint_color(base, tint);
|
||||||
|
tint *= 1.02;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fOverCloseRect)
|
||||||
|
tint *= 1.4;
|
||||||
|
else
|
||||||
|
tint *= 1.2;
|
||||||
|
} else {
|
||||||
|
if (!isFront) {
|
||||||
|
base = tint_color(base, tint);
|
||||||
|
tint *= 0.80;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fOverCloseRect)
|
||||||
|
tint *= 0.6;
|
||||||
|
else
|
||||||
|
tint *= 0.9;
|
||||||
|
}
|
||||||
|
|
||||||
if (fClicked && fOverCloseRect) {
|
if (fClicked && fOverCloseRect) {
|
||||||
// Draw the button frame
|
// Draw the button frame
|
||||||
|
|||||||
Reference in New Issue
Block a user