mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
Fix minimum height of font buttons on non-Windows platforms
This commit is contained in:
parent
b500080a31
commit
0802586a13
@ -45,6 +45,8 @@ class QgsFontButton : QToolButton
|
||||
Use ``dialogTitle`` string to define the title to show in the text settings dialog.
|
||||
%End
|
||||
|
||||
virtual QSize minimumSizeHint() const;
|
||||
|
||||
QgsFontButton::Mode mode() const;
|
||||
%Docstring
|
||||
Returns the current button mode.
|
||||
|
@ -48,6 +48,16 @@ QgsFontButton::QgsFontButton( QWidget *parent, const QString &dialogTitle )
|
||||
setPopupMode( QToolButton::MenuButtonPopup );
|
||||
}
|
||||
|
||||
QSize QgsFontButton::minimumSizeHint() const
|
||||
{
|
||||
//make sure height of button looks good under different platforms
|
||||
#ifdef Q_OS_WIN
|
||||
return QToolButton::minimumSizeHint();
|
||||
#else
|
||||
return QSize( 120, 28 );
|
||||
#endif
|
||||
}
|
||||
|
||||
void QgsFontButton::showSettingsDialog()
|
||||
{
|
||||
switch ( mMode )
|
||||
|
@ -66,6 +66,8 @@ class GUI_EXPORT QgsFontButton : public QToolButton
|
||||
*/
|
||||
QgsFontButton( QWidget *parent SIP_TRANSFERTHIS = nullptr, const QString &dialogTitle = QString() );
|
||||
|
||||
virtual QSize minimumSizeHint() const override;
|
||||
|
||||
/**
|
||||
* Returns the current button mode.
|
||||
* \see setMode()
|
||||
|
Loading…
x
Reference in New Issue
Block a user