summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorHeiko Tietze <tietze.heiko@gmail.com>2022-05-24 13:46:19 +0200
committerAndras Timar <andras.timar@collabora.com>2022-05-28 12:05:26 +0200
commit725882dc9a45af77e65871659cf65519fba550df (patch)
tree32aa619aed420df3baf31ecbe26bba0ebc1781af /sfx2
parent1034f98614f9f48ad5dc11d8f4d00a5edf09fb57 (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.cxx11
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()