Bug 121158 - Writer Page deck, incorrect padding of Header and Footer content panels
Summary: Writer Page deck, incorrect padding of Header and Footer content panels
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
6.2.0.0.alpha1+
Hardware: All All
: medium trivial
Assignee: Heiko Tietze
URL:
Whiteboard: target:7.3.0 target:7.2.0.0.beta2
Keywords:
Depends on:
Blocks: Sidebar-Page
  Show dependency treegraph
 
Reported: 2018-11-04 12:01 UTC by Sabri Unal
Modified: 2021-06-26 11:18 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
Tiny space between sidebar and the right corner (165.04 KB, image/png)
2018-11-04 12:01 UTC, Sabri Unal
Details
For Pardus 17.4 (43.97 KB, image/png)
2018-11-04 12:26 UTC, Sabri Unal
Details
everything seems well align now (61.78 KB, image/png)
2021-06-26 11:18 UTC, BogdanB
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sabri Unal 2018-11-04 12:01:34 UTC
Created attachment 146291 [details]
Tiny space between sidebar and the right corner

I have tested this situation on Ubuntu 18.04 with vcl=gtk, gtk3, kde5 and on Windows 10.

There is a small tiny space between sidebar and the right corner.

I marked space with yellow colour.

For Linux:
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

For Windows:
Version: 6.2.0.0.alpha1 (x64)
Build ID: ff46ad24d1d3cbcea45895520483ed1fd4ff488b
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
Locale: tr-TR (en_US); Calc: threaded
Comment 1 Sabri Unal 2018-11-04 12:25:43 UTC
Thanks to Ali Orhun Akkirman who sent another screenshot from Pardus (Turkish Domestic Linux project)

For Pardus 17.4
Sürüm: 6.1.3.1
İnşa №: 1:6.1.3~rc1-1~bpo9+1
İşlemci süreçleri: 4; İşletim Sistemi:Linux 4.9; UI gerçekleyici: varsayılan; VCL: gtk3; 
Yerel: tr-TR (tr_TR.utf8); Calc: group threaded
Comment 2 Sabri Unal 2018-11-04 12:26:08 UTC
Created attachment 146292 [details]
For Pardus 17.4
Comment 3 V Stuart Foote 2018-11-04 14:11:48 UTC
Left over from Susobhan's work on the Page deck. Looks to be in the UI packing, I see a border_width of 6 set, but no margin_right in the header and footer content panels, right?

https://opengrok.libreoffice.org/xref/core/sw/uiconfig/swriter/ui/pageheaderpanel.ui

https://opengrok.libreoffice.org/xref/core/sw/uiconfig/swriter/ui/pagefooterpanel.ui
Comment 4 Xisco Faulí 2018-11-08 12:22:56 UTC
@Jim, I thought you could be interested in this issue...
Comment 5 QA Administrators 2019-11-09 03:53:16 UTC Comment hidden (obsolete)
Comment 6 Dieter 2019-12-05 12:56:26 UTC
Still repro in

Version: 6.5.0.0.alpha0+ (x64)
Build ID: 89f0af144c18efafe2573801641689a1432c0cae
CPU threads: 4; OS: Windows 10.0 Build 18362; UI render: GL; VCL: win; 
Locale: de-DE (de_DE); UI-Language: en-GB
Calc: threaded
Comment 7 Heiko Tietze 2021-06-22 09:12:14 UTC
(In reply to V Stuart Foote from comment #3)
> ... but no margin_right in the header and footer content panels, right?

Margin right is deprecated (and 0 for all controls). The issue results from the fact that the DeckLayout doesn't take collapsed sections into account when calculating the minimum size. Collapse all, restart, and you can minimize the width to the point where the sidebar is closed.

Ideally, we have all left control in an alignment or whatever. And the right controls too. But that's not possible anymore, and likely wasn't because of the different UIs.

Caolan, should we fix the DeckLayouter issue? I also get an OSL_ASSERT: nRemainingHeightToDistribute==0 on resizing when all sections of one deck are closed.
Comment 8 Caolán McNamara 2021-06-22 12:01:43 UTC
FWIW "margin-right" is now "margin-end" and anything that could be done with a GtkAlignment can still be done using:
margin-start/margin-end/margin-top/margin-bottom/etc.

wrt the original bug report there are four panels. If we take two of them as examples, sw/uiconfig/swriter/ui/pagefooterpanel.ui "Footer" and sw/uiconfig/swriter/ui/pageformatpanel.ui "Format" each has a main "grid1" child and both of those have expand horizontal of true and a horizontal alignment of center.

So if you stretch the sidebar wider it becomes more obvious that their content is centered horizontally in the space they're given.

The space highlighted in the original pictures is because the content of the Header/Footer panels is wider than the Format/Styles panels and the Format/Styles panels are centered horizontally in the space available.

Header and Footer have exactly the same width widgets so they always align with eachother, but the other panels have different width widgets in the combobox columns and in the label columns.

If the 4 panels were changed to, e.g. alignment "end", for the grid1 then I imagine all four would then appear flush to the right side. Though I expect that the differing widths of the comboboxes columns between panels might pose a remaining jarring effect.
Comment 9 Heiko Tietze 2021-06-23 12:20:31 UTC
(In reply to Caolán McNamara from comment #8)
> If the 4 panels were changed to, e.g. alignment "end"...

Good idea! But what about size calculation when decks are minimized?
Comment 10 Commit Notification 2021-06-23 17:10:57 UTC
Heiko Tietze committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/bd549d04f924355b1f33e953241b7effc8731b6c

Resolves tdf#121158 - Placement issues on page sidebar

It will be available in 7.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.
Comment 11 Commit Notification 2021-06-24 11:37:46 UTC
Heiko Tietze committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/7b0c2ce37490e9ac602383f7cb80092b269e38cd

Resolves tdf#121158 - Placement issues on page sidebar

It will be available in 7.2.0.0.beta2.

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 12 BogdanB 2021-06-26 11:18:11 UTC
Created attachment 173220 [details]
everything seems well align now

Everything is now well align now. See screenshoot

Version: 7.3.0.0.alpha0+ / LibreOffice Community
Build ID: f446a203fa2897bab8ae7686c948a8bf060675c6
CPU threads: 4; OS: Linux 5.8; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-06-24_15:16:38
Calc: threaded