diff options
author | Heiko Tietze <tietze.heiko@gmail.com> | 2022-05-24 13:46:19 +0200 |
---|---|---|
committer | Heiko Tietze <heiko.tietze@documentfoundation.org> | 2022-05-27 08:08:26 +0200 |
commit | f3b93f48ee65273cfee63e54f831c199110a20b7 (patch) | |
tree | 70c498bac4b416d50916dd22b6a15158d8922623 /sfx2 | |
parent | f98a8950da526e8a9952e22dade08c108f48d961 (diff) |
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.tietze@documentfoundation.org>
(cherry picked from commit ed45b67db66ef0f6c69887c75013a178c4412f74)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135006
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/dialog/backingwindow.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx index e67eeee27c6b..63c3a0f54f27 100644 --- a/sfx2/source/dialog/backingwindow.cxx +++ b/sfx2/source/dialog/backingwindow.cxx @@ -66,8 +66,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); @@ -94,8 +97,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 @@ -135,7 +138,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) @@ -371,7 +374,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() |