Fix size hint for font button

This commit is contained in:
Nyall Dawson 2017-07-06 19:41:39 +10:00
parent 99855ea35a
commit 0fd1f8e563
3 changed files with 0 additions and 15 deletions

View File

@ -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.

View File

@ -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 )

View File

@ -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()