Skip to content

Commit 0fd1f8e

Browse files
committedJul 6, 2017
Fix size hint for font button
1 parent 99855ea commit 0fd1f8e

File tree

3 files changed

+0
-15
lines changed

3 files changed

+0
-15
lines changed
 

‎python/gui/qgsfontbutton.sip

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ class QgsFontButton : QToolButton
4545
Use ``dialogTitle`` string to define the title to show in the text settings dialog.
4646
%End
4747

48-
virtual QSize sizeHint() const;
49-
5048
QgsFontButton::Mode mode() const;
5149
%Docstring
5250
Returns the current button mode.

‎src/gui/qgsfontbutton.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ QgsFontButton::QgsFontButton( QWidget *parent, const QString &dialogTitle )
3838
{
3939
setText( tr( "Font" ) );
4040
setAcceptDrops( true );
41-
setMinimumSize( QSize( 24, 16 ) );
4241
connect( this, &QAbstractButton::clicked, this, &QgsFontButton::showSettingsDialog );
4342

4443
//setup dropdown menu
@@ -48,16 +47,6 @@ QgsFontButton::QgsFontButton( QWidget *parent, const QString &dialogTitle )
4847
setPopupMode( QToolButton::MenuButtonPopup );
4948
}
5049

51-
QSize QgsFontButton::sizeHint() const
52-
{
53-
//make sure height of button looks good under different platforms
54-
#ifdef Q_OS_WIN
55-
return QSize( 120, 22 );
56-
#else
57-
return QSize( 120, 28 );
58-
#endif
59-
}
60-
6150
void QgsFontButton::showSettingsDialog()
6251
{
6352
switch ( mMode )

‎src/gui/qgsfontbutton.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ class GUI_EXPORT QgsFontButton : public QToolButton
6666
*/
6767
QgsFontButton( QWidget *parent SIP_TRANSFERTHIS = nullptr, const QString &dialogTitle = QString() );
6868

69-
virtual QSize sizeHint() const override;
70-
7169
/**
7270
* Returns the current button mode.
7371
* \see setMode()

0 commit comments

Comments
 (0)
Please sign in to comment.