Bug 149085 - The "Protect" section on the Options tab of {Image, Frame, Object} Properties dialog should be on the "Position and Size" tab
Summary: The "Protect" section on the Options tab of {Image, Frame, Object} Properties...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.0.0 alpha0+
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: difficultyMedium, easyHack, skillCpp, topicUI
Depends on:
Blocks: Image-Dialog Frame-Dialog
  Show dependency treegraph
 
Reported: 2022-05-13 23:26 UTC by sdc.blanco
Modified: 2023-12-12 03:12 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Comparing Image and Shape - position and size dialog (152.07 KB, image/png)
2022-05-14 21:46 UTC, sdc.blanco
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sdc.blanco 2022-05-13 23:26:04 UTC
The summary says it all.

The "Protect" section (contents, position, size) is on the Options tab for the Properties dialog for Image, Frame, Object.

That section should be on the "Type" tab (soon to be "Position and Size" tab, bug 138844) 

See Position and Size tab for Shape for illustration.
Comment 1 Regina Henschel 2022-05-14 21:14:29 UTC
It would be indeed more similar to the "Position & Size" dialog. Do you have a suggestion were to put it? The "Type" page has already a lot of content and adding a new section might conflict with the wish to make the preview larger to better show the selected option.
Comment 2 sdc.blanco 2022-05-14 21:46:02 UTC
Created attachment 180122 [details]
Comparing Image and Shape - position and size dialog

(In reply to Regina Henschel from comment #1)
> Do you have a suggestion were to put it? 
Horizontally above the Position section (where that section can also be moved further down).  (This is parallel to the Position and Size for Shape).

> The "Type" page has already a lot of content
See attached file, which shows the situation, and gives some observations that suggest that there is enough room, also for an expanded Preview window.
Comment 3 Heiko Tietze 2022-05-27 08:46:32 UTC
We need to shuffle controls around in order to make space for the protection controls. The dialog must not grow much further in size.
Comment 4 Heiko Tietze 2022-06-30 12:44:57 UTC
The topic was on the agenda of the design meeting but didn't receive further input.

So let's do it as suggested.
Comment 5 sdc.blanco 2022-06-30 12:52:21 UTC Comment hidden (no-value)
Comment 6 Heiko Tietze 2022-07-01 08:16:05 UTC
The UI file cui/uiconfig/ui/possizetabpage.ui processed in svx/source/sidebar/possize/PosSizePropertyPanel.cxx should become like cui/uiconfig/ui/swpossizepage.ui. The protection settings are on sw/uiconfig/swriter/ui/frmaddpage.ui - and that points to a problem. The cui scope is broader than sw and there might be reasons why the options are split. Hossein, what do you think?
Comment 7 Telesto 2022-07-01 16:36:43 UTC
Related, but not directly the bug report here: there is some confusion about the meaning of protect size and position. See bug 148593 comment 6.

The scope of the protection is limited to resize with drag handles or reposition shapes/images with mouse cursor, as far I'm aware.. but well the dialog isn't to specific about that. Which surely source for confusion. 

You can still resize/reposition the shape/image in the Position and Size tab. And you can still drag the anchor (in case of to character anchoring), which will move the image too.

Bottom Line: the protection is not absolute, but partial. I prefer some less genetic label (instead of protection). Something in the direction of "Block changes by mouse" [not good enough.. needs a better phrasing]
Comment 8 sdc.blanco 2022-07-01 18:11:26 UTC Comment hidden (off-topic)
Comment 9 Telesto 2022-07-01 18:38:28 UTC
(In reply to sdc.blanco from comment #8)
> Position = Position settings on Position and Size tab.
> 
> @Telesto -
>    1. Try using page reference positions for Horizontal and Vertical. 
>       Dragging anchor will not change position. 

True, but is this because of the position protection or simply the result of position area? 

>    2. For Paragraph Reference area, note settings, drag anchor to new
> paragraph.
>       Note the settings have not changed.

True, but toggling protect position on/off doesn't make a difference for this to happen, as far I'm aware.. However the absolute position has changed. 
I'm not saying the behaviour being incorrect, more that someone could assume that the shape/image being fixated at a certain spot in any situation. 

>        
>    ergo: Position setting is (pretty) absolute.
> 
>          (matter of taste whether the Protect setting should 
>           also lock the dialog. Seems unnecessary imo.)

Yes it's matter of taste. The current behaviour is actually the intended one, I guess. Protect size/position is a lock against in document modifications by moving the shape with arrows/or mouse or resizing the shape with handles. At least that's what I think the position/ size lock being about.

The only thing I'm concerned about is proper label. Protect actually is: Protect against in document modifications..  or at least assume this being the actual purpose of the checkboxes (protect position/ protect size). The current UI doesn't reflect that (nor the documentation). But well I'm one of those who like self-explaining UI above pointing to documentation.
Comment 10 Hossein 2022-07-04 09:24:14 UTC
I agree that "Protect" is more suitable to be put inside "Position and Size" tab, but there is one important problem: The lack of enough vertical space.

I personally use LibreOffice with GTK3 UI with display set as 2x mode, because of my screen is high dpi, and I want to achieve a reasonable size of the UI elements.

Right now, most of the LibreOffice UIs are OK for me, but this specific UI is completely full vertically, so adding more elements will cause it to go off screen.

If a re-arrangement of the UI elements does not increase the height of the window, I think it would be good.
Comment 11 sdc.blanco 2022-07-04 09:35:30 UTC
(In reply to Hossein from comment #10)
> If a re-arrangement of the UI elements does not increase the height of the
> window, I think it would be good.
In your dialog box, would there be room for horizontal placement as follows?

Protect
[] Contents   [] Position   [] Size

(and placed vertically between "Original Size" and "Position")
Comment 12 Hossein 2022-07-04 11:23:10 UTC
(In reply to Heiko Tietze from comment #6)
> The UI file cui/uiconfig/ui/possizetabpage.ui processed in
> svx/source/sidebar/possize/PosSizePropertyPanel.cxx should become like
> cui/uiconfig/ui/swpossizepage.ui. The protection settings are on
> sw/uiconfig/swriter/ui/frmaddpage.ui - and that points to a problem. The cui
> scope is broader than sw and there might be reasons why the options are
> split. Hossein, what do you think?

svx/source/sidebar/possize/PosSizePropertyPanel.cxx and its associated ui, svx/uiconfig/ui/sidebarpossize.ui are for modifying the position and size in the sidebar.

Search for "Protect" shows these results:

$ git grep -l ">Protect<" *.ui
cui/uiconfig/ui/possizetabpage.ui
cui/uiconfig/ui/swpossizepage.ui
sw/uiconfig/swriter/ui/frmaddpage.ui

Second file (swpossizepage.ui) is for Writer. First file (possizetabpage.ui) is for other applications (Impress, Draw, Calc, etc.). Third file (frmaddpage.ui) is the second tab ("Options") of the Image/Object/Frame dialog box. It is handled inside sw/source/ui/frmdlg/frmpage.cxx, and some parts of it becomes hidden there. Other tabs are also ui files that are handled inside frmpage.cxx.

One should be able to do this task by changing frmpage.cxx and associated uis.
Comment 13 sdc.blanco 2023-12-11 00:36:49 UTC
Code pointers are given, but maybe this should also be noted as an EasyHack?