Bug 484820

Summary: Unreadable text in QML Dialog breadcrumb bar
Product: [Frameworks and Libraries] frameworks-qqc2-desktop-style Reporter: neobrain <bugs.7ng0x>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: normal CC: ahiemstra, kde, nate, noahadvs, notmart
Priority: NOR    
Version First Reported In: 6.0.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Dialog with unreadable breadcrumb bar

Description neobrain 2024-03-31 14:46:33 UTC
Created attachment 167987 [details]
Dialog with unreadable breadcrumb bar

SUMMARY
The non-native QML fallbacks for FileDialog and FolderDialog are customized by qqc2-desktop-style, but their breadcrumb bars don't seem to be. When Plasma is configured to use the Breeze Dark color scheme, this makes the folder names in the breadcrumb bar unreadable, since they're rendered in the same color as the background (both white).

```
import QtQuick
import QtQuick.Controls
import QtQuick.Dialogs

Item {
    width: 800
    height: 600

    Button {
        text: "Open dialog"
        onClicked: theDialog.open()
    }

    FolderDialog {
        id: theDialog
        options: FolderDialog.DontUseNativeDialog
    }
}
```

STEPS TO REPRODUCE
1. Copy-paste the above QML source to a file
2. Set up Breeze Dark color theme
3. Run `qml6 file.qml`

OBSERVED RESULT
The individual folder names in the breadcrumb bar are unreadable

EXPECTED RESULT
The folder names should either be rendered as black-on-white or as white-on-black text.

SOFTWARE/OS VERSIONS
Linux 
KDE Plasma Version: 6.0.3
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.3

ADDITIONAL INFORMATION
qqc2-breeze-style also appears to be affected by this.
Comment 1 Nate Graham 2024-09-04 03:31:37 UTC
This is a Qt bug... sort of. More like an incompatibility between how they do colors and how we do colors. It's for this reason that we override the default dialogs with our own. Intentionally breaking that is not supported.
Comment 2 neobrain 2024-09-05 09:42:54 UTC
That's a bummer. I'm not sure I can use the native dialogs, since I'm using QQuickRenderControl to render a QML file into a manually managed window. Maybe I just need to dig deeper into the Qt documentation to find a way to enable native dialogs either way though.

Thanks for the explanation!
Comment 3 Nate Graham 2024-09-05 11:13:31 UTC
You're welcome! Hope you find something that works out.