From 13d645a0feae6cc36f9c8b5f293e3050fa3cd020 Mon Sep 17 00:00:00 2001 From: John Scipione Date: Mon, 17 Feb 2025 15:19:21 -0500 Subject: [PATCH] Tracker: Set read-only low color on ColumnResize() Change-Id: I6344d7e3e6363da068b8b5ede818c01070c7484c Reviewed-on: https://review.haiku-os.org/c/haiku/+/8998 Tested-by: Commit checker robot Reviewed-by: waddlesplash --- src/kits/tracker/PoseView.cpp | 10 +++++++++- src/kits/tracker/TitleView.cpp | 4 ++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/kits/tracker/PoseView.cpp b/src/kits/tracker/PoseView.cpp index bdad506a51..d4530411cd 100644 --- a/src/kits/tracker/PoseView.cpp +++ b/src/kits/tracker/PoseView.cpp @@ -9196,7 +9196,10 @@ BPoseView::ColumnRedraw(BRect updateRect) updateRegion.Set(updateRect); ConstrainClippingRegion(&updateRegion); offscreenView->SetDrawingMode(B_OP_COPY); - offscreenView->SetLowColor(LowColor()); + if (!TargetVolumeIsReadOnly()) + offscreenView->SetLowUIColor(LowUIColor()); + else + offscreenView->SetLowUIColor(LowUIColor(), ReadOnlyTint(LowUIColor())); for (int32 index = startIndex; index < poseCount; index++) { BPose* pose = poseList->ItemAt(index); @@ -9210,6 +9213,11 @@ BPoseView::ColumnRedraw(BRect updateRect) offscreenView->Sync(); DrawBitmap(sOffscreen->Bitmap(), srcRect, dstRect); + if (!TargetVolumeIsReadOnly()) + offscreenView->SetLowUIColor(LowUIColor()); + else + offscreenView->SetLowUIColor(LowUIColor(), ReadOnlyTint(LowUIColor())); + location.y += fListElemHeight; if (location.y > updateRect.bottom) break; diff --git a/src/kits/tracker/TitleView.cpp b/src/kits/tracker/TitleView.cpp index a4c76ce74b..9e15093b14 100644 --- a/src/kits/tracker/TitleView.cpp +++ b/src/kits/tracker/TitleView.cpp @@ -78,6 +78,10 @@ _DrawLine(BPoseView* view, BPoint from, BPoint to) static void _UndrawLine(BPoseView* view, BPoint from, BPoint to) { + if (!view->TargetVolumeIsReadOnly()) + view->SetLowUIColor(view->LowUIColor()); + else + view->SetLowUIColor(view->LowUIColor(), ReadOnlyTint(view->LowUIColor())); view->StrokeLine(from, to, B_SOLID_LOW); }