Bug 381799 - Ugly borders on menus created by plasmashell
Summary: Ugly borders on menus created by plasmashell
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (show other bugs)
Version: 5.10.3
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: David Edmundson
URL:
Keywords:
: 385311 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-06-29 14:56 UTC by Antonio Orefice
Modified: 2021-03-23 14:33 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antonio Orefice 2017-06-29 14:56:18 UTC
As you can see from the linked pictures, the border drawn around the menu that pops up over the plasmashell desktop is black, and round borders are gone:

http://wpage.unina.it/aorefice/sharevari/plasma_menu.png
Here is another menu from "konsole" application:
http://wpage.unina.it/aorefice/sharevari/konsole_menu.png
Note how the fonts look different too.

With breeze widjet style this is less evident because the menu are squared, but if you look closely, you can spot black pixels at the 4 corners.

Funny enough, disabling compositing brings the rounded corners back.
Comment 1 Kai Uwe Broulik 2017-06-30 08:05:18 UTC
Urgh, wow, I can confirm. This looks like it is a Qt 5.9 regression, I don't recall this happening, but I could be wrong.

Seems to affect any widget style (also MS Win 9x and Fusion), I can only see plasmashell doing it. If I run a widget in plasmoidviewer or plasmawindowed, it does not show this issue. Very strange.
Comment 2 Marco Martin 2017-06-30 08:12:53 UTC
on a related note (may be connected, or may not) i recall this problem happening on those menus on very early 5.0 days
Comment 3 Thomas Lübking 2017-06-30 12:58:57 UTC
"xwininfo | grep Depth" will likely reveal that it's not a 32bit drawable?
Comment 4 Antonio Orefice 2017-06-30 13:05:24 UTC
i've done it:
koko@Gozer# sleep 5 ; xwininfo | grep Depth
Popped up the menu via the keyboard menu key, and got:
"Depth: 24"
Comment 5 Antonio Orefice 2017-10-16 11:41:45 UTC
I don't know it it was always that way, i don't think so, but since i upgraded to 5.11 the issue seems to have spreaded to dolphin too.
in particular when i drag and drop a file, the menu offering options to Copy,link,cancel have ugly borders too.
Comment 6 Kai Uwe Broulik 2017-11-23 13:33:34 UTC
*** Bug 385311 has been marked as a duplicate of this bug. ***
Comment 7 Kai Uwe Broulik 2017-11-24 09:41:13 UTC
Git commit f395097fe90b0deaf5511a5ce748bed0de85b1d8 by Kai Uwe Broulik.
Committed on 24/11/2017 at 09:40.
Pushed by broulik into branch 'master'.

[Containment Interface] Set WA_TranslucentBackground before accessing winId()

This would create the surface after which this flag has no effect causing menus to have black rounded corners.

CHANGELOG: Fixed an issue where context menus would appear with broken corners

Differential Revision: https://phabricator.kde.org/D8963

M  +6    -6    src/scriptengines/qml/plasmoid/containmentinterface.cpp

https://commits.kde.org/plasma-framework/f395097fe90b0deaf5511a5ce748bed0de85b1d8
Comment 8 Kai Uwe Broulik 2017-11-24 09:41:14 UTC
Git commit facaaf93d016e8f9766a6befb9022a01c2f0086f by Kai Uwe Broulik.
Committed on 24/11/2017 at 09:40.
Pushed by broulik into branch 'master'.

[PlasmaComponents Menu] Set WA_TranslucentBackground on the underlying QMenu

This ensures the menu can have nice round corners with Breeze and Oxygen. The same had already been done in ContainmentInterface's menu.

CHANGELOG: Fixed an issue where PlasmaComponents Menu would appear with broken corners

Differential Revision: https://phabricator.kde.org/D8965

M  +5    -0    src/declarativeimports/plasmacomponents/qmenu.cpp

https://commits.kde.org/plasma-framework/facaaf93d016e8f9766a6befb9022a01c2f0086f
Comment 9 Kai Uwe Broulik 2017-11-24 09:45:29 UTC
The issue is that we started setting a transientParent for menus in various places. For this we need the window handle and that creates the surface and only afterwards in polish() Breeze sets the TranslucentBackgroundFlag which is already too late. I'll try to find a better fix (read: hack) in Breeze so it works everywhere.
Comment 10 Antonio Orefice 2017-11-24 11:59:43 UTC
Thanks, but what about oxygen?
Comment 11 Kai Uwe Broulik 2017-11-24 14:34:44 UTC
Breeze codebase is derived from Oxygen, once I have a solution for Breeze (I have not) I will apply the same fix to Oxygen.
Comment 12 Antonio Orefice 2017-12-18 13:03:59 UTC
Is this fixed right?
I've no more ugly borders on 5.11.4
Comment 13 Antonio Orefice 2017-12-18 13:06:02 UTC
Wops, well the menus created by plasmashell do look nice, but as i wrote in "Comment 5", the menus created by dolphin when dragging/dropping, are still ugly.
Comment 14 Antonio Orefice 2018-01-31 14:33:52 UTC
I just noticed that within dolphin itself, the popup menu that appears if i right-click in the location bar  (undo,redo,cut.copy,paste) is fine.
While if i do the same in the filter textbox, is ugly.
Similar things happen for okular as well (context menu of the texboxes under "thumbnails","reviews","bookmarks" are fine, while context menu over the combobox of the zoom is ugly.
kwrite is no exception, menus seems fine everywhere, but if i right click on the menu-bar, the single item ([x]Main toolbar) menu that appears, is ugly.

...There are other examples.
Comment 15 Nate Graham 2021-03-10 02:21:35 UTC
Can you reproduce in Plasma 5.21 with Qt 5.15.2 or newer? It all looks fine for me now, after being broken for quite a while.
Comment 16 Antonio Orefice 2021-03-10 10:26:12 UTC
Hi Nate, i'm still on 5.20 and i will update everything as soon as linux 5.12 will be released.
By now, with qt 5.12.2 and plasma 5.20.3, i still observe everything described in comment #14
Comment 17 Antonio Orefice 2021-03-10 10:26:44 UTC
Wops, qt 5.15.2
Comment 18 Antonio Orefice 2021-03-23 14:33:41 UTC
Thenks seems fixed now