Skip to content
Permalink
Browse files

Fix size hint for font button

  • Loading branch information
nyalldawson committed Jul 6, 2017
1 parent 99855ea commit 0fd1f8e5632f21d5715ba10af4b6f85aed16eca0
Showing with 0 additions and 15 deletions.
  1. +0 −2 python/gui/qgsfontbutton.sip
  2. +0 −11 src/gui/qgsfontbutton.cpp
  3. +0 −2 src/gui/qgsfontbutton.h
@@ -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.
@@ -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 )
@@ -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()

0 comments on commit 0fd1f8e

Please sign in to comment.
You can’t perform that action at this time.