From c6b9c12d6a08d2f80f4a9b5d10b1be00e3b1d454 Mon Sep 17 00:00:00 2001 From: Heiko Tietze Date: Thu, 26 Jun 2025 17:26:50 +0200 Subject: [PATCH] Resolves tdf#161492 - Consider tab width for dialog size MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ia503ba49fcf6f9f3fb3abab34c1b95f62b0e6ba0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187058 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- vcl/source/control/ivctrl.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vcl/source/control/ivctrl.cxx b/vcl/source/control/ivctrl.cxx index 9d43ead8a293..c32b1bf1b552 100644 --- a/vcl/source/control/ivctrl.cxx +++ b/vcl/source/control/ivctrl.cxx @@ -578,7 +578,9 @@ Size VerticalTabControl::GetOptimalSize() const aOptimalPageSize.setHeight( aPagePrefSize.Height() ); } - return aOptimalPageSize; + Size aChooserSize(m_xChooser->get_preferred_size()); + return Size(aChooserSize.Width() + aOptimalPageSize.Width(), + std::max(aChooserSize.Height(), aOptimalPageSize.Height())); } void VerticalTabControl::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter)