Download it now!
Bug 121159 - Icons are making menu entries indented
Summary: Icons are making menu entries indented
Status: RESOLVED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
6.2.0.0.alpha1+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: GTK3
  Show dependency treegraph
 
Reported: 2018-11-04 14:05 UTC by Sabri Unal
Modified: 2018-11-04 21:30 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Menu comparison for Writer Full (726.31 KB, image/png)
2018-11-04 14:06 UTC, Sabri Unal
Details
Alternative - Menu comparison for Writer First Part (457.65 KB, image/png)
2018-11-04 14:07 UTC, Sabri Unal
Details
Alternative - Menu comparison for Writer Second Part (263.72 KB, image/png)
2018-11-04 14:08 UTC, Sabri Unal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sabri Unal 2018-11-04 14:05:16 UTC
İf use icons option was activated icons make an indent on LibreOffice menu entries.

I have tested this situation with Ubuntu 18.04 / Ubuntu 18.10 and other Linux derivates forcing vcl to gtk3 and kde5.

But they are in a perfect shape on vcl=win, gtk and gen.

I prepared a visual comparison list/image between gtk and gtk3 for Writer menus.
Comment 1 Sabri Unal 2018-11-04 14:06:54 UTC
Created attachment 146293 [details]
Menu comparison for Writer Full
Comment 2 Sabri Unal 2018-11-04 14:07:46 UTC
Created attachment 146294 [details]
Alternative - Menu comparison for Writer First Part
Comment 3 Sabri Unal 2018-11-04 14:08:14 UTC
Created attachment 146295 [details]
Alternative - Menu comparison for Writer Second Part
Comment 4 Sabri Unal 2018-11-04 14:12:18 UTC
Version Information

Version: 6.2.0.0.alpha1+
Build ID: 2cef68a605494bcef0388201b1058c95788c45a8
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2018-11-03_00:54:52
Locale: tr-TR (en_GB.UTF-8); Calc: threaded
Comment 5 V Stuart Foote 2018-11-04 14:39:25 UTC
It does seem the width is calculated too wide when Tools -> Options -> View: Icons in Menus is enabled. Thopugh I would expect some increase in width, bcz showing both a checkbox/radio button and the icon when enabled with gtk3, kde5

In Windows builds, the checkbox/radio button is merged and shows as a selected/unselected state--menu width is kept close to the same when enabled.
Comment 6 Caolán McNamara 2018-11-04 15:48:13 UTC
Under gtk3 libreoffice does not render the menus itself. It uses a GMenuModel (https://developer.gnome.org/gio//2.54/GMenuModel.html) to present the contents of the menu hierarchy to gtk (https://developer.gnome.org/gtk3/stable/GtkMenuBar.html#gtk-menu-bar-new-from-model) and gtk does the rendering.

AFAIKS its not so much that there is too much indent, its that there's a column reserved for the stateful cases, checkbox/radiobutton indicator, which is separate for the rest of the entry which may or may not have an icon. While LibreOffice's own menu rendered bundles statefulness into the icon when present.

Anyhow, as far as I tell, there's no ability on the libreoffice side of things to control that while using a GMenuModel and such change would have to happen in gtk instead
Comment 7 V Stuart Foote 2018-11-04 20:22:14 UTC
(In reply to Caolán McNamara from comment #6)
> ...
> AFAIKS its not so much that there is too much indent, its that there's a
> column reserved for the stateful cases, checkbox/radiobutton indicator,
> which is separate for the rest of the entry which may or may not have an
> icon. While LibreOffice's own menu rendered bundles statefulness into the
> icon when present.
> 
> Anyhow, as far as I tell, there's no ability on the libreoffice side of
> things to control that while using a GMenuModel and such change would have
> to happen in gtk instead

OK, if we have no control over it...

Looking at attachment 146295 [details], it seemed that with the extra entry, the spacing between the label and the shortcut entry--if any--increased; as if the width of the label attribute is increasing with additon of a second icon attribute.
Comment 8 Caolán McNamara 2018-11-04 21:30:13 UTC
If we're now talking about on the right hand side, the distance from the ends of the labels to the start of the short-cut then I imagine the native gtk3 menu is putting all the entries effectively into columns of "checkbutton", "image + label", "short cuts". So that a long text for a short-cut of say, ctrl+alt+e for extension manager, is factored into the spacing for all entries in that menu. While the built-in libreoffice menu, themed to look like a gtk2 menu, is laying out each line separately, so ctrl+f12 in "insert table" overlaps, in a column sense, with the labels of following lines.

But anyway, we're not doing the layout in the native gtk3 menus, gtk is.