Resolves: fdo#80476 Start Center sidebar button are too large

Change-Id: Iedf67b5591d84963e1caf3e8d9d17d42175bb604
This commit is contained in:
Caolán McNamara
2014-07-24 16:56:15 +01:00
parent 1392a88c25
commit 9a5e81fa80

View File

@@ -19,6 +19,7 @@
#include "backingwindow.hxx" #include "backingwindow.hxx"
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx> #include <vcl/svapp.hxx>
#include <vcl/virdev.hxx> #include <vcl/virdev.hxx>
@@ -59,7 +60,7 @@ const char TEMPLATE_URL[] = "slot:5500";
const char OPEN_URL[] = ".uno:Open"; const char OPEN_URL[] = ".uno:Open";
const char SERVICENAME_CFGREADACCESS[] = "com.sun.star.configuration.ConfigurationAccess"; 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 aButtonsBackground(114, 168, 84); // TDF green
const Color aButtonsText(COL_WHITE); const Color aButtonsText(COL_WHITE);
@@ -241,8 +242,8 @@ void BackingWindow::initControls()
// setup nice colors // setup nice colors
mpCreateLabel->SetControlForeground(aButtonsText); mpCreateLabel->SetControlForeground(aButtonsText);
Font aFont(mpCreateLabel->GetControlFont()); Font aFont(mpCreateLabel->GetSettings().GetStyleSettings().GetLabelFont());
aFont.SetHeight(nButtonsFontSize); aFont.SetSize(Size(0, aFont.GetSize().Height() * fMultiplier));
mpCreateLabel->SetControlFont(aFont); mpCreateLabel->SetControlFont(aFont);
mpHelpButton->SetControlForeground(aButtonsText); mpHelpButton->SetControlForeground(aButtonsText);
@@ -273,8 +274,8 @@ void BackingWindow::initControls()
void BackingWindow::setupButton( PushButton* pButton ) void BackingWindow::setupButton( PushButton* pButton )
{ {
// the buttons should have a bit bigger font // the buttons should have a bit bigger font
Font aFont(pButton->GetControlFont()); Font aFont(pButton->GetSettings().GetStyleSettings().GetPushButtonFont());
aFont.SetHeight(nButtonsFontSize); aFont.SetSize(Size(0, aFont.GetSize().Height() * fMultiplier));
pButton->SetControlFont(aFont); pButton->SetControlFont(aFont);
// color that fits the theme // color that fits the theme