From e911918d38f5b4b8a31d33e3100cee748f6df65a Mon Sep 17 00:00:00 2001 From: Pascal Abresch Date: Sun, 9 Feb 2025 13:32:04 +0100 Subject: [PATCH] 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 Haiku-Format: Haiku-format Bot Reviewed-by: waddlesplash --- src/kits/interface/HaikuControlLook.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/kits/interface/HaikuControlLook.cpp b/src/kits/interface/HaikuControlLook.cpp index faa6e2c685..c15f261751 100644 --- a/src/kits/interface/HaikuControlLook.cpp +++ b/src/kits/interface/HaikuControlLook.cpp @@ -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();