Bug 103166 - CONTEXT MENU: Visual artifact when displaying empty submenus GTK3
Summary: CONTEXT MENU: Visual artifact when displaying empty submenus GTK3
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
5.2.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:5.3.0
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-12 17:33 UTC by Xisco Faulí
Modified: 2016-10-17 13:00 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2016-10-12 17:33:32 UTC
Steps to reproduce:
1. Open Calc
2. Insert an image
3. Right click on the picture
4. Move to Align or Group

Observed Behaviour: one tiny line is displayed

Expected Behaviour: <No selection possible> submenu should be displayed

Regression introduced in https://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=f84b8c03462238b821724b7f504ad141c83fcf8f..6851e977f71075c2f43b967a52dc1d035a75b0f2
Comment 1 tommy27 2016-10-12 19:25:38 UTC
would you please post a screenshot regarding that "tiny line" ?

I don't reproduce you bug under Win8.1 x64 using LibO 5.2.1.2 and 5.3.0.0+ alpha

I correctly see the <No selection possible> submenu
Comment 2 Maxim Monastirsky 2016-10-12 20:36:37 UTC
It's the "gtk3: implement native context menus" commit. The <No selection possible> item isn't supported there, and also not under macOS. But is should still work where we still use non-native menus (i.e. gen, gtk2, Windows).
Comment 3 Xisco Faulí 2016-10-12 21:27:43 UTC
Moving it to NEW as the problematic commit has been identified.
Regression introduced by a0c700b1493c7b51540d1e77b44d1edd9bf920f0 according to comment 2

Adding Cc: to Caolán McNamara
Comment 4 Caolán McNamara 2016-10-13 10:59:50 UTC
Probably should fix this at a higher level and menus should disable an entry if its submenu is empty, but I guess that's not always known until activate time and then we probably do down another path of horrors.

I'll drop "regression", as its just "different" and everything is a regression otherwise, but I'll still stick in a workaround
Comment 5 Commit Notification 2016-10-13 11:02:59 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=96d0aa8ca4f841fd5217b863b976c81959e4aca9

Resolves: tdf#103166 if the menu is empty, add a disabled placeholder

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2016-10-17 13:00:35 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=8bff380fed975dc7f6365b7f2ca7213c3cf4d302

Related: tdf#103166 but still allow removing placeholder submenus

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.