svx/source/sidebar/tools/ValueSetWithTextControl.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
New commits: commit 72986a5e505f8b62b30aa890c136e07cef3f9a2b Author: Justin Luth <justin.l...@collabora.com> AuthorDate: Sat Feb 24 10:04:13 2024 -0500 Commit: Justin Luth <jl...@mail.com> CommitDate: Sat Feb 24 18:14:54 2024 +0100 tdf#159865 tdf#136905 NBB: font looked too small in page size choices This fixes my 24.2 regression from commit 1876feb8a8805b2f80537e2828c152ccbdf67fe2 I considered reverting it, but decided to tweak the font size instead. If I reverted, the size of the choices was displayed in 16pt font. I wanted to keep the sizing as "scientific" as possible, but fixing the rounding issues didn't really make the font stand out as much as desired. In this case, my system font of 11 became 10 for the page size dialog, due to rounding, which is still a significant 10%. Although that still looks too small, it seems fairly close to the other button on the notebook bar, at least to my eyes. But it is definitely smaller/less clear than the "more option" button. Perhaps it has to do with the visible size of a font compared to the full size (with leading)? Fonts are often sized as 11/13 or 12/14 for example. Adding 20% to the font size makes it look about right. In my case, it ends up chosing a font height of 13. Change-Id: Ic0a7296aa74be542e2a38ce52cf5fd23e5d8c7f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163886 Tested-by: Jenkins Reviewed-by: Justin Luth <jl...@mail.com> diff --git a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx index 8919140b5d07..d55740315c99 100644 --- a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx +++ b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx @@ -45,8 +45,10 @@ void ValueSetWithTextControl::SetDrawingArea(weld::DrawingArea* pDrawingArea) void ValueSetWithTextControl::SetOptimalDrawingAreaHeight() { const vcl::Font aFont(Application::GetSettings().GetStyleSettings().GetLabelFont()); - const sal_Int32 nRowHeight = aFont.GetFontSize().Height() * 9 / 4; // see UserDraw() - const Size aSize(GetOutputSizePixel().Width(), nRowHeight * maItems.size()); + double fRowHeight = aFont.GetFontSize().Height() * 9 / 4.0; // see UserDraw() + // It still looks too small. Probably the height specified should be the leading point size? + fRowHeight *= 1.2; // add 20% leading + const Size aSize(GetOutputSizePixel().Width(), fRowHeight * maItems.size()); GetDrawingArea()->set_size_request(aSize.Width(), aSize.Height()); SetOutputSizePixel(aSize); }