Bug 431396 - Window decoration buttons are mis-rendered
Summary: Window decoration buttons are mis-rendered
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_style (show other bugs)
Version: 5.23.5
Platform: Archlinux Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Janet Blackquill
URL: https://invent.kde.org/plasma/kde-gtk...
Keywords:
: 440687 441739 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-01-10 14:55 UTC by Leon De Andrade
Modified: 2022-10-15 09:31 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.22.5


Attachments
Show controls button of Planner (1.47 KB, image/png)
2021-01-10 14:55 UTC, Leon De Andrade
Details
Here is firefox with this issue (Note: I can't reproduce this, it's from another user) (34.90 KB, image/jpeg)
2021-01-10 15:00 UTC, Leon De Andrade
Details
Same Issue in Akira (GTK, Vala) (3.29 KB, image/png)
2021-05-06 10:50 UTC, Leon De Andrade
Details
firefox, breeze dark changed to light (263.59 KB, image/png)
2022-05-19 06:39 UTC, Jin Liu
Details
firefox, breeze light changed to dark (261.84 KB, image/png)
2022-05-19 06:39 UTC, Jin Liu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Leon De Andrade 2021-01-10 14:55:41 UTC
Created attachment 134710 [details]
Show controls button of Planner

SUMMARY

In some applications (which are not qt as far as I can tell) the title bar is rendered incorrectly. The buttons look quite weird. 

Where does it happen? 
- https://github.com/alainm23/planner 

There was once a discussion in a kde telegram group, where other people reported such issues with gtk applications like firefox. But I only have a problem with planner. 

STEPS TO REPRODUCE
1. Open up an application, where this happens


OBSERVED RESULT

See Screenshot for example the close button, which has this white area below it.  


EXPECTED RESULT

Just a normal looking titlebar


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Leon De Andrade 2021-01-10 15:00:11 UTC
Created attachment 134712 [details]
Here is firefox with this issue (Note: I can't reproduce this, it's from another user)

I just attached a second screenshot with the same issue (so it looks) in Firefox. It's not a screenshot from me though, Firefox just works normal for me. 

Also, neither me nor the user with the firefox issue (according to what he said) uses some style configuration. Just the normal breeze theme.
Comment 2 Vlad Zahorodnii 2021-01-11 08:22:49 UTC
The client-side titlebar buttons are not drawn by the compositing manager (kwin). So far, it looks like a GTK configuration issue.

For what it's worth, GTK applications suffer from the same issue when running in Plasma on Wayland session. However, it can be easily fixed by installing xdg-desktop-portal-gtk and gnome-settings-daemon. Hope this helps.
Comment 3 Leon De Andrade 2021-02-18 18:29:19 UTC
Hi, 
sorry for the late answer. Unfortunately installing these packages didn't resolve the issue. 
Furthermore, I also found out that the issue is X11 only. I don't have that problem on wayland.

Any other ideas?
Comment 4 Leon De Andrade 2021-05-06 10:50:40 UTC
Created attachment 138185 [details]
Same Issue in Akira (GTK, Vala)

I found another application with this issue. It's like Planner as well a Vala GTK Application.
Comment 5 David Edmundson 2021-05-06 10:58:03 UTC
>I don't have that problem on wayland.

On wayland GTK apps are surprisingly better at using our decorations.
As for this, it's not a kwin issue so I'll move to a general pool where it can be triaged somewhere else.
Comment 6 Nate Graham 2021-06-15 23:37:33 UTC
Ah this. It was fixed in Plasma 5.22 IIRC.
Comment 7 Leon De Andrade 2021-06-17 07:30:43 UTC
The issue is not fixed for me. I'm on 5.22.1 and Frameworks 5.83.0
Comment 8 Nate Graham 2021-08-09 16:48:46 UTC
*** Bug 440687 has been marked as a duplicate of this bug. ***
Comment 9 Mikhail Zolotukhin 2021-08-14 15:13:32 UTC
This needs to be tested after [!31](https://invent.kde.org/plasma/kde-gtk-config/-/merge_requests/31) is merged.
Comment 10 Nate Graham 2021-08-30 16:14:26 UTC
*** Bug 441739 has been marked as a duplicate of this bug. ***
Comment 11 Adam Fontenot 2022-01-29 09:41:21 UTC
I'm reopening this because I still see this issue with the latest released version, at least with a certain type of window (dialogs). You can test this with the eog application (Gnome's image viewer) by opening the preferences dialog window. Stuff I've noticed:

window_decorations.css gets added to my ~/.config/gtk-3.0/directory automatically, if I delete it and log in again.

The GTK inspector tool says that a background image is being added to the close button by window_decorations.css.

The specific issue with dialogs was reported here and closed as a dupe of this bug: https://bugs.kde.org/show_bug.cgi?id=440687 

I'm assuming that the issue is general enough that it makes sense to reopen this one. If someone disagrees, feel free to close this one again and reopen the other one. I will add myself to CC on both so I can respond to any questions if this proves hard to reproduce.
Comment 12 Janet Blackquill 2022-02-11 18:42:50 UTC
Cannot reproduce; if you can still reproduce, this is likely an issue with kde-gtk-config and not Breeze GTK. Moving this there.
Comment 13 Adam Fontenot 2022-04-08 08:18:31 UTC
(In reply to Jan Blackquill from comment #12)
> Cannot reproduce; if you can still reproduce, this is likely an issue with
> kde-gtk-config and not Breeze GTK. Moving this there.

I can still reproduce this. Here's a quick screenshot of the eye of gnome (image viewer) preferences window: https://i.imgur.com/9N4JNf6.png

It doesn't look like this bug is filed against kde-gtk-config. Do you want me to file a new bug to follow up on this issue?
Comment 14 Nate Graham 2022-04-08 16:34:34 UTC
we track those bugs here in systemsettings | kcm_style. So it's in the right place.

What Plasma version are you using, Adam?
Comment 15 Adam Fontenot 2022-04-10 09:38:41 UTC
(In reply to Nate Graham from comment #14)
> we track those bugs here in systemsettings | kcm_style. So it's in the right
> place.
> 
> What Plasma version are you using, Adam?

Reproduced it just now with 5.24.4, official Arch Linux package.
Comment 16 Jin Liu 2022-05-19 05:07:51 UTC
I can reproduce this bug in the latest release:

1. trash ~/.config/gtk-3.0
2. set global theme to Breeze
3. in kde-gtk-config, set theme to Breeze
4. set global theme to Breeze Dark
5. open Firefox
6. now titlebar buttons are misrendered

How to fix it:
1. trash ~/.config/gtk-3.0
2. in kde-gtk-config, set theme to Breeze

So seems the problem is that kde-gtk doesn't regenerate gtk config files when kde global theme changes.
Comment 17 Adam Fontenot 2022-05-19 05:41:23 UTC
(In reply to Jin Liu from comment #16)
> How to fix it:
> 1. trash ~/.config/gtk-3.0
> 2. in kde-gtk-config, set theme to Breeze
> 
> So seems the problem is that kde-gtk doesn't regenerate gtk config files
> when kde global theme changes.

This didn't fix the issue for me, I think you might be seeing something else. Maybe you can provide a screenshot of what you see? I think if KDE is supposed to changing the gtk config when the global theme changes (maybe Nate can confirm?), if it is not doing that, it's probably a separate bug.
Comment 18 Jin Liu 2022-05-19 06:39:22 UTC
Created attachment 148987 [details]
firefox, breeze dark changed to light
Comment 19 Jin Liu 2022-05-19 06:39:52 UTC
Created attachment 148988 [details]
firefox, breeze light changed to dark
Comment 20 Jin Liu 2022-05-19 06:47:59 UTC
(In reply to Adam Fontenot from comment #17)
> (In reply to Jin Liu from comment #16)
> > How to fix it:
> > 1. trash ~/.config/gtk-3.0
> > 2. in kde-gtk-config, set theme to Breeze
> > 
> > So seems the problem is that kde-gtk doesn't regenerate gtk config files
> > when kde global theme changes.
> 
> This didn't fix the issue for me, I think you might be seeing something
> else. Maybe you can provide a screenshot of what you see? I think if KDE is
> supposed to changing the gtk config when the global theme changes (maybe
> Nate can confirm?), if it is not doing that, it's probably a separate bug.

Uploaded two screenshots. I think they are quite like the visual glitch in previous screenshots (even with the same strange-shaped red hover effect in the second (firefox) screenshot, although not captured in my screenshots).
Comment 21 Adam Fontenot 2022-10-15 09:31:14 UTC
Can't currently repro this with Plasma 5.26, testing eog 42.3. Assuming it was fixed.

Going to close this issue. If there are issues that appear without theme changes (e.g. you see the problem after a reboot), please re-open the bug.

If you see an issue where GTK applications don't update after making changes to your theme, please file a new bug.