From 6d791f2040dca90fab2382014f11c1129ab9bf19 Mon Sep 17 00:00:00 2001 From: CodeforEvolution Date: Thu, 8 Dec 2022 11:15:58 -0600 Subject: [PATCH] Tracker: Fix selected text drawing with light desktop colors, and delayed update for inactive text colors on desktop This fixes two separate issues in relation to Tracker: 1) If the desktop base color is set to a lighter color (such that black text is used for desktop items), clicking on another window and then dragging that window over the item leads to a black selection and text color, leaving the text unreadable. (Fix in Pose.cpp) 2) After fixing the first problem, I noticed that Tracker still didn't immediately update the color of inactive, though still selected desktop items until another window was dragged over them. (Fix in DeskWindow.cpp) Change-Id: I43653e23c69a7666ed8a53751b0f65622c8dc596 Reviewed-on: https://review.haiku-os.org/c/haiku/+/5882 Tested-by: Commit checker robot Reviewed-by: nephele Reviewed-by: waddlesplash --- src/kits/tracker/DeskWindow.cpp | 1 - src/kits/tracker/Pose.cpp | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/kits/tracker/DeskWindow.cpp b/src/kits/tracker/DeskWindow.cpp index e0451a52e9..23aca41393 100644 --- a/src/kits/tracker/DeskWindow.cpp +++ b/src/kits/tracker/DeskWindow.cpp @@ -236,7 +236,6 @@ BDeskWindow::Init(const BMessage*) BScreen screen(this); fOldFrame = screen.Frame(); - PoseView()->SetShowHideSelection(false); ResizeTo(fOldFrame.Width(), fOldFrame.Height()); InitKeyIndices(); diff --git a/src/kits/tracker/Pose.cpp b/src/kits/tracker/Pose.cpp index ef44c385d4..278112b6cd 100644 --- a/src/kits/tracker/Pose.cpp +++ b/src/kits/tracker/Pose.cpp @@ -656,8 +656,7 @@ BPose::Draw(BRect rect, const BRect& updateRect, BPoseView* poseView, rect = widget->CalcRect(location, NULL, poseView); - bool selectDuringDraw = directDraw && selected - && (poseView->IsDesktopWindow() || windowActive); + bool selectDuringDraw = directDraw && selected && windowActive; if (selectDuringDraw) { // draw with dark background to select text