From e5d533fda53d58d8a90d5d242d6567dc34d94572 Mon Sep 17 00:00:00 2001 From: Mikael Konradsson Date: Thu, 12 Sep 2019 12:49:29 +0000 Subject: [PATCH] OutLineListView: adjust color of expander arrow when using dark color scheme Change-Id: I7de7a460111556b7f40565ed0a6110c1f7660a25 Reviewed-on: https://review.haiku-os.org/c/haiku/+/1847 Reviewed-by: Adrien Destugues --- src/kits/interface/OutlineListView.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/kits/interface/OutlineListView.cpp b/src/kits/interface/OutlineListView.cpp index 0186c8e686..7cc121c69d 100644 --- a/src/kits/interface/OutlineListView.cpp +++ b/src/kits/interface/OutlineListView.cpp @@ -890,7 +890,7 @@ BOutlineListView::ExpandOrCollapse(BListItem* item, bool expand) // adjust the indexes to correspond to their new visible positions fFirstSelected -= count; fLastSelected -= count; - } + } int32 maxIndex = fList.CountItems() - 1; if (fFirstSelected > maxIndex) @@ -931,8 +931,13 @@ BOutlineListView::DrawLatch(BRect itemRect, int32 level, bool collapsed, int32 arrowDirection = collapsed ? BControlLook::B_RIGHT_ARROW : BControlLook::B_DOWN_ARROW; + float tintColor = B_DARKEN_4_TINT; + if (base.red + base.green + base.blue <= 128 * 3) { + tintColor = B_LIGHTEN_2_TINT; + } + be_control_look->DrawArrowShape(this, latchRect, itemRect, base, - arrowDirection, 0, B_DARKEN_4_TINT); + arrowDirection, 0, tintColor); }