sfx2/source/dialog/backingwindow.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
New commits: commit ed45b67db66ef0f6c69887c75013a178c4412f74 Author: Heiko Tietze <tietze.he...@gmail.com> AuthorDate: Tue May 24 13:46:19 2022 +0200 Commit: Heiko Tietze <heiko.tie...@documentfoundation.org> CommitDate: Wed May 25 10:04:15 2022 +0200 Resolves tdf#119447 - Improve sidebar height in start center Reduced the font size multiplier from 1.4 to 1.2 to fit the window into 768px height and added the branding image to the height calculation Change-Id: I05473155f0068880298a461fe8491468b07079b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134867 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tie...@documentfoundation.org> diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx index 58794771cefc..cde9a7532d9f 100644 --- a/sfx2/source/dialog/backingwindow.cxx +++ b/sfx2/source/dialog/backingwindow.cxx @@ -65,8 +65,11 @@ class BrandImage final : public weld::CustomWidgetController private: BitmapEx maBrandImage; bool mbIsDark = false; + Size m_BmpSize; public: + Size getSize() { return m_BmpSize; } + virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override { weld::CustomWidgetController::SetDrawingArea(pDrawingArea); @@ -93,8 +96,8 @@ public: if (maBrandImage.GetSizePixel().Width() == nWidth) return; LoadImageForWidth(nWidth); - const Size aBmpSize(maBrandImage.GetSizePixel()); - set_size_request(aBmpSize.Width(), aBmpSize.Height()); + m_BmpSize = maBrandImage.GetSizePixel(); + set_size_request(m_BmpSize.Width(), m_BmpSize.Height()); } virtual void StyleUpdated() override @@ -134,7 +137,7 @@ public: }; // increase size of the text in the buttons on the left fMultiplier-times -float const g_fMultiplier = 1.4f; +float const g_fMultiplier = 1.2f; BackingWindow::BackingWindow(vcl::Window* i_pParent) : InterimItemWindow(i_pParent, "sfx/ui/startcenter.ui", "StartCenter", false) @@ -370,7 +373,7 @@ void BackingWindow::ApplyStyleSettings() // Refetch because the brand image height to match this width is now set aPrefSize = mxAllButtonsBox->get_preferred_size(); - set_height_request(nMenuHeight + aPrefSize.Height()); + set_height_request(nMenuHeight + aPrefSize.Height() + mxBrandImage->getSize().getHeight()); } void BackingWindow::initializeLocalView()