summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiko Tietze <tietze.heiko@gmail.com>2022-05-24 13:46:19 +0200
committerHeiko Tietze <heiko.tietze@documentfoundation.org>2022-05-25 10:04:15 +0200
commited45b67db66ef0f6c69887c75013a178c4412f74 (patch)
tree2bd2d564f8707b0b55f4f7a6307bb1edc1954cf2
parent8b4b852a35149b1cfffc681cbb4f57d4c0b671b3 (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>
-rw-r--r--sfx2/source/dialog/backingwindow.cxx11
1 files changed, 7 insertions, 4 deletions
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()