Bug Hunting Session
Bug 124673 - why toggle function DrawText, HyperlinkDialog and Horizontal Line
Summary: why toggle function DrawText, HyperlinkDialog and Horizontal Line
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Main-Menu
  Show dependency treegraph
 
Reported: 2019-04-11 08:21 UTC by andreas_k
Modified: 2019-06-13 14:22 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
writer -> menubar -> insert -> toggle (47.99 KB, image/png)
2019-04-15 14:54 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-04-11 08:21:25 UTC
open writer -> menubar -> insert there are 3 toggle functions
- DrawText
- HyperlinkDialog
- Horizontal Line

why are this 3 items toglle functions with an checkbox, cause nothing happen when DrawText is checked. Same for the other two functions.
Comment 1 Roman Kuznetsov 2019-04-11 09:20:10 UTC
Andreas, please add a screenshot. I think it's kde5/gtk3 problem with checkboxes in main menu like bug 123114
Comment 2 andreas_k 2019-04-11 09:32:25 UTC
that's not related to bug 123114 cause this is not how to show toggles. This bug say the three items should have toggles at all.
Comment 3 Heiko Tietze 2019-04-11 11:53:57 UTC
The hyperlink dialog is amodal and can stay open while editing. So toggle makes sense. Add Horizontal Line is similar, it adds a ruler at this position until switched off. I'm not sure about the Text Box (guess you mean this with DrawText).
Comment 4 Heiko Tietze 2019-04-11 11:56:01 UTC
(In reply to Heiko Tietze from comment #3)
> Add Horizontal Line is similar...

But since switching off doesn't remove the HR I would also rather not toggle it.
Comment 5 andreas_k 2019-04-15 14:52:46 UTC
When I activate the toggle I would think that this command is activated and I can draw an horizontal line, DrawText, but it's not activated when the toggle is set, so I don't see an benefit of have the toggle.
Comment 6 andreas_k 2019-04-15 14:54:01 UTC
Created attachment 150773 [details]
writer -> menubar -> insert -> toggle
Comment 7 Cor Nouws 2019-06-12 08:37:25 UTC
(In reply to andreas_k from comment #0)
> - DrawText
> - Horizontal Line

Should not be there indeed
Comment 8 V Stuart Foote 2019-06-12 12:11:24 UTC
On Windows builds we don't see a checkbox of course (as noted by Roman), but the "selected" status for a -Draw- Text Box object does not make sense--you can only add one Text box at a time. And as soon as the box outline is made and text entry starts the mode releases.

Likewise it doesn't make much sense for its toolbar button to show the selection status either--but that is in the distant past.

Suspect a number of these toggled selections are hold overs from how the UNO commands were created/migrated as toolbar buttons first and then picked up as menu items.

In that context the Horizontal Rule currently only applies the Horizontal Rule style to a newly inserted empty paragraph--but it used to offer a selection including gallery clipart, and could be toggled?

I'm sure there are others across the menus/toolbars where the actions probably need to be tweaked for consistency.

And as Heiko notes, the Hyperlink action is amodal dialog, and should provide a toggled selected checkbox.
Comment 9 Maxim Monastirsky 2019-06-12 12:37:41 UTC
(In reply to andreas_k from comment #0)
> - DrawText
This is a toggle, because when checked you're in a draw mode and can draw a text box. (The UI changes too: In the standard toolbar UI, the formatting toolbar disappears, and the drawing object properties toolbar takes its place. In the notebookbar UI, the drawing context activates.)

The toggle is mostly important for the toolbar button, as we want it to become pressed after clicking it. There's no way of having the toolbar button pressed, but not having a checkbox in the same command placed in a menu.

> - Horizontal Line
Technically, this doesn't insert a line, but sets the "Horizontal Line" paragraph style to the current paragraph. I agree that it isn't good to have a checkbox if it isn't possible to turn this off (and probably it won't be possible to implement, as it isn't clear which paragraph style set instead). So either we find a way to hide the checkbox (e.g. wrap the style setting with a new uno command), or simply move this item into the "Styles" menu where it really belongs.
Comment 10 Heiko Tietze 2019-06-13 07:47:49 UTC
Let's summarize:

* Keep Hyperlink as it is; the function dialog is amodal (while I would change this some users would call it a regression)
* Untoggle Draw Text (both menu and toolbar); there is no benefit to indicate the draw text function to be active as it is shown by the changed cursor.
* Untoggle Horizontal Rule; Unchecking has no effect and it's not repeatable; while technically it is a style users expect to _insert_ a HR so let's keep the position
Comment 11 andreas_k 2019-06-13 07:49:32 UTC
Is it possible to set in the menubar.xml that there should be no toggle shown? cause as Maxim wrote in the toolbar it can be usefull.
Comment 12 Heiko Tietze 2019-06-13 07:57:26 UTC
(In reply to andreas_k from comment #11)
> Is it possible to set in the menubar.xml that there should be no toggle
> shown? cause as Maxim wrote in the toolbar it can be usefull.

You have to change the UNO command definition, which applies to all occurrences.
Comment 13 Maxim Monastirsky 2019-06-13 11:40:53 UTC
(In reply to Heiko Tietze from comment #10)
> * Untoggle Draw Text (both menu and toolbar); there is no benefit to
> indicate the draw text function to be active as it is shown by the changed
> cursor.
I disagree about the toolbar part. While the changed cursor indicates that it's possible now to draw an object, it doesn't indicate *which* object is going to be drawn. It might be a text box, but as well it might be a shape or a frame. Having the corresponding toolbar button pressed is a common behavior in other drawing programs, and I think people will expect it (e.g. see Bug 39478).

I really think we need to find a way to fix the menu w/o changing the toolbar. One possible way is to introduce a special attribute for the menu xml, like Andreas suggested. That would also solve the problem with horizontal line. Another approach might be to have a special "toolbar toggle" status type, which will be interpreted by the toolbar, but not by the menubar.
Comment 14 Xisco Faulí 2019-06-13 12:14:30 UTC Comment hidden (off-topic)
Comment 15 Heiko Tietze 2019-06-13 12:20:42 UTC Comment hidden (off-topic)