summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-07-24 16:56:15 +0100
committerMichael Meeks <michael.meeks@collabora.com>2014-07-24 18:27:22 +0000
commit674f6cee2b42e26c1c6750c805d0d11ad08b655b (patch)
tree94512fdff8f33c6d601016505951061a6b0b6478
parent764fdb983d2fd0e24f56db987eba307ae5ae6eea (diff)
Resolves: fdo#80476 Start Center sidebar button are too large
Change-Id: Iedf67b5591d84963e1caf3e8d9d17d42175bb604 (cherry picked from commit 9a5e81fa80d1e90bd73ae4e19c89b28537aed334) Reviewed-on: https://gerrit.libreoffice.org/10512 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
-rw-r--r--sfx2/source/dialog/backingwindow.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx
index 06d7c01c33b9..764337a7743e 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -19,6 +19,7 @@
#include "backingwindow.hxx"
+#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
#include <vcl/virdev.hxx>
@@ -59,7 +60,7 @@ const char TEMPLATE_URL[] = "slot:5500";
const char OPEN_URL[] = ".uno:Open";
const char SERVICENAME_CFGREADACCESS[] = "com.sun.star.configuration.ConfigurationAccess";
-const int nButtonsFontSize = 15;
+float fMultiplier = 1.2;
const Color aButtonsBackground(114, 168, 84); // TDF green
const Color aButtonsText(COL_WHITE);
@@ -241,8 +242,8 @@ void BackingWindow::initControls()
// setup nice colors
mpCreateLabel->SetControlForeground(aButtonsText);
- Font aFont(mpCreateLabel->GetControlFont());
- aFont.SetHeight(nButtonsFontSize);
+ Font aFont(mpCreateLabel->GetSettings().GetStyleSettings().GetLabelFont());
+ aFont.SetSize(Size(0, aFont.GetSize().Height() * fMultiplier));
mpCreateLabel->SetControlFont(aFont);
mpHelpButton->SetControlForeground(aButtonsText);
@@ -273,8 +274,8 @@ void BackingWindow::initControls()
void BackingWindow::setupButton( PushButton* pButton )
{
// the buttons should have a bit bigger font
- Font aFont(pButton->GetControlFont());
- aFont.SetHeight(nButtonsFontSize);
+ Font aFont(pButton->GetSettings().GetStyleSettings().GetPushButtonFont());
+ aFont.SetSize(Size(0, aFont.GetSize().Height() * fMultiplier));
pButton->SetControlFont(aFont);
// color that fits the theme