From 0fd1f8e5632f21d5715ba10af4b6f85aed16eca0 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Thu, 6 Jul 2017 19:41:39 +1000 Subject: [PATCH] Fix size hint for font button --- python/gui/qgsfontbutton.sip | 2 -- src/gui/qgsfontbutton.cpp | 11 ----------- src/gui/qgsfontbutton.h | 2 -- 3 files changed, 15 deletions(-) diff --git a/python/gui/qgsfontbutton.sip b/python/gui/qgsfontbutton.sip index b9ec998be8a..3764f8eee32 100644 --- a/python/gui/qgsfontbutton.sip +++ b/python/gui/qgsfontbutton.sip @@ -45,8 +45,6 @@ class QgsFontButton : QToolButton Use ``dialogTitle`` string to define the title to show in the text settings dialog. %End - virtual QSize sizeHint() const; - QgsFontButton::Mode mode() const; %Docstring Returns the current button mode. diff --git a/src/gui/qgsfontbutton.cpp b/src/gui/qgsfontbutton.cpp index 86f8fb3f388..c3adaa23816 100644 --- a/src/gui/qgsfontbutton.cpp +++ b/src/gui/qgsfontbutton.cpp @@ -38,7 +38,6 @@ QgsFontButton::QgsFontButton( QWidget *parent, const QString &dialogTitle ) { setText( tr( "Font" ) ); setAcceptDrops( true ); - setMinimumSize( QSize( 24, 16 ) ); connect( this, &QAbstractButton::clicked, this, &QgsFontButton::showSettingsDialog ); //setup dropdown menu @@ -48,16 +47,6 @@ QgsFontButton::QgsFontButton( QWidget *parent, const QString &dialogTitle ) setPopupMode( QToolButton::MenuButtonPopup ); } -QSize QgsFontButton::sizeHint() const -{ - //make sure height of button looks good under different platforms -#ifdef Q_OS_WIN - return QSize( 120, 22 ); -#else - return QSize( 120, 28 ); -#endif -} - void QgsFontButton::showSettingsDialog() { switch ( mMode ) diff --git a/src/gui/qgsfontbutton.h b/src/gui/qgsfontbutton.h index 03eb826ef21..7b4eed7103c 100644 --- a/src/gui/qgsfontbutton.h +++ b/src/gui/qgsfontbutton.h @@ -66,8 +66,6 @@ class GUI_EXPORT QgsFontButton : public QToolButton */ QgsFontButton( QWidget *parent SIP_TRANSFERTHIS = nullptr, const QString &dialogTitle = QString() ); - virtual QSize sizeHint() const override; - /** * Returns the current button mode. * \see setMode()