Bug 426375

Summary: Kate does not set color scheme properly
Product: [Applications] kate Reporter: Mario Blunk <mario.blunk>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: normal CC: christoph, mario.blunk, waqar.17a
Priority: NOR    
Version First Reported In: 20.08.0   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 5.75
Sentry Crash Report:
Attachments: Appearance after start
Appearance settings for the desktop
Proper colors after switching between desktop appearances

Description Mario Blunk 2020-09-10 15:32:02 UTC
Created attachment 131542 [details]
Appearance after start

SUMMARY
The issues appears with OpenSuse Tumbleweed (latest), windowmanager XFCE, kernel  5.8.4.

STEPS TO REPRODUCE
1. Set an arbitrary color scheme, except the default schema Adwaita, for the desktop (settings/appearance/style).
2. Start Kate. It starts with the colors as shown in attached kate_schema_1.png.
3. go to desktop appearance and select the default color scheme (Adwaita) for a second. Then switch back to the previous color scheme (in my case Adwaita-dark). Kate displays properly.

OBSERVED RESULT
On startup kate does not adopt the color scheme as given by the desktop settings.

EXPECTED RESULT
Kate adopts the color scheme as given by the desktop settings.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/Xfce: 4.14
KDE Plasma Version: none
KDE Frameworks Version: none
Qt Version: 5.15.0

ADDITIONAL INFORMATION
Comment 1 Mario Blunk 2020-09-10 15:33:26 UTC
Created attachment 131543 [details]
Appearance settings for the desktop
Comment 2 Mario Blunk 2020-09-10 15:34:34 UTC
Created attachment 131544 [details]
Proper colors after switching between desktop appearances
Comment 3 Christoph Cullmann 2020-09-10 15:48:27 UTC
Could you tell me the frameworks version you use?

See e.g. Help -> About Kate -> Libraries

Thanks!
Comment 4 Mario Blunk 2020-09-10 16:41:53 UTC
- KDE Frameworks 5.73.0
- Qt 5.15.0 (built against 5.15.0)
- The xcb windowing system
Comment 5 Christoph Cullmann 2020-09-14 21:33:15 UTC
Ok, yes, I can see that.
This should be improved in Frameworks 5.75, see https://kate-editor.org/post/2020/2020-09-13-kate-color-themes-5.75/
Comment 6 Mario Blunk 2021-04-23 06:09:01 UTC
It seems the issue has not been solved completely. I can't see any change on my system. About Kate says:

Kate version 20.12.3
KDE Frameworks 5.81.0
Qt 5.15.2 (built against 5.15.2)
The xcb windowing system

Any ideas ?
Comment 7 Christoph Cullmann 2021-04-23 17:01:41 UTC
If you go to the Kate configuration dialog, what is there set on

"Color themes" (there at the bottom) -> "Default theme for kate:"...

It should be "Automatic Selection".
Comment 8 Mario Blunk 2021-04-24 06:14:52 UTC
(In reply to Christoph Cullmann from comment #7)
> If you go to the Kate configuration dialog, what is there set on
> 
> "Color themes" (there at the bottom) -> "Default theme for kate:"...
> 
> It should be "Automatic Selection".

No, there is not "Automatic Selection" selected. There is my customized color theme selected. If I change the setting to "Automatic Selection" then a different theme gets active. If I select my theme then it is applied properly. Setting the kate specific theme seems to be fine. 

It seems that the kate specific theme colors have nothing to do with the colors used for the document, project and file names (see left side of screenshot in https://bugsfiles.kde.org/attachment.cgi?id=131542)
The problem are the desktop wide color settings. Kate does not apply them to the document names (on the left) when kate starts. The effect can also be provoked when clicking Settings/Color Theme/default. By the way: in Settings/Color Theme there is only "default", nothing else.

Thanks for your great work !
Comment 9 Waqar Ahmed 2021-05-06 09:35:27 UTC
> By the way: in Settings/Color Theme there is only "default", nothing else.

You are using XFCE, and Kate is written in Qt. Your normal desktop themes won't show up here.

There are other ways to change the look and feel of a Qt application, maybe you can try those.