diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2024-06-17 13:57:25 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2024-06-18 06:02:17 +0000 |
commit | ed093e7761faa7823939e77c67961d03f8b785c6 (patch) | |
tree | 86624cadf343700c713adec331a19ff96a3df1ac /examples/network/secureudpclient/addressdialog.h | |
parent | 0f09806ca27c3426a1ff6a418811c2e9a1ee8b0e (diff) |
QFileSystemModel: only use theme icons if a theme is set6.7
The old code checked themes first, and only went through the platform's
file-based icon resolving code if the theme didn't provide an icon. With
the added support for theme icons on macOS and Windows, this broke
standard file icons on macOS and Windows: the icon theme provides the
font-based icons, but they are significantly different from what users
expect a folder, drive, or generic file icon to look like in a file
explorer-like UI.
To fix this, we cannot simply turn the priorities around, as we get a
standard, default file icon for any file that doesn't have a specific
icon configured. The behavior needs to be different on each platform:
on Linux desktop we respect the icon theme, on other platforms we prefer
the file-type based icon.
Add a theme hint that tells the icon provider which one to prefer.
Implemented in on Linux desktop to return true, otherwise returns false.
Adapt the logic in QAbstractFileIconProvider accordingly.
Fixes: QTBUG-124829
Change-Id: I9ff3f543c000aec8238bdf36b18be5c7a2349098
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit e10308769592222b97153956feeb9531863bef35)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit d2637d2323a754a6e9a182db113377645423c2ff)
Diffstat (limited to 'examples/network/secureudpclient/addressdialog.h')
0 files changed, 0 insertions, 0 deletions