@@ -58,20 +58,15 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WFlags fl ) :
5858 connect ( cmbTheme, SIGNAL ( highlighted ( const QString& ) ), this , SLOT ( themeChanged ( const QString& ) ) );
5959 connect ( cmbTheme, SIGNAL ( textChanged ( const QString& ) ), this , SLOT ( themeChanged ( const QString& ) ) );
6060
61- connect ( cmbSize , SIGNAL ( activated ( const QString& ) ), this , SLOT ( iconSizeChanged ( const QString& ) ) );
62- connect ( cmbSize , SIGNAL ( highlighted ( const QString& ) ), this , SLOT ( iconSizeChanged ( const QString& ) ) );
63- connect ( cmbSize , SIGNAL ( textChanged ( const QString& ) ), this , SLOT ( iconSizeChanged ( const QString& ) ) );
61+ connect ( cmbIconSize , SIGNAL ( activated ( const QString& ) ), this , SLOT ( iconSizeChanged ( const QString& ) ) );
62+ connect ( cmbIconSize , SIGNAL ( highlighted ( const QString& ) ), this , SLOT ( iconSizeChanged ( const QString& ) ) );
63+ connect ( cmbIconSize , SIGNAL ( textChanged ( const QString& ) ), this , SLOT ( iconSizeChanged ( const QString& ) ) );
6464
65- connect ( this , SIGNAL ( accepted () ), this , SLOT ( saveOptions () ) );
65+ connect ( cmbFontSize, SIGNAL ( activated ( const QString& ) ), this , SLOT ( fontSizeChanged ( const QString& ) ) );
66+ connect ( cmbFontSize, SIGNAL ( highlighted ( const QString& ) ), this , SLOT ( fontSizeChanged ( const QString& ) ) );
67+ connect ( cmbFontSize, SIGNAL ( textChanged ( const QString& ) ), this , SLOT ( fontSizeChanged ( const QString& ) ) );
6668
67- cmbSize->addItem ( " 16" );
68- cmbSize->addItem ( " 24" );
69- cmbSize->addItem ( " 32" );
70- #ifdef ANDROID
71- int defaultCmbSize = 32 ;
72- #else
73- int defaultCmbSize = 24 ;
74- #endif
69+ connect ( this , SIGNAL ( accepted () ), this , SLOT ( saveOptions () ) );
7570
7671 QStringList styles = QStyleFactory::keys ();
7772 foreach ( QString style, styles )
@@ -286,7 +281,8 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WFlags fl ) :
286281
287282 // set the theme combo
288283 cmbTheme->setCurrentIndex ( cmbTheme->findText ( settings.value ( " /Themes" , " default" ).toString () ) );
289- cmbSize->setCurrentIndex ( cmbSize->findText ( settings.value ( " /IconSize" , defaultCmbSize ).toString () ) );
284+ cmbIconSize->setCurrentIndex ( cmbIconSize->findText ( settings.value ( " /IconSize" , QGIS_ICON_SIZE ).toString () ) );
285+ cmbFontSize->setCurrentIndex ( cmbFontSize->findText ( settings.value ( " /menuSize" , QGIS_FONT_SIZE ).toString () ) );
290286 QString name = QApplication::style ()->objectName ();
291287 cmbStyle->setCurrentIndex ( cmbStyle->findText ( name, Qt::MatchFixedString ) );
292288 // set the state of the checkboxes
@@ -518,15 +514,17 @@ void QgsOptions::on_mLineColorToolButton_clicked()
518514void QgsOptions::themeChanged ( const QString &newThemeName )
519515{
520516 // Slot to change the theme as user scrolls through the choices
521- QString newt = newThemeName;
522- QgisApp::instance ()->setTheme ( newt );
517+ QgisApp::instance ()->setTheme ( newThemeName );
523518}
524519
525520void QgsOptions::iconSizeChanged ( const QString &iconSize )
526521{
527- int icon = iconSize.toInt ();
528- QgisApp::instance ()-> setIconSizes ( icon );
522+ QgisApp::instance ()-> setIconSizes ( iconSize.toInt () );
523+ }
529524
525+ void QgsOptions::fontSizeChanged ( const QString &menuSize )
526+ {
527+ QgisApp::instance ()->setFontSize ( menuSize.toInt () );
530528}
531529
532530QString QgsOptions::theme ()
@@ -652,7 +650,8 @@ void QgsOptions::saveOptions()
652650 settings.setValue ( " /Themes" , cmbTheme->currentText () );
653651 }
654652
655- settings.setValue ( " /IconSize" , cmbSize->currentText () );
653+ settings.setValue ( " /IconSize" , cmbIconSize->currentText () );
654+ settings.setValue ( " /fontSize" , cmbFontSize->currentText () );
656655
657656 settings.setValue ( " /Map/updateThreshold" , spinBoxUpdateThreshold->value () );
658657 // check behaviour so default projection when new layer is added with no
0 commit comments