Skip to content
Permalink
Browse files

Mac: Additional use of Qt non-native font dialog for 32-bit builds un…

…til native QFontDialog bugs are fixed.

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11287 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
telwertowski
telwertowski committed Aug 6, 2009
1 parent f69e26e commit f6e7882f4c501df880e703f7c2c1f80dcd741256
Showing with 20 additions and 0 deletions.
  1. +5 −0 src/app/composer/qgscomposerlabelwidget.cpp
  2. +15 −0 src/app/composer/qgscomposerlegendwidget.cpp
@@ -50,7 +50,12 @@ void QgsComposerLabelWidget::on_mFontButton_clicked()
if ( mComposerLabel )
{
bool ok;
#if defined(Q_WS_MAC) && QT_VERSION >= 0x040500 && !defined(__LP64__)
// Native Mac dialog works only for 64 bit Cocoa (observed in Qt 4.5.2, probably a Qt bug)
QFont newFont = QFontDialog::getFont( &ok, mComposerLabel->font(), this, QString(), QFontDialog::DontUseNativeDialog );
#else
QFont newFont = QFontDialog::getFont( &ok, mComposerLabel->font(), this );
#endif
if ( ok )
{
mComposerLabel->setFont( newFont );
@@ -132,7 +132,12 @@ void QgsComposerLegendWidget::on_mTitleFontButton_clicked()
if ( mLegend )
{
bool ok;
#if defined(Q_WS_MAC) && QT_VERSION >= 0x040500 && !defined(__LP64__)
// Native Mac dialog works only for 64 bit Cocoa (observed in Qt 4.5.2, probably a Qt bug)
QFont newFont = QFontDialog::getFont( &ok, mLegend->titleFont(), this, QString(), QFontDialog::DontUseNativeDialog );
#else
QFont newFont = QFontDialog::getFont( &ok, mLegend->titleFont() );
#endif
if ( ok )
{
mLegend->setTitleFont( newFont );
@@ -147,7 +152,12 @@ void QgsComposerLegendWidget::on_mLayerFontButton_clicked()
if ( mLegend )
{
bool ok;
#if defined(Q_WS_MAC) && QT_VERSION >= 0x040500 && !defined(__LP64__)
// Native Mac dialog works only for 64 bit Cocoa (observed in Qt 4.5.2, probably a Qt bug)
QFont newFont = QFontDialog::getFont( &ok, mLegend->layerFont(), this, QString(), QFontDialog::DontUseNativeDialog );
#else
QFont newFont = QFontDialog::getFont( &ok, mLegend->layerFont() );
#endif
if ( ok )
{
mLegend->setLayerFont( newFont );
@@ -162,7 +172,12 @@ void QgsComposerLegendWidget::on_mItemFontButton_clicked()
if ( mLegend )
{
bool ok;
#if defined(Q_WS_MAC) && QT_VERSION >= 0x040500 && !defined(__LP64__)
// Native Mac dialog works only for 64 bit Cocoa (observed in Qt 4.5.2, probably a Qt bug)
QFont newFont = QFontDialog::getFont( &ok, mLegend->itemFont(), this, QString(), QFontDialog::DontUseNativeDialog );
#else
QFont newFont = QFontDialog::getFont( &ok, mLegend->itemFont() );
#endif
if ( ok )
{
mLegend->setItemFont( newFont );

0 comments on commit f6e7882

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