Bug 141135 - GTK3 version: in tabbed, tabbed compact, and groupedbar compact toolbar modes, the menu entries to switch between Normal and Web view modes are checkboxes instead of radiobuttons
Summary: GTK3 version: in tabbed, tabbed compact, and groupedbar compact toolbar modes...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All Linux (All)
: medium minor
Assignee: Not Assigned
URL:
Whiteboard: target:24.2.0
Keywords:
Depends on:
Blocks: Notebookbar
  Show dependency treegraph
 
Reported: 2021-03-20 23:16 UTC by Jeff Fortin Tam
Modified: 2023-07-12 00:33 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
screenshot from the tabbed toolbar View menubutton (20.14 KB, image/png)
2021-03-20 23:17 UTC, Jeff Fortin Tam
Details
screenshot from the groupedbar View menubutton (12.93 KB, image/png)
2021-03-20 23:18 UTC, Jeff Fortin Tam
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Fortin Tam 2021-03-20 23:16:58 UTC
In the traditional View menu, the "Normal" and "Web" modes are correctly shown as radiobuttons of the same group, since they are mutually exclusive.

In the alternative toolbar modes such as tabbed and groupedbar toolbars, when you use the View menubutton, they are shown as checkboxes instead of radiobuttons.

See attached screenshots.
Comment 1 Jeff Fortin Tam 2021-03-20 23:17:48 UTC
Created attachment 170597 [details]
screenshot from the tabbed toolbar View menubutton
Comment 2 Jeff Fortin Tam 2021-03-20 23:18:13 UTC
Created attachment 170598 [details]
screenshot from the groupedbar View menubutton
Comment 3 Buovjaga 2022-03-17 14:57:27 UTC
Repro

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 71b952340726190d1f178ef0dadfa89677f2c1dd
CPU threads: 8; OS: Linux 5.16; UI render: default; VCL: gtk3
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded Jumbo
Comment 4 Justin L 2022-08-29 21:16:40 UTC
In the normal menu these are:
      <menu:menuitem menu:id=".uno:PrintLayout" menu:style="radio"/>
      <menu:menuitem menu:id=".uno:BrowseView" menu:style="radio"/>

In the notebookbar .ui files, I don't see anywhere that indicates a checkbox. There are various browseview.* images in the icon-themes folder, but the ones I looked at are very different.

I'm going to guess it is this line specifying an VclOptionalBox:
object class="VclOptionalBox" id="View-Section-View1
Comment 5 Justin L 2023-05-15 22:05:08 UTC
in LO 5.1, the menu switched from icons to radio buttons. I looked in the patch range indicated by bibisect, but didn't find any clue.

git log -p  \ 47cddc662efc470505f0b76427fa3092bae5550a..e2e058d450c1d2fdc6230933ec66c037971b9aea
Comment 6 Justin L 2023-06-29 16:30:23 UTC
Anything that toggles appears to be treated as a checkbox in NBB. For example uno:PrintPreview. So probably something inherent in the NBB design itself.
Comment 7 Maxim Monastirsky 2023-07-10 18:55:02 UTC
In Glade it's possible to use GtkRadioMenuItem instead of GtkMenuItem to get a radio button. The normal menu also defaults to a checkbox unless overriden locally with menu:style="radio". There is no difference between the normal menu and the NBB in this regard.
Comment 8 Commit Notification 2023-07-12 00:18:33 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9a020a155eaad3f318ac44c6e54a502f64e6b982

tdf#141135 notebookbar: use radio buttons instead of checkboxes

It will be available in 24.2.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.
Comment 9 Justin L 2023-07-12 00:33:27 UTC
.uno:SelectionModeDefault/.uno:SelectionModeBlock in Writer Home menu looked like candidates for radio buttons, but they are not quite appropriate. They are really toggle buttons. Standard select mode is normally on, but turning it off automatically sets block selection mode, and vice versa. They don't act like radio buttons because if standard is enabled, and you click standard again it doesn't remain their (like you would expect with a radio button) but instead it alternates to block mode.

The effect is more clearly seen with calc's numbering format, where currency etc can be toggled on or off. All of those toggle off and return back to general. So that also is not an appropriate area for radio buttons.

Somewhat similarly, subscript/superscript are mutually exclusive, but not radio buttons because they can both be turned off.

This bug report is solved.