Bug 509080 - Cannot use a Qt theme
Summary: Cannot use a Qt theme
Status: CONFIRMED
Alias: None
Product: okteta
Classification: Applications
Component: general (other bugs)
Version First Reported In: 0.26.23
Platform: Debian unstable Linux
: NOR normal
Target Milestone: ---
Assignee: Friedrich W. H. Kossebau
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-09-03 16:47 UTC by tupo
Modified: 2025-09-03 21:37 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tupo 2025-09-03 16:47:12 UTC
It looks like the Okteta uses it's own theme, I can't specify which one to use (configured with qt5ct). No problem with others Qt applications.
Comment 1 Friedrich W. H. Kossebau 2025-09-03 17:02:01 UTC
Okteta should use the system.wide Qt themes, there is no code in Okteta itself hard-coding any theme.

Which other Qt-based apps do you compare it to? And which version of Qt do they use? (see e.g. Help>About app>Components)
Comment 2 tupo 2025-09-03 18:44:47 UTC
(In reply to Friedrich W. H. Kossebau from comment #1)
> Okteta should use the system.wide Qt themes, there is no code in Okteta
> itself hard-coding any theme.
>
> Which other Qt-based apps do you compare it to? And which version of Qt do
> they use? (see e.g. Help>About app>Components)

Okteta uses Qt 5.15.17
KeePassXC uses Qt 5.15.17
GoldenDict-ng uses Qt 6.8.2
Kid3 uses Qt 6.8.2

The three apps have the right theme except Okteta.
Comment 3 Antonio Rojas 2025-09-03 19:12:52 UTC
> The three apps have the right theme except Okteta.

Which theme is that?
Comment 4 Friedrich W. H. Kossebau 2025-09-03 19:18:31 UTC
Thanks. Sadly does not give a hint why things could be broken, so we need to look/try more things.

Not sure if KeePassXC does anything special, but at least indicates that indeed the theme you selected with qt5ct is installed in a Qt5 version and works. And I assume you selected the theme via the GUI of qt5ct, right?
Which theme exactly BTW?

Is QT_QPA_PLATFORMTHEME correctly set to qt5ct in the env where okteta is invoked? Can you try to set it manually in a shell and invoke Okteta from there? (need help with that?)
Comment 5 tupo 2025-09-03 19:56:37 UTC
Fusion(In reply to Friedrich W. H. Kossebau from comment #4)
> Not sure if KeePassXC does anything special, but at least indicates that
> indeed the theme you selected with qt5ct is installed in a Qt5 version and
> works. And I assume you selected the theme via the GUI of qt5ct, right?
> Which theme exactly BTW?

KeePassXC has an option to select the theme. It's set on "Classic (Plateform-native)".
Yes selected via the GUI of qt5ct.
The theme is Fusion.

> Is QT_QPA_PLATFORMTHEME correctly set to qt5ct in the env where okteta is
> invoked? Can you try to set it manually in a shell and invoke Okteta from
> there? (need help with that?)
Same.
I tried with 2 others themes : oxygen and ukui and the issue seems to come from the color scheme. It's correctly applied with KeePassXC but not with Okteta.
Comment 6 Friedrich W. H. Kossebau 2025-09-03 20:10:54 UTC
(In reply to tupo from comment #5)
> Fusion(In reply to Friedrich W. H. Kossebau from comment #4)
> > Is QT_QPA_PLATFORMTHEME correctly set to qt5ct in the env where okteta is
> > invoked? Can you try to set it manually in a shell and invoke Okteta from
> > there? (need help with that?)
> Same.
> I tried with 2 others themes : oxygen and ukui and the issue seems to come
> from the color scheme. It's correctly applied with KeePassXC but not with
> Okteta.

Just to make sure: when you change the theme (i.e. the style of buttons etc.), is that picked up with Okteta? And only the colors seem stuck?

In that case, can you check what with Okteta the menu entry "Settings"/"Color Scheme" is pointing to? Is it "Default" or something else? Can you try to set to "Default" if it is not and see if that fixes the issue you have?
Comment 7 tupo 2025-09-03 20:20:35 UTC
(In reply to Friedrich W. H. Kossebau from comment #6)
> (In reply to tupo from comment #5)
> > Fusion(In reply to Friedrich W. H. Kossebau from comment #4)
> > > Is QT_QPA_PLATFORMTHEME correctly set to qt5ct in the env where okteta is
> > > invoked? Can you try to set it manually in a shell and invoke Okteta from
> > > there? (need help with that?)
> > Same.
> > I tried with 2 others themes : oxygen and ukui and the issue seems to come
> > from the color scheme. It's correctly applied with KeePassXC but not with
> > Okteta.
> 
> Just to make sure: when you change the theme (i.e. the style of buttons
> etc.), is that picked up with Okteta? And only the colors seem stuck?
The style is applied with Okteta but not the colors.

> In that case, can you check what with Okteta the menu entry
> "Settings"/"Color Scheme" is pointing to? Is it "Default" or something else?
> Can you try to set to "Default" if it is not and see if that fixes the issue
> you have?

In Settings > Color Scheme, there is only "Default", if I click on it nothing happens.
Comment 8 Friedrich W. H. Kossebau 2025-09-03 21:37:41 UTC
(In reply to tupo from comment #7)
> In Settings > Color Scheme, there is only "Default", if I click on it
> nothing happens.

Okay, now that helped to dig close to the cause.

Short: things are broken, needs manual action after each system color palette change.

Long:
Seems with KF5 there is some design flaw when it comes to that very custom color scheme setting as provided via that menu entry, screwing the platform color palette. Sadly only fixed for KF6. And discussion with KF developers actually pointed out yet another related issue, not even fixed for KF6. Seems only few have used Okteta outside the Plasma shell and noticed the issue, and only you also did the right things to report the issue.

No full idea for a work-around right now and have to go afk, will note something here tomorrow or later this week. Possibly you will have to add some custom file stating the very colors of the color palette set with qt5ct.