HaikuControlLook: Fix ArrowShape color for Scrollbar buttons

Previously this would simply tint the passed in background color.
After hrev58595 this was changed to pass the proper Foreground color instead.

The codepath to disable/enable the color was missed in an oversight,
this puts back the original tint color for the foreground aswell.

Fixes: #19406

Change-Id: I6f75d24316e8ca3ecdb78f11fc8dede88f082780
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8958
Tested-by: Commit checker robot <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
Pascal Abresch
2025-02-10 16:51:27 +00:00
committed by waddlesplash
parent b6987eac0c
commit e911918d38
+3 -3
View File
@@ -628,13 +628,13 @@ HaikuControlLook::DrawScrollBarButton(BView* view, BRect rect,
bool isEnabled = (flags & B_DISABLED) == 0;
rgb_color buttonColor = isEnabled ? base
: tint_color(base, B_LIGHTEN_1_TINT);
rgb_color buttonColor = isEnabled ? base : tint_color(base, B_LIGHTEN_1_TINT);
DrawButtonBackground(view, rect, updateRect, buttonColor, flags,
BControlLook::B_ALL_BORDERS, orientation);
rect.InsetBy(-1, -1);
DrawArrowShape(view, rect, updateRect, text, direction, flags, 1);
rgb_color textColor = isEnabled ? text : tint_color(text, B_LIGHTEN_1_TINT);
DrawArrowShape(view, rect, updateRect, textColor, direction, flags, 1);
// revert clipping constraints
view->PopState();