OBSERVED RESULT Neochat Flatpak respects color mode (dark/light mode), but not the accent color EXPECTED RESULT Accent color working in Neochat SOFTWARE/OS VERSIONS Operating System: Fedora Linux 40 KDE Plasma Version: 6.2.0 KDE Frameworks Version: 6.7.0 Qt Version: 6.7.2
Can confirm. Seems to be a regression since applying accent colours worked until recently. If I go to "Settings -> Appearance", I get the proper accent colour back, but it lasts only until quitting NeoChat.
tl;dr I think this bug maybe needs either moved to a core component, or replicated across multiple products? This same behavior seems to replicate itself in the Dolphin Flatpak as well - and both apps print the following message to the console after being launched: kf.config.core: Watching absolute paths is not supported "/usr/share/color-schemes/BreezeLight.colors" Dolphin doesn't have a way to manually change the color scheme like NeoChat does, but I noticed when closing the Dolphin Flatpak that once I click the close button, during the closing animation the accent color does show up (I use Breeze Classic so active window title bars have the accent color) Should this be in frameworks-kconfig?
This happened ever since https://invent.kde.org/frameworks/kcolorscheme/-/merge_requests/25 was merged. Now, the default KColorScheme (which is the one with the user accent color of choice) is only applied if the Qt Platform Theme name is “kde”. I created a basic Qt app that made use of the Qt Gui Private API and queried the name of the platform theme used inside the sandbox: QGuiApplicationPrivate::platformTheme()->name() => "xdgdesktopportal" Which seems sensible enough, since the KDE Platform package is used in more desktop environments other than KDE. The problem for KDE Plasma users is that now, since "xdgdesktopportal" isn't equal to "kde", the default Breeze color scheme is used (which doesn't follow user accent color preferences). WORKAROUND As a workaround, the use of the default KColorScheme can be forced for all Flatpak apps: ```bash flatpak override --user --env=QT_QPA_PLATFORMTHEME=kde ``` After running this command all KDE Flatpaks I have installed (NeoChat, Kate, Tokodon, Elisa, Haruna, etc.) follow my accent color. Definitively not a problem specific to NeoChat, so assigning this to frameworks-kcolorscheme.
Thanks for the investigation, good find
(In reply to Anael from comment #3) > WORKAROUND > As a workaround, the use of the default KColorScheme can be forced for all > Flatpak apps: > > ```bash > flatpak override --user --env=QT_QPA_PLATFORMTHEME=kde > ``` Beware, while this fixes accent colours, this override breaks file dialogs at least in NeoChat for me: They show an empty home dir, making it impossible to pick a file.
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kcolorscheme/-/merge_requests/32
Git commit 7ca3d70303138ce35a201d7689e80a5cbf961b7d by Nicolas Fella. Committed on 06/12/2024 at 11:03. Pushed by nicolasfella into branch 'master'. Fix isKdePlatformTheme for Flatpaks When running Flatpaks on Plasma the platformtheme is 'xdgdesktopportal' Internally it still proxies the real KDE platformtheme and we want to read the colors from it instead of just switching between Breeze Light and Dark M +15 -2 src/kcolorschememanager.cpp https://invent.kde.org/frameworks/kcolorscheme/-/commit/7ca3d70303138ce35a201d7689e80a5cbf961b7d
(In reply to Jan Rathmann from comment #5) > (In reply to Anael from comment #3) > > WORKAROUND > > As a workaround, the use of the default KColorScheme can be forced for all > > Flatpak apps: > > > > ```bash > > flatpak override --user --env=QT_QPA_PLATFORMTHEME=kde > > ``` > > Beware, while this fixes accent colours, this override breaks file dialogs > at least in NeoChat for me: They show an empty home dir, making it > impossible to pick a file. Sorry, I hadn't tried this with file dialogs and it seems that yes, it does indeed break them. Now that this bug is fixed, it's best to remove the override anyway: ```bash flatpak override --user --unset-env=QT_QPA_PLATFORMTHEME ``` And many thanks for the bugfix!
Having same issue on flatpak version of Konsole, Okular, Haruna on UBlue Aurora.
I am sorry, for changing the status of this bug report. I got confused when I say the option "status" below comment box - I thought it only represented my comment.