Bug 459071 - Changing color scheme doesn't immediately change the colors of ListView delegates in a Kirigami.ScrollablePage; need to restart the app
Summary: Changing color scheme doesn't immediately change the colors of ListView deleg...
Status: CONFIRMED
Alias: None
Product: frameworks-kirigami
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: Master
Platform: Other Linux
: NOR normal
Target Milestone: Not decided
Assignee: kdelibs bugs
URL:
Keywords:
: 464858 465356 470261 470287 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-09-13 19:21 UTC by postix
Modified: 2023-06-06 16:08 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot (156.01 KB, image/png)
2022-09-13 19:21 UTC, postix
Details
Screenshot: KInfocenter (257.00 KB, image/png)
2022-09-28 12:52 UTC, postix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description postix 2022-09-13 19:21:51 UTC
Created attachment 152034 [details]
Screenshot

STEPS TO REPRODUCE
0. Use Breeze Dark
1.  Open Systemsettings
2.  Click on Breeze
3.  Click apply

OBSERVED RESULT
"Appearance" on the left keeps having a white font inherited from Breeze Dark.
The same happens vice versa, i.e. Breeze Dark --> Breeze.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20220911
KDE Plasma Version: 5.25.5
KDE Frameworks Version: 5.97.0
Qt Version: 5.15.5
Graphics Platform: Wayland
Comment 1 Nate Graham 2022-09-14 17:39:56 UTC
Can reproduce, weird!

This doesn't happen when changing global themes in the Global Themes KCM; only when using the items on the Quick Settings page.
Comment 2 postix 2022-09-28 12:52:36 UTC
Created attachment 152490 [details]
Screenshot: KInfocenter

I can reproduce the same issue for KInfoCenter:

0. Set theme to Breeze
1. Open KInfoCenter
2. Go the Energy section
3. Change the global theme from Breeze to Breeze Dark

or interchange Breeze <--> Breeze Dark.

So this seems to be a Breeze, Kirigami or Qt issue?
Comment 3 postix 2022-09-28 12:53:21 UTC
^ Reproduced on 5.25.5 Wayland and 5.26.80 (git master) Wayland
Comment 4 postix 2022-10-19 13:15:40 UTC
I also noticed the same issue, when changing the accent color: All colors change, but the one for the "Appearance" item.
Comment 5 Nate Graham 2023-01-27 17:38:21 UTC
*** Bug 464858 has been marked as a duplicate of this bug. ***
Comment 6 Nate Graham 2023-02-07 18:08:02 UTC
*** Bug 465356 has been marked as a duplicate of this bug. ***
Comment 7 youkai 2023-02-25 09:24:53 UTC
It seems like this behavior is not particularly related to the "Appearance" category, rather it's about the first element shown in the ListView. This can be demonstrated by editing any other category inside "../kde/src/systemsettings/categories" so it's "X-KDE-System-Settings-Parent-Category" is "rootcategory". Then change the "X-KDE-Weight" of the appearance category to be some high value (e.g. 99) so it's not the first in the ListView.

After encountering this bug: reducing the systemsettings app to it's minimal size and scrolling all the way down and then up again deletes and re-creates the appearance delegate, giving it the correct text color. 
More importantly once the delegate is re-created it will always have the correct color even after further theme changes.

It's strange that only the very first delegate observes this behavior, and my QT-fu isn't advanced enough to troubleshoot the underlying issue. That being said I might have a fix for the symptoms ready soon.
Comment 8 Bug Janitor Service 2023-02-25 10:10:55 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/systemsettings/-/merge_requests/202
Comment 9 Nate Graham 2023-05-31 18:31:35 UTC
*** Bug 470261 has been marked as a duplicate of this bug. ***
Comment 10 Nate Graham 2023-05-31 18:48:37 UTC
*** Bug 470287 has been marked as a duplicate of this bug. ***
Comment 11 Nate Graham 2023-06-02 15:43:52 UTC
Upon re-testing, this appears to be fixed in Plasma 6 already!
Comment 12 ratijas 2023-06-03 11:37:59 UTC
Here's a "minimal" reproducible example with Kirigami.ScrollablePage. It's still broken for me with KF6 and Qt 6.5.1

https://invent.kde.org/frameworks/kirigami/-/snippets/2691

It's "minimal" in quotes because Kirigami itself it doing a lot of magic. The snippet works correctly with Kirigami.Page as root component, so that means it's particularly ScrollablePage that does some unspeakable things that break theming
Comment 13 Nate Graham 2023-06-06 16:08:32 UTC
Can reproduce with that minimal example.

Re-confirming, but downgrading the severity for now since the issue is at least not affecting System Settings anymore, which was the most user-visible example of it