Skip to content

Commit d8c7c15

Browse files
committedOct 3, 2012
Update for issue #5692
- Qt font dialog on Mac inherits app font if app is in ancestry (make dialog parentless)
1 parent abcc4bf commit d8c7c15

File tree

5 files changed

+8
-11
lines changed

5 files changed

+8
-11
lines changed
 

‎src/app/composer/qgscomposer.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,7 @@ QgsComposer::QgsComposer( QgisApp *qgis, const QString& title )
8585
QSettings settings;
8686
int size = settings.value( "/IconSize", QGIS_ICON_SIZE ).toInt();
8787
setIconSize( QSize( size, size ) );
88-
89-
#ifndef Q_WS_MAC
9088
setFontSize( settings.value( "/fontPointSize", QGIS_DEFAULT_FONTSIZE ).toInt() );
91-
#endif
9289

9390
QToolButton* orderingToolButton = new QToolButton( this );
9491
orderingToolButton->setPopupMode( QToolButton::InstantPopup );

‎src/app/composer/qgscomposerlegendwidget.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ void QgsComposerLegendWidget::on_mTitleFontButton_clicked()
209209
bool ok;
210210
#if defined(Q_WS_MAC) && QT_VERSION >= 0x040500 && defined(QT_MAC_USE_COCOA)
211211
// Native Mac dialog works only for Qt Carbon
212-
QFont newFont = QFontDialog::getFont( &ok, mLegend->titleFont(), this, QString(), QFontDialog::DontUseNativeDialog );
212+
QFont newFont = QFontDialog::getFont( &ok, mLegend->titleFont(), 0, QString(), QFontDialog::DontUseNativeDialog );
213213
#else
214214
QFont newFont = QFontDialog::getFont( &ok, mLegend->titleFont() );
215215
#endif
@@ -231,7 +231,7 @@ void QgsComposerLegendWidget::on_mGroupFontButton_clicked()
231231
bool ok;
232232
#if defined(Q_WS_MAC) && QT_VERSION >= 0x040500 && defined(QT_MAC_USE_COCOA)
233233
// Native Mac dialog works only for Qt Carbon
234-
QFont newFont = QFontDialog::getFont( &ok, mLegend->groupFont(), this, QString(), QFontDialog::DontUseNativeDialog );
234+
QFont newFont = QFontDialog::getFont( &ok, mLegend->groupFont(), 0, QString(), QFontDialog::DontUseNativeDialog );
235235
#else
236236
QFont newFont = QFontDialog::getFont( &ok, mLegend->groupFont() );
237237
#endif
@@ -253,7 +253,7 @@ void QgsComposerLegendWidget::on_mLayerFontButton_clicked()
253253
bool ok;
254254
#if defined(Q_WS_MAC) && QT_VERSION >= 0x040500 && defined(QT_MAC_USE_COCOA)
255255
// Native Mac dialog works only for Qt Carbon
256-
QFont newFont = QFontDialog::getFont( &ok, mLegend->layerFont(), this, QString(), QFontDialog::DontUseNativeDialog );
256+
QFont newFont = QFontDialog::getFont( &ok, mLegend->layerFont(), 0, QString(), QFontDialog::DontUseNativeDialog );
257257
#else
258258
QFont newFont = QFontDialog::getFont( &ok, mLegend->layerFont() );
259259
#endif
@@ -275,7 +275,7 @@ void QgsComposerLegendWidget::on_mItemFontButton_clicked()
275275
bool ok;
276276
#if defined(Q_WS_MAC) && QT_VERSION >= 0x040500 && defined(QT_MAC_USE_COCOA)
277277
// Native Mac dialog works only for Qt Carbon
278-
QFont newFont = QFontDialog::getFont( &ok, mLegend->itemFont(), this, QString(), QFontDialog::DontUseNativeDialog );
278+
QFont newFont = QFontDialog::getFont( &ok, mLegend->itemFont(), 0, QString(), QFontDialog::DontUseNativeDialog );
279279
#else
280280
QFont newFont = QFontDialog::getFont( &ok, mLegend->itemFont() );
281281
#endif

‎src/app/composer/qgscomposermapwidget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ void QgsComposerMapWidget::on_mAnnotationFontButton_clicked()
749749
bool ok;
750750
#if defined(Q_WS_MAC) && QT_VERSION >= 0x040500 && defined(QT_MAC_USE_COCOA)
751751
// Native Mac dialog works only for Qt Carbon
752-
QFont newFont = QFontDialog::getFont( &ok, mComposerMap->gridAnnotationFont(), this, QString(), QFontDialog::DontUseNativeDialog );
752+
QFont newFont = QFontDialog::getFont( &ok, mComposerMap->gridAnnotationFont(), 0, QString(), QFontDialog::DontUseNativeDialog );
753753
#else
754754
QFont newFont = QFontDialog::getFont( &ok, mComposerMap->gridAnnotationFont() );
755755
#endif

‎src/app/qgsdecorationgriddialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ void QgsDecorationGridDialog::on_mAnnotationFontButton_clicked()
277277
bool ok;
278278
#if defined(Q_WS_MAC) && QT_VERSION >= 0x040500 && defined(QT_MAC_USE_COCOA)
279279
// Native Mac dialog works only for Qt Carbon
280-
QFont newFont = QFontDialog::getFont( &ok, mDeco.gridAnnotationFont(), this, QString(), QFontDialog::DontUseNativeDialog );
280+
QFont newFont = QFontDialog::getFont( &ok, mDeco.gridAnnotationFont(), 0, QString(), QFontDialog::DontUseNativeDialog );
281281
#else
282282
QFont newFont = QFontDialog::getFont( &ok, mDeco.gridAnnotationFont() );
283283
#endif

‎src/app/qgslabeldialog.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,9 @@ void QgsLabelDialog::changeFont( void )
282282
bool resultFlag;
283283
#if defined(Q_WS_MAC) && QT_VERSION >= 0x040500 && defined(QT_MAC_USE_COCOA)
284284
// Native Mac dialog works only for Qt Carbon
285-
mFont = QFontDialog::getFont( &resultFlag, mFont, this, QString(), QFontDialog::DontUseNativeDialog );
285+
mFont = QFontDialog::getFont( &resultFlag, mFont, 0, QString(), QFontDialog::DontUseNativeDialog );
286286
#else
287-
mFont = QFontDialog::getFont( &resultFlag, mFont, this );
287+
mFont = QFontDialog::getFont( &resultFlag, mFont);
288288
#endif
289289
if ( !resultFlag )
290290
return;

0 commit comments

Comments
 (0)
Please sign in to comment.