Bug 502927

Summary: Manual background painting in KUrlNavigator breaks Kvantum theming for light themes with dark toolbars
Product: [Frameworks and Libraries] frameworks-kio Reporter: evgeniyharchenko.dev
Component: generalAssignee: KIO Bugs <kio-bugs-null>
Status: REPORTED ---    
Severity: minor CC: akselmo, evgeniyharchenko.dev, kdelibs-bugs-null, nate
Priority: NOR Keywords: regression
Version First Reported In: 6.12.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Dolphin file path with kvantum
Dolphin file path with breeze

Description evgeniyharchenko.dev 2025-04-17 12:02:35 UTC
Created attachment 180348 [details]
Dolphin file path with kvantum

SUMMARY
After this merge request: https://invent.kde.org/frameworks/kio/-/merge_requests/1793 the KUrlNavigator widget in Dolphin (and possibly other apps) draws its background using QPainter with a hardcoded call to palette(). This bypasses the QStyle engine and breaks compatibility with third-party styles like Kvantum.

As a result, the text and background become unreadable when using semi-dark themes (light themes with dark toolbars).

This issue has been confirmed by Kvantum's developer in this discussion, where it was explained that Kvantum cannot style elements that are painted manually like this.

https://github.com/tsujan/Kvantum/discussions/1059

STEPS TO REPRODUCE
1. Use any light Kvantum theme with dark toolbars (e.g. KvAdapta, KvMojaveMixed).
2. Launch Dolphin.

OBSERVED RESULT
The path bar uses a bright background that clashes with the theme, making the text hard or impossible to read.

EXPECTED RESULT
KUrlNavigator should use QStyle to draw its background so that it remains styleable.

SOFTWARE/OS VERSIONS
KDE Frameworks Version 6.12+

ADDITIONAL INFORMATION
https://invent.kde.org/frameworks/kio/-/merge_requests/1793
https://github.com/tsujan/Kvantum/issues/1066
https://github.com/tsujan/Kvantum/discussions/1059
Comment 1 evgeniyharchenko.dev 2025-04-17 12:03:20 UTC
Created attachment 180349 [details]
Dolphin file path with breeze