Bug 487799 - Geolocalization icon always black in thumbnail view
Summary: Geolocalization icon always black in thumbnail view
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Usability-Themes (show other bugs)
Version: 8.4.0
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
: 490968 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-05-30 15:51 UTC by Jens Westemeier
Modified: 2024-09-18 07:02 UTC (History)
3 users (show)

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


Attachments
Image with black geolocalization icon in upright corner (47.03 KB, image/png)
2024-05-30 15:51 UTC, Jens Westemeier
Details
Miscellaneous-> Appearance setup (86.18 KB, image/png)
2024-05-30 17:59 UTC, Jens Westemeier
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Westemeier 2024-05-30 15:51:49 UTC
Created attachment 169989 [details]
Image with black geolocalization icon in upright corner

When I switch the design to some dark themes (e.g. GrayCard), the geolocalization icon in the upright corner remains black and is not really visible anymore.
In this case it should change to white like all other symbols and text in that view.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
KDE Frameworks Version: 5.116.0
Qt Version: 5.15.13
Comment 1 Maik Qualmann 2024-05-30 16:35:48 UTC
Which digiKam version are you using exactly?

In digiKam-8.4.0 there are further adjustments to change the icon colors depending on the desktop.

The following applies to KF5 digiKam-Qt5:
In the digiKam settings under Miscellaneous-> Appearance the corresponding Breeze icon theme must be selected, Breeze-Dark for dark color scheme and Breeze for light color scheme.

For KF6 and native digiKam-Qt6:
The desktop's auto icon color works here, in the digiKam settings the system icon theme must be used.

Maik
Comment 2 Jens Westemeier 2024-05-30 17:59:48 UTC
Created attachment 169999 [details]
Miscellaneous-> Appearance setup
Comment 3 Jens Westemeier 2024-05-30 18:01:17 UTC
I'm using 8.3.0 from OpenSuSE Tumbleweed.
Is the hint for Miscellaneous-> Appearance for 8.4.0?
Since I'm running the German version, I don`t know, how the settings match exactly to the English version. So I added a screenshot of that menu.

Greetings, Jens
Comment 4 Maik Qualmann 2024-05-30 18:25:18 UTC
Ja, das Fenster ist korrekt, das richtige Symboldesign ist ausgewählt. Du solltes aber auch den Stil der Bedienelemente auf Breeze setzen, hier scheint etwas anders im Hintergrund vorhanden zu sein, das nicht erkannt wird.
Beachte , das die Änderung des Symboldesign einen digiKam Neustart benötigt. Mit dieser Einstellung solltest du aber kein dunkles Symbol für GPS und Gruppierung im Thumbnail haben.

Maik
Comment 5 Jens Westemeier 2024-05-30 18:38:57 UTC
Ich habe den "Stil der Bedienelemente" auf "Breeze" gesetzt und neu gestartet -> kein Effekt.
Ich habe dann Digikam mal von der Kosole gestartet. Da kam:
kf.config.core: Watching absolute paths is not supported "/usr/share/digikam/colorschemes/graycard.colors"
Hilft das?

Grüße, Jens
Comment 6 Maik Qualmann 2024-05-30 18:39:34 UTC
Ich sehe gerade, du verwendest OpenSUSE Tumbleewed, warum bist du noch auf KF5? Ich verwende ebenfalls  OpenSUSE Tumbleewed mit KF6 und Qt6. Es gab durchaus in der Übergangszeit einige Probleme mit den Symbol Farben, weil teilweise schon der auto Symbol Farben Modus aktiv war. Teste auch mal das "System Symboldesign" in digiKam.

Maik
Comment 7 Maik Qualmann 2024-05-30 18:41:16 UTC
Die Fehlermeldung ist nicht relevant/normal, KConfig muss die Datei nicht auf Änderungen überwachen.

Maik
Comment 8 Jens Westemeier 2024-05-30 19:09:16 UTC
Eigentlich bin ich auch auf KF6 und Qt6. Die Angabe in "Hilfe -> Über Digikam" hat mich auch gewundert. Scheinbar hat das Tumbleweed Team noch gegen Plasma 5 gebaut!?
 "System Symboldesign" allerdings hat geholfen. Vielen Dank für die flotte Hilfe!

Grüße, Jens.
Comment 9 Maik Qualmann 2024-05-30 19:37:15 UTC
Ok, dann ist es klar, dass das System Symboldesign verwendet werden muss. Es gibt einige wenige Symbole in digiKam die nicht automatisch die Farbe wechseln, wenn das Farbschema gewechselt wird, dies ist in digiKam-8.4.0 behoben. OpenSUSE hat digiKam-8.3.0 noch gegen Qt5 gebaut, Qt6 währe auch schon möglich.

Maik
Comment 10 Jens Westemeier 2024-07-27 12:15:25 UTC
Digikam 8.4.0 auf Tumbleweed funktioniert weiterhin. Digikam 8.4.0 AppImage ist wieder schwarz (trotz "System Settings").
AppImage Komponenten: KDE Frameworks Version 6.2.0, Qt Version 6.7.2 (kompiliert gegen 6.7.2), Das Fenstersystem xcb
Tumbleweed Komponenten: KDE Frameworks Version 5.116.0, Qt Version 5.15.14 (kompiliert gegen 5.15.14), Das Fenstersystem xcb

Jens
Comment 11 Maik Qualmann 2024-07-27 12:38:12 UTC
Automatic colors of the system icons only works with a native digiKam on KF6. Under all other package variants, such as AppImage, macOS, Windows or native digiKam on Ubuntu, you have to set the corresponding icon theme in the digiKam setup.

Maik
Comment 12 Jens Westemeier 2024-07-27 13:39:54 UTC
(In reply to Maik Qualmann from comment #11)
> Automatic colors of the system icons only works with a native digiKam on
> KF6. Under all other package variants, such as AppImage, macOS, Windows or
> native digiKam on Ubuntu, you have to set the corresponding icon theme in
> the digiKam setup.
> 
> Maik

So which icon design to be chosen for white icons?

System design -> Dark icons
Adwaita -> Dark icons
Breeze -> Dark icons
Breeze-Dark -> Dark icons
Oxygen -> works, but looks ugly

No other choice
Jens
Comment 13 Maik Qualmann 2024-07-27 14:01:56 UTC
Ok, you're right, Breeze-Dark doesn't work under the AppImage with KF6. We would have to provide the icons as a resource file, like with macOS or Windows.

Maik
Comment 14 Maik Qualmann 2024-07-27 14:59:28 UTC
The Breeze icon themes are actually included in the AppImage and are found, but apparently not used.

Maik
Comment 15 Maik Qualmann 2024-07-29 10:29:39 UTC
*** Bug 490968 has been marked as a duplicate of this bug. ***
Comment 16 Maik Qualmann 2024-07-29 18:38:26 UTC
@Gilles, the thing with the icons is a bit complicated and I can't find any information from the Breeze Icon developers.
I unpacked our current AppImage and replaced the breeze-dark.rcc with an older version. We then have light icons again.
But that's not a package error, I have the same breeze-dark icons here in openSUSE. Under KF6 there is an automatic adjustment of the icons at runtime, works perfectly here in digiKam if the "System Icons" are used. So some "drawing engine" must do this.

So, now there is a package in the openSUSE repository with breeze-dark icons as an rcc file, which says light icons in the description. This is currently used for programs that are causing problems.
So there must be a way to check out the breeze-dark icons as "light" icons.

Maik
Comment 17 Jens Westemeier 2024-07-30 13:57:10 UTC
I don't know whether it matters, but OpenSuSE (Tumbleweed) is still build against" Komponenten: KDE Frameworks Version 5.116.0, Qt Version 5.15.14 (kompiliert gegen 5.15.14), Das Fenstersystem xcb"
Comment 18 caulier.gilles 2024-07-30 17:02:45 UTC
Maik, 

As i know the problem only occurs with KDE framework based on Qt6, not Qt5.

If you look on breeze-icons repository cmake options and the git history, you will find that the icons RC files support will be dropped (partially done with 6.2, and complete with 6.3 or 6.4. I don't know why ???

Look this comment : https://invent.kde.org/frameworks/breeze-icons/-/blob/master/CMakeLists.txt?ref_type=heads#L64

This is why i let's KDE framework 6.2 in digiKam bundles 8.4.0.

Gilles
Comment 19 Maik Qualmann 2024-07-30 19:23:36 UTC
There was a discussion on the KDE mailing list recently that KDE programs on other platforms don't look the same as they do on KF6.
There was this merge request to change it:

https://invent.kde.org/frameworks/kiconthemes/-/merge_requests/136
https://invent.kde.org/frameworks/kconfigwidgets/-/merge_requests/239

And this page is interesting and explains what needs to be called in the program now:

https://cullmann.io/posts/kde-applications-and-icons/

Maik
Comment 20 Maik Qualmann 2024-09-08 17:04:01 UTC
*** Bug 492823 has been marked as a duplicate of this bug. ***
Comment 21 caulier.gilles 2024-09-10 05:34:19 UTC
Maik,

Another point is the KDE framework version 6.2 used in Qt6 bundles. Last KF is 6.5.0, so we need certainly to update.

https://download.kde.org/stable/frameworks/

Gilles
Comment 22 caulier.gilles 2024-09-14 08:41:59 UTC
Maik,

I updated all Qt6 bundles to last KDE Frameworks 6.5.0. I tested under my Macbook pro Arm64 and the problem remain...
I don't yest tested the AppImage and the Windows bundles.

Gilles
Comment 23 Maik Qualmann 2024-09-14 08:44:50 UTC
Hi Gilles,

The icon colors in the Windows bundle are OK. However, there are now several error messages for icon size 48. But I don't see any errors in digiKam, I'll post the error messages right away.

Maik
Comment 24 Maik Qualmann 2024-09-14 08:55:43 UTC
The icon color light/dark can be changed in Windows without any problems. However, this error message appears several times:

[13236] Base directory's drive is not a letter: :\icons\breeze\apps\48
[13236] QFSFileEngine::open: No file name specified
[13236] qt.svg: Could not create image from ""

Maik
Comment 25 caulier.gilles 2024-09-14 09:00:05 UTC
Apple Silicon Screenshot : https://i.imgur.com/jPBdWZu.png
Comment 26 caulier.gilles 2024-09-14 09:10:16 UTC
Apple Silicon screenshot taken with default color theme is fully suitable: https://i.imgur.com/wOUxvQE.png
Comment 27 Maik Qualmann 2024-09-14 09:20:08 UTC
If you change the color theme from light to dark or vice versa, do you get a message saying that the icon theme is being adjusted?

Maik
Comment 28 caulier.gilles 2024-09-14 09:34:20 UTC
Not at all : https://i.imgur.com/jvPfbn3.png

context : switching from default to Darkroom...
Comment 29 caulier.gilles 2024-09-14 09:36:24 UTC
if i revert back to default color theme : https://i.imgur.com/Zv2o8Gv.png
Comment 30 Maik Qualmann 2024-09-14 09:46:23 UTC
I suspect that the icons that should be light are also dark.
Under a KF6 system we do not need to change the icon theme (the digiKam icon theme must be set to "System). The icon color changes immediately when the color scheme is changed, without restarting.
digiKam is currently testing whether it runs natively on KF6.

https://invent.kde.org/graphics/digikam/-/blob/master/core/app/main/digikamapp_config.cpp?ref_type=heads#L111

Maik
Comment 31 caulier.gilles 2024-09-14 10:20:50 UTC
In both previous screenshot, i uses this settings :

https://i.imgur.com/UnghAcq.png
Comment 32 caulier.gilles 2024-09-14 10:30:20 UTC
Icons theme : system
colors theme : default

https://i.imgur.com/a0Ru2eG.png

If switch to another colors theme, icons theme switch automatically to breeze sets.
Comment 33 caulier.gilles 2024-09-14 10:35:38 UTC
Important. Under Mac, to use the color theme set from the system, a special setting must be configured is application .plist, especially if MacOS dark theme is used.

https://successfulsoftware.net/2021/03/31/how-to-add-a-dark-theme-to-your-qt-application/

Gilles
Comment 34 Maik Qualmann 2024-09-14 10:36:53 UTC
Icon theme "System" should never be set in macOS. Which icon theme is selected in the setup for a dark color scheme?

Maik
Comment 35 caulier.gilles 2024-09-14 10:37:39 UTC
Hi Michael,

Please look my last comment #33. digiKam do not support yet this feature under macOS.

Gilles
Comment 36 caulier.gilles 2024-09-14 10:41:19 UTC
Maik,

>Which icon theme is selected in the setup for a dark color scheme?

colors : Black Body
icons : breeze dark

https://i.imgur.com/uKMGvEY.png
Comment 37 caulier.gilles 2024-09-14 10:43:36 UTC
colors : Black Body
icons : Breeze 

https://i.imgur.com/a6urhzR.png
Comment 38 Maik Qualmann 2024-09-14 10:47:45 UTC
Yes, it's clear, since KF6 has the automatic icon color scheme, the checked out Breeze-dark icons are dark. We don't have the problem on Windows, since we still use "old" icon resource files:

https://invent.kde.org/graphics/digikam/-/tree/master/project/bundles/vcpkg/data?ref_type=heads

Maik
Comment 39 caulier.gilles 2024-09-14 10:48:13 UTC
This time :

Colors : Black Body
Icons : Breeze dark
Widgets : Breeze.       <---- !!!!

All previous screenshots was done with Widgets = Fusion.
Comment 40 caulier.gilles 2024-09-14 15:26:02 UTC
Maik, 

The commit https://invent.kde.org/graphics/digikam/-/commit/6bc3791a65f32b2763e30bc9069f288ca3bccddd#note_1032309 do not work, but... if i override the rcc files bundled in digiKam by the pre-compiled ones for VCPKG, It's works as expected :

https://i.imgur.com/lAbirK5.png

Colors : Black Body
Icons: Breeze dark
Widgets : Fusion

Where is the difference in the rcc packaging ?

Gilles
Comment 41 Maik Qualmann 2024-09-14 16:44:16 UTC
As I said, here in KF6 the icons change color at runtime when the color theme is changed.
If I compare the installed icons here, they are identical. For example:

cmp /usr/share/icons/breeze/apps/22/kmail-symbolic.svg /usr/share/icons/breeze-dark/apps/22/kmail-symbolic.svg

I don't understand at the moment why there is still a breeze-dark, probably because some colored icons are different, the monocolor icons are identical.

So some KF6 component must adapt the icons at runtime.

Maik
Comment 42 Maik Qualmann 2024-09-14 16:54:27 UTC
At the end, look at the code, this should ensure that the application looks the same on all platforms.

https://cullmann.io/posts/kde-applications-and-icons/

Maik
Comment 43 caulier.gilles 2024-09-14 17:35:22 UTC
Ok, if i understand, we need to patch in digiKam the way to initialize the KIconTheme at startup or something like that. Right ?
Comment 44 caulier.gilles 2024-09-14 17:45:57 UTC
Git commit a4c705202a80c6b60a1f18b01cb3966b910adf2a by Gilles Caulier.
Committed on 14/09/2024 at 17:44.
Pushed by cgilles into branch 'master'.

As with VCPKG, uses pre-compiled RCC as temporary solution for MacOS.

M  +6    -23   project/bundles/macports/04-build-installer.sh

https://invent.kde.org/graphics/digikam/-/commit/a4c705202a80c6b60a1f18b01cb3966b910adf2a
Comment 45 Maik Qualmann 2024-09-14 18:19:41 UTC
If I see it correctly, we have all the required KF6 components on board in the AppImage, I'll do a test. You then have to create an AppImage, preferably with the current Breeze icon set.

Maik
Comment 46 Maik Qualmann 2024-09-14 18:25:26 UTC
Git commit fdd5ab2c1b2059c3d0b98ead1cae6815a6631c48 by Maik Qualmann.
Committed on 14/09/2024 at 18:24.
Pushed by mqualmann into branch 'master'.

to test, use KIconTheme::initTheme()

M  +3    -0    core/app/main/main.cpp

https://invent.kde.org/graphics/digikam/-/commit/fdd5ab2c1b2059c3d0b98ead1cae6815a6631c48
Comment 47 caulier.gilles 2024-09-14 18:29:07 UTC
Maik, 

To check your last commit i will rebuild now the AppImage bundles. Fine ?

Gilles
Comment 48 Maik Qualmann 2024-09-14 18:48:53 UTC
Yes, try creating an AppImage.

Maik
Comment 49 Maik Qualmann 2024-09-14 19:13:03 UTC
It works! AppImage changes the icon color at runtime. I will remove the messages when the color scheme changes.
Do we also have at least KF-6.3 on macOS?

Maik
Comment 50 Maik Qualmann 2024-09-14 19:57:23 UTC
Git commit 5dec7d3e9e7ed938629d24e3bbcb53b77c0ea510 by Maik Qualmann.
Committed on 14/09/2024 at 19:56.
Pushed by mqualmann into branch 'master'.

adapt color scheme change messages and check for KIconThemes

M  +6    -0    core/app/CMakeLists.txt
M  +9    -18   core/app/main/digikamapp_config.cpp
M  +4    -0    core/app/main/digikamapp_p.h
M  +3    -3    core/app/main/main.cpp

https://invent.kde.org/graphics/digikam/-/commit/5dec7d3e9e7ed938629d24e3bbcb53b77c0ea510
Comment 51 Maik Qualmann 2024-09-14 20:04:14 UTC
Git commit c5472b05fd22fad636e46b5a96a65660c7dd58da by Maik Qualmann.
Committed on 14/09/2024 at 20:03.
Pushed by mqualmann into branch 'master'.

add KIconTheme::initTheme() to showFoto

M  +11   -0    core/showfoto/main/main.cpp

https://invent.kde.org/graphics/digikam/-/commit/c5472b05fd22fad636e46b5a96a65660c7dd58da
Comment 52 caulier.gilles 2024-09-14 20:08:07 UTC
Maik,

All Qt6 bundles are now based on last KDE frameworks 6.5.0.

Gilles
Comment 53 Maik Qualmann 2024-09-14 20:16:15 UTC
Git commit 8395b5ca13539c8dd3e938b18a1cdc7cda94259b by Maik Qualmann.
Committed on 14/09/2024 at 20:15.
Pushed by mqualmann into branch 'master'.

adapt color change messages to showFoto

M  +4    -4    core/app/main/digikamapp_config.cpp
M  +20   -2    core/showfoto/main/showfoto_config.cpp
M  +4    -0    core/showfoto/main/showfoto_p.h

https://invent.kde.org/graphics/digikam/-/commit/8395b5ca13539c8dd3e938b18a1cdc7cda94259b
Comment 54 Maik Qualmann 2024-09-14 20:18:00 UTC
That's good, we can now use the current Breeze icon set everywhere.

Maik
Comment 55 Maik Qualmann 2024-09-14 20:20:18 UTC
Stop, with Qt5 we have to use the old Breeze icon set.
For Qt6 we need the current Breeze icon set.

Maik
Comment 56 caulier.gilles 2024-09-14 20:23:29 UTC
Ok, i seen. I will prepare the branched code in the bundle scripts.

Gilles
Comment 57 caulier.gilles 2024-09-14 20:41:19 UTC
Git commit fc146b486822fd21f5e5985e5627421abb1cb202 by Gilles Caulier.
Committed on 14/09/2024 at 20:39.
Pushed by cgilles into branch 'master'.

VCPKG: branch breeze icon sets to the right one depending of Qt version

R  +-    --    project/bundles/common/breeze-dark.rcc [from: project/bundles/vcpkg/data/breeze-dark.rcc - 100% similarity]
R  +-    --    project/bundles/common/breeze.rcc [from: project/bundles/vcpkg/data/breeze.rcc - 100% similarity]
M  +14   -5    project/bundles/vcpkg/04-build-installer.sh

https://invent.kde.org/graphics/digikam/-/commit/fc146b486822fd21f5e5985e5627421abb1cb202
Comment 58 caulier.gilles 2024-09-14 20:45:02 UTC
Git commit 7077c8fe9e7deaba20986f32a67403290081a1fb by Gilles Caulier.
Committed on 14/09/2024 at 20:44.
Pushed by cgilles into branch 'master'.

MacPorts: branch breeze icon sets to the right one depending of Qt version

M  +12   -5    project/bundles/macports/04-build-installer.sh

https://invent.kde.org/graphics/digikam/-/commit/7077c8fe9e7deaba20986f32a67403290081a1fb
Comment 59 caulier.gilles 2024-09-14 20:49:40 UTC
Git commit 9244b6b3641e2bca9982f3a274c329fbb8637573 by Gilles Caulier.
Committed on 14/09/2024 at 20:48.
Pushed by cgilles into branch 'master'.

AppImage : branch breeze icon sets to the right one depending of Qt version

M  +14   -2    project/bundles/appimage/04-build-appimage.sh
M  +4    -4    project/bundles/vcpkg/04-build-installer.sh

https://invent.kde.org/graphics/digikam/-/commit/9244b6b3641e2bca9982f3a274c329fbb8637573
Comment 60 caulier.gilles 2024-09-14 21:52:59 UTC
Maik, your last patches works as expected under MacOS Arm64 Qt6/KF6: https://i.imgur.com/QAlsBEC.png
Comment 61 Maik Qualmann 2024-09-14 21:59:29 UTC
Great, I'm not sure about the Windows version yet, I'll test it tomorrow when all the changes are included.

Maik
Comment 62 caulier.gilles 2024-09-15 02:56:58 UTC
Git commit a9d317f5963dc06df48d3007fedeafe6bb4418d3 by Gilles Caulier.
Committed on 15/09/2024 at 02:55.
Pushed by cgilles into branch 'master'.

The breeze-dark rcc is only necessary with the Qt5 version of the bundles

M  +6    -2    project/bundles/appimage/04-build-appimage.sh
M  +3    -4    project/bundles/macports/04-build-installer.sh
M  +3    -4    project/bundles/vcpkg/04-build-installer.sh

https://invent.kde.org/graphics/digikam/-/commit/a9d317f5963dc06df48d3007fedeafe6bb4418d3
Comment 63 Maik Qualmann 2024-09-15 17:59:26 UTC
Hi Gilles,

Breeze re-color is not working under Windows at the moment, I will try to find the cause.

At the moment we only have the Breeze resource file in the bundles. But we also still need Breeze-dark. Breeze is not complete yet, so we have incorrect icons in the setup, e.g. There is only a merge request in KF6 to make Breeze-dark obsolete, we still need it.

Maik
Comment 64 Maik Qualmann 2024-09-16 18:14:45 UTC
Git commit b00029d2b7b89f3e47ff4400709f32801571cda4 by Maik Qualmann.
Committed on 16/09/2024 at 18:14.
Pushed by mqualmann into branch 'master'.

use precompiled icon resources at the moment also for Windows

M  +4    -4    project/bundles/vcpkg/04-build-installer.sh

https://invent.kde.org/graphics/digikam/-/commit/b00029d2b7b89f3e47ff4400709f32801571cda4
Comment 65 Maik Qualmann 2024-09-16 18:55:06 UTC
Git commit a9ccd69e203f032c4baa3ca1e1b2f8418db07a03 by Maik Qualmann.
Committed on 16/09/2024 at 18:54.
Pushed by mqualmann into branch 'master'.

to work Breeze re-color we need kiconthemes6 in the root

M  +1    -1    core/app/main/digikamapp_config.cpp
M  +1    -1    core/showfoto/main/showfoto_config.cpp
M  +6    -4    project/bundles/vcpkg/04-build-installer.sh

https://invent.kde.org/graphics/digikam/-/commit/a9ccd69e203f032c4baa3ca1e1b2f8418db07a03
Comment 66 Maik Qualmann 2024-09-16 19:26:29 UTC
Hi Gilles,

our Breeze resource file no longer needs to contain the Breeze icons. The standard Breeze icons are probably contained in a KIconThemes file (Windows .dll or Linux .so) under Qt6. Our Breeze resource file only needs to contain digiKam's own icons.

Maik
Comment 67 Jens Westemeier 2024-09-18 07:02:28 UTC
AppImage works for me. Many thanks to all the contributors!

Jens