Bug 497603 - KRunner history suggestion text doesn't line up correctly if the search uses different casing
Summary: KRunner history suggestion text doesn't line up correctly if the search uses ...
Status: RESOLVED FIXED
Alias: None
Product: krunner
Classification: Plasma
Component: general (show other bugs)
Version: 6.2.4
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-17 14:10 UTC by Peter Würth
Modified: 2025-01-08 05:22 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.3.0
Sentry Crash Report:


Attachments
Screenshot (10.33 KB, image/png)
2024-12-17 14:10 UTC, Peter Würth
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Würth 2024-12-17 14:10:30 UTC
Created attachment 176709 [details]
Screenshot

SUMMARY
When the search term matches a previous search, a suggestion is shown with a faded text color behind the search. Matching the search term with the history is apparently case insensitive, which is expected, but if the casing between search and suggestion differs, they overlap weirdly.

STEPS TO REPRODUCE
1. Open KRunner settings and set History to "Enable Suggestions".
2. Open KRunner and search e.g. for "okular", hint Enter.
3. Open KRunner again and type "Ok" (capital O).

OBSERVED RESULT
KRunner suggests "okular" as search term, but due to the capital O being wider than the lowercase o, the search term and suggestion don't line up correctly. The result looks somewhat "blurry", though it depends on how large the width difference of upper- and lowercase letters is.

EXPECTED RESULT
For the typed search term, there should not be a visible "shadow" and rest of the suggestion (e.g. "ular" in the above example) should continue right after the search term without any offset.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.9.0
Qt Version: 6.8.1
Kernel Version: 6.12.4-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 4800H with Radeon Graphics
Memory: 15.0 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Comment 1 Nate Graham 2024-12-17 17:45:49 UTC
Hah, can reproduce.
Comment 2 Bug Janitor Service 2025-01-07 20:39:36 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5032
Comment 3 Nate Graham 2025-01-08 05:22:04 UTC
Git commit 2805eb56b91c70f5d418f98c7025c9bb27bfb152 by Nate Graham.
Committed on 08/01/2025 at 05:01.
Pushed by ngraham into branch 'master'.

RunCommand: make faded completion text match casing of typed text

Otherwise they won't line up perfectly if the user types a string that's
a case *insensitive* match for something in the history, leading to
visual hilarity.
FIXED-IN: 6.3.0

M  +2    -1    krunner/qml/RunCommand.qml

https://invent.kde.org/plasma/plasma-workspace/-/commit/2805eb56b91c70f5d418f98c7025c9bb27bfb152