Navigation Menu

Skip to content

Commit

Permalink
Fix size hint for font button
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jul 6, 2017
1 parent 99855ea commit 0fd1f8e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 15 deletions.
2 changes: 0 additions & 2 deletions python/gui/qgsfontbutton.sip
Expand Up @@ -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.
Expand Down
11 changes: 0 additions & 11 deletions src/gui/qgsfontbutton.cpp
Expand Up @@ -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
Expand All @@ -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 )
Expand Down
2 changes: 0 additions & 2 deletions src/gui/qgsfontbutton.h
Expand Up @@ -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()
Expand Down

0 comments on commit 0fd1f8e

Please sign in to comment.