Bug 136905 - NB Layout tab 'Page Size' drop list UX is poor
Summary: NB Layout tab 'Page Size' drop list UX is poor
Status: REOPENED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.0.1.2 release
Hardware: All All
: low minor
Assignee: Not Assigned
URL:
Whiteboard: target:24.2.0 target:24.8.0 target:24...
Keywords:
Depends on:
Blocks: Notebookbar-Tabbed
  Show dependency treegraph
 
Reported: 2020-09-20 21:05 UTC by medmedin2014
Modified: 2024-04-19 15:56 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Page size menu is inconsistent (110.74 KB, image/png)
2020-09-20 21:05 UTC, medmedin2014
Details

Note You need to log in before you can comment on or make changes to this bug.
Description medmedin2014 2020-09-20 21:05:12 UTC
Created attachment 165700 [details]
Page size menu is inconsistent

The mouse hover on each item in the menu is not working, and font size of the text is really inconsistent with the global font size of the GUI. See attached image for more info.
Comment 1 medmedin2014 2020-09-20 21:09:07 UTC
LibreOffice
Version: 7.0.1.2
Build ID: 00(Build:2)
CPU threads: 2; OS: Linux 5.4; UI render: default; VCL: kf5
Locale: en-US (en_US.UTF-8); UI: en-US
=7.0.1-1
Calc: threaded

Operating System: Manjaro Linux
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.73.0
Qt Version: 5.15.0
Kernel Version: 5.4.64-1-MANJARO
OS Type: 64-bit
Comment 2 V Stuart Foote 2020-09-21 03:46:21 UTC
Valid

Version: 7.0.1.2 (x64)
Build ID: 7cbcfc562f6eb6708b5ff7d7397325de9e764452
CPU threads: 4; OS: Windows 10.0 Build 19041; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 3 QA Administrators 2022-09-22 03:55:20 UTC Comment hidden (obsolete)
Comment 4 medmedin2014 2022-09-22 08:30:28 UTC
The problem is still persistent

Version: 7.4.0.3 / LibreOffice Community
Build ID: 40(Build:3)
CPU threads: 2; OS: Linux 5.19; UI render: default; VCL: kf5 (cairo+xcb)
Locale: en-US (en_US.UTF-8); UI: en-US
7.4.0-3
Calc: threaded

Operating System: Manjaro Linux
KDE Plasma Version: 5.25.5
KDE Frameworks Version: 5.97.0
Qt Version: 5.15.5
Kernel Version: 5.19.7-1-MANJARO (64-bit)
Graphics Platform: X11
Comment 5 Justin L 2023-06-29 13:56:30 UTC
repro 24.2
Comment 6 Justin L 2023-07-10 19:20:51 UTC
The glade file is sw/uiconfig/swriter/ui/pagesizecontrol.ui

The controlling code is in sw/source/uibase/sidebar/PageSizeControl.cxx
It is the only thing that uses a 

The sidebar is defined in svx/source/sidebar/tools/ValueSetWithTextControl.cxx
It hardcodes Size aSize(250, 300);
The font scales to fit inside of this box. Make the box bigger, and the font gets bigger.

Obviously, due to different languages taking up more or less space than others, we can't just size this nicely for English text.

This all looks pretty automatic to me. My "suggested" font size is 12pt, but of course it just gets scaled to fit inside the height of the rectangle. (The width scales to fit the length of the text (growing it if necessary) while the height seems to be the determiner of the font size.

We are ValueSet::InsertItem a generic ValueSet of meType VALUESETITEM_USERDRAW, so SetOptimalSize() doesn't calculate any size (only Text and Image does that). Since we have two text strings, we can't ValueSet::InsertItem VALUESETITEM_IMAGE_AND_TEXT.

So probably the only thing to do is to extend ValueSetWithTextControl to SetOptimalHeight.
Comment 7 Justin L 2023-07-17 15:46:32 UTC
(In reply to Justin L from comment #6)
> So probably the only thing to do is to extend ValueSetWithTextControl to
> SetOptimalHeight.
In https://gerrit.libreoffice.org/c/core/+/154286, Maxim suggested re-writing the entire control to look more like "Columns" or "Margins". The big downside to that seems to be that the current page size won't be shown/selected.
Comment 8 Commit Notification 2023-07-17 23:23:16 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1876feb8a8805b2f80537e2828c152ccbdf67fe2

tdf#136905 NBB: let ValueSetWithTextControl set optimal height

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 Commit Notification 2023-07-18 00:40:29 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6256d5fe2e7cb1bb002d5fe59527d3a3fbf6963f

tdf#136905 NBB: use label font in ValueSetWithTextControl

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 10 Commit Notification 2024-02-24 17:15:02 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/72986a5e505f8b62b30aa890c136e07cef3f9a2b

tdf#159865 tdf#136905 NBB: font looked too small in page size choices

It will be available in 24.8.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 2024-02-26 17:56:24 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

tdf#159865 Revert "tdf#136905 NBB: let ValueSetWithTextControl set optimal"

It will be available in 24.8.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 12 Commit Notification 2024-02-27 08:28:01 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/759c9ea8e66b5fc1a362cf914055ac498fbbd80a

tdf#159865 Revert "tdf#136905 NBB: let ValueSetWithTextControl set optimal"

It will be available in 24.2.2.

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 13 Justin L 2024-04-19 15:56:55 UTC
bug 159865 showed that for different people, the size ends up being different. So all the work done here was reverted.