Bug 123261 - Styles Menubar show icons
Summary: Styles Menubar show icons
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: target:6.3.0
Keywords:
Depends on:
Blocks: Main-Menu
  Show dependency treegraph
 
Reported: 2019-02-08 11:10 UTC by andreas_k
Modified: 2019-02-18 09:06 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Styles Menubar (35.70 KB, image/jpeg)
2019-02-08 11:10 UTC, andreas_k
Details
DefaultCharStyle (296.20 KB, image/png)
2019-02-11 15:16 UTC, andreas_k
Details

Note You need to log in before you can comment on or make changes to this bug.
Description andreas_k 2019-02-08 11:10:53 UTC
Created attachment 149020 [details]
Styles Menubar

In the (styles) toolbar we show icons for the different styles, why we don't show the icons in the menubar?
Comment 1 Heiko Tietze 2019-02-11 08:50:18 UTC
(In reply to andreas_k from comment #0)
> In the (styles) toolbar we show icons for the different styles, why we don't
> show the icons in the menubar?

Radio buttons are easier to recognize. But IIRC there was also a bug. Maxim, your memory is more capable... :-)
Comment 2 Maxim Monastirsky 2019-02-11 13:29:25 UTC
(In reply to Heiko Tietze from comment #1)
> Radio buttons are easier to recognize. But IIRC there was also a bug. Maxim,
> your memory is more capable... :-)
No bug that I'm aware of. Only that there's a difference in how this case of a radiobutton+icon is shown across different platforms. For platforms with native menus (gtk3, qt5, macOS), the radio button and the icon will be shown *both*, next to each other. While for other platforms only the icon will be shown, only that it will have a frame around it when that radio button is active.

And we already show icons for styles in the context menu (except that the context menu use checkboxes instead of radio buttons, which probably should be corrected), so that's a pure UX question whether we should do the same for the main menu.
Comment 3 andreas_k 2019-02-11 14:05:58 UTC
As I don't understood why the styles commands should have an radiobutton, and show radiobutton more like an hack is (you have to define it in addition), I'm for remove the hack and show the icon only, like we have it in the context menu.

But Maxim is true it should be consistent.
Comment 4 Maxim Monastirsky 2019-02-11 14:22:11 UTC
(In reply to andreas_k from comment #3)
> As I don't understood why the styles commands should have an radiobutton,
It was requested in Bug 106999 to have an indication when a style entry is active.

> and show radiobutton more like an hack is (you have to define it in
> addition),
If you don't define a radio button you get a checkbox, which doesn't fit as styles are mutually exclusive.

> I'm for remove the hack and show the icon only, like we have it
> in the context menu.
As said, that's *not* the case in e.g. gtk3 where the context menu shows an icon *and* a checkbox. Style commands have either a radio button or a checkbox, and there's no way around it (except reverting the fix of Bug 106999, but that will also affect the toolbar).
Comment 5 andreas_k 2019-02-11 14:30:44 UTC
can we show both radio button and icon.
Comment 6 Heiko Tietze 2019-02-11 14:38:30 UTC
(In reply to Maxim Monastirsky from comment #4)
> As said, that's *not* the case in e.g. gtk3 where the context menu shows an
> icon *and* a checkbox. 

Side note: on my LXQt desktop with Breeze as Gtk2/3 theme I don't get icons and radio buttons neither with SAL_USE_VCLPLUGIN=gtk nor gtk3 (show icons is enabled in KDE settings > widget style on gnome apps). Icons are shown ("Edit Styles" for example) at least with gtk2.

Haven't compiled for qt5 since a while.
Comment 7 andreas_k 2019-02-11 14:55:39 UTC
(In reply to Heiko Tietze from comment #6)
> (In reply to Maxim Monastirsky from comment #4)
> > As said, that's *not* the case in e.g. gtk3 where the context menu shows an
> > icon *and* a checkbox. 
> 
> Side note: on my LXQt desktop with Breeze as Gtk2/3 theme I don't get icons
> and radio buttons neither with SAL_USE_VCLPLUGIN=gtk nor gtk3 (show icons is
> enabled in KDE settings > widget style on gnome apps). Icons are shown
> ("Edit Styles" for example) at least with gtk2.
> 
> Haven't compiled for qt5 since a while.

there is an setting for show icons by default gtk3 didn't show icons (which will follow in another bug report)
Comment 8 Maxim Monastirsky 2019-02-11 15:03:10 UTC
(In reply to andreas_k from comment #5)
> can we show both radio button and icon.
Yes, e.g. take a look at View > Normal menu item.

(In reply to Heiko Tietze from comment #6)
> Side note: on my LXQt desktop with Breeze as Gtk2/3 theme I don't get icons
> and radio buttons neither with SAL_USE_VCLPLUGIN=gtk nor gtk3 (show icons is
> enabled in KDE settings > widget style on gnome apps).
Note that for gtk3 we don't follow the system settings at all, so you won't see any icons in menus unless explicitly enabled under Tools > Options...

> Icons are shown
> ("Edit Styles" for example) at least with gtk2.
Are you talking about the main menu here? Because the context menu does show the icons for me. And the main menu is expected to not show icons currently, as that's what this bug is discussing (the reason is that the main menu uses different commands than the context menu, e.g. .uno:DefaultCharStyle vs .uno:StyleApply?Style:string=Standard&FamilyName:string=CharacterStyles).
Comment 9 andreas_k 2019-02-11 15:16:59 UTC
Created attachment 149148 [details]
DefaultCharStyle

I would use 

menu:id=".uno:DefaultCharStyle" menu:style="radio"

first selected item in the screenshot the the one with radio button and icon.

than I would change the behaviour also in context menu and calc, ... whereever styles was used.
Comment 10 Heiko Tietze 2019-02-11 17:45:52 UTC
(In reply to Maxim Monastirsky from comment #8)
> Note that for gtk3 we don't follow the system settings at all, so you won't
> see any icons in menus unless explicitly enabled under Tools > Options...

Automatic is a scam :-)
Comment 11 Heiko Tietze 2019-02-14 13:44:03 UTC
We discussed the idea in the design meeting. There is no objection to have icons next to the radio buttons and the change is welcome.
Comment 12 Commit Notification 2019-02-18 09:06:06 UTC
andreas kainz committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/0887b47f9b272a8256a6889a912394e7cbda4c6f%5E%21

tdf#123261 Styles items get checkbox option in menubar and popupmenu

It will be available in 6.3.0.

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

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