Bug 444993 - Incorrect ColorScheme set in kdeglobals after applying Breeze Dark Global Theme
Summary: Incorrect ColorScheme set in kdeglobals after applying Breeze Dark Global Theme
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_lookandfeel (show other bugs)
Version: 5.23.2
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-05 02:53 UTC by Seth
Modified: 2022-03-24 19:38 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Seth 2021-11-05 02:53:38 UTC
SUMMARY

When using the BreezeDark colorscheme, `~/.config/kdegloabls` reports KDE's colorscheme to be BreezeLight

STEPS TO REPRODUCE
1. Go to Settings >Appearance > Global Theme
2. Select Breeze Dark
3. Read `~/.config/kdeglobals`

OBSERVED RESULT
```
[KDE]
ColorScheme=BreezeLight
LookAndFeelPackage=org.kde.breezedark.desktop
contrast=4
```

EXPECTED RESULT
```
[KDE]
ColorScheme=BreezeDark
LookAndFeelPackage=org.kde.breezedark.desktop
contrast=4
```

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux (5.14.16.arch1-1)
(available in About System)
KDE Plasma Version: 5.23.2
KDE Frameworks Version: 5.87.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
This has caused errors in programs such as neofetch as seen here: https://github.com/dylanaraps/neofetch/issues/1941
Comment 1 Seth 2021-11-05 03:00:01 UTC
I've also noticed errors in reporting in other fields like [General] with the same steps to reproduce. It seems the BreezeDark ColorScheme is correctly reported in this field, but the name of the theme is still Breeze Light when it should be Breeze Dark.

Example:
```
[General]
ColorScheme=BreezeDark
Name=Breeze Light
```
Comment 2 Nate Graham 2021-11-08 20:15:38 UTC
Cannot reproduce the issue. And the ColorScheme= key is set correctly in the theme definition: https://invent.kde.org/plasma/plasma-workspace/-/blob/master/lookandfeel.dark/contents/defaults#L5.

So if there is a bug here, it must be in the logic that applies it, somehow.

What were your color scheme and global theme set to before you changed the global theme to Breeze Dark?
Comment 3 Seth 2021-11-16 06:52:44 UTC
(In reply to Nate Graham from comment #2)
> Cannot reproduce the issue. And the ColorScheme= key is set correctly in the
> theme definition:
> https://invent.kde.org/plasma/plasma-workspace/-/blob/master/lookandfeel.
> dark/contents/defaults#L5.
> 
> So if there is a bug here, it must be in the logic that applies it, somehow.
> 
> What were your color scheme and global theme set to before you changed the
> global theme to Breeze Dark?

I used the Light Theme preset in the Quick Settings panel in settings.
Comment 4 Nate Graham 2021-11-16 17:54:08 UTC
I did that too and couldn't reproduce the issue.

Again, what were your color scheme and global theme set to before you changed the global theme to Breeze Dark?
Comment 5 Bug Janitor Service 2021-12-01 04:38:36 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 6 Seth 2021-12-02 10:53:58 UTC
(In reply to Nate Graham from comment #4)
> I did that too and couldn't reproduce the issue.
> 
> Again, what were your color scheme and global theme set to before you
> changed the global theme to Breeze Dark?

Sorry about the late reply, I've been a bit busy - but for the global theme I was using Breeze and the color scheme was Breeze Light.
I'm still able to reproduce this on Plasma 5.23.4/Frameworks 5.88.0
Comment 7 Georg Grabler 2021-12-07 22:55:44 UTC
I actually do have the same issue.

I created a new user (it's archlinux, so I get pretty much KDE defaults with Breeze Light).

I went to system settings and chose "Dark Theme", checked apply.

my ~/.config/kdeglobals:
[General]
Name=Breeze Light
shadeSortColumn=true
widgetStyle=Breeze

[KDE]
ColorScheme=BreezeLight
LookAndFeelPackage=org.kde.breezedark.desktop
contrast=4

I edited the file manually to:
[General]
Name=Breeze Dark
shadeSortColumn=true
widgetStyle=Breeze

[KDE]
ColorScheme=BreezeDark
LookAndFeelPackage=org.kde.breezedark.desktop
contrast=4

Went to system settings, and this time applied the "Light Theme", result:
[General]
Name=Breeze Dark
shadeSortColumn=true
widgetStyle=Breeze

[KDE]
ColorScheme=BreezeDark
contrast=4

For me, you clearly write the the file (since LookAndFeelPackage=org.kde.breezedark.desktop disappeared, as expected). The name and ColorScheme and contrast stay (not sure if the contrast should be there in both settings though).

Seems not all is written properly.
Comment 8 Georg Grabler 2021-12-07 23:24:57 UTC
(In reply to Georg Grabler from comment #7)
> I actually do have the same issue.
> 
> I created a new user (it's archlinux, so I get pretty much KDE defaults with
> Breeze Light).
> 
> I went to system settings and chose "Dark Theme", checked apply.
> 
> my ~/.config/kdeglobals:
> [General]
> Name=Breeze Light
> shadeSortColumn=true
> widgetStyle=Breeze
> 
> [KDE]
> ColorScheme=BreezeLight
> LookAndFeelPackage=org.kde.breezedark.desktop
> contrast=4
> 
> I edited the file manually to:
> [General]
> Name=Breeze Dark
> shadeSortColumn=true
> widgetStyle=Breeze
> 
> [KDE]
> ColorScheme=BreezeDark
> LookAndFeelPackage=org.kde.breezedark.desktop
> contrast=4
> 
> Went to system settings, and this time applied the "Light Theme", result:
> [General]
> Name=Breeze Dark
> shadeSortColumn=true
> widgetStyle=Breeze
> 
> [KDE]
> ColorScheme=BreezeDark
> contrast=4
> 
> For me, you clearly write the the file (since
> LookAndFeelPackage=org.kde.breezedark.desktop disappeared, as expected). The
> name and ColorScheme and contrast stay (not sure if the contrast should be
> there in both settings though).
> 
> Seems not all is written properly.

Just checked /usr/share/plasma/look-and-feel/org.kde.breezedark.desktop/contents/defaults and it's actually identical to the one you linked in git.

For me it seems that for some reason some config keys are written, some are not. What does trigger which fields are written to kdeglobal? Couldn't actually find the proper source code, it changed quite a lot in the past two years source-code whise (not anymore in kcmd it seems to me).
Comment 9 Bug Janitor Service 2021-12-22 04:35:23 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 10 Georg Grabler 2021-12-22 18:13:32 UTC
reopening, since the issue still exists.
Comment 11 Knud 2022-03-22 07:41:13 UTC
Have similiar problem

When changing colorscheme  then after 2nd login the line colorscheme=xxxxxx in "~/.configkdeglobals" are removed and used colorscheme revert to default breezelight.

It seems that the line disappear during 1st login after changing the colorscheme, but the visible result is first seen after 2nd login.

Checking kdeglobals before  1st login after change...file is ok
After login colorscheme line are gone
Comment 12 Nate Graham 2022-03-24 02:45:09 UTC
This was fixed in Plasma 5.24 with a re-work of how Global Themes are applied.
Comment 13 Knud 2022-03-24 19:25:24 UTC
I am on 5.24.3-2 F34
A workaround is to write protect "~/.configkdeglobals"
Not nice but works

In a total fresh F34 install in Vbox, it behave sligtly different
It simply does not obey the ~/.configkdeglobals and use breeze Light even if systemsetting-Colors indicate the modified Breezeclassic saved with the new name.
As other have reported

Why my first install (daily use) behave different  ??
Comment 14 Knud 2022-03-24 19:38:46 UTC
Both installs are doing the fail after 2nd login so somewhat the same error mechanisme