[QGIS Commit] r11287 - trunk/qgis/src/app/composer
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Thu Aug 6 11:47:43 EDT 2009
Author: telwertowski
Date: 2009-08-06 11:47:43 -0400 (Thu, 06 Aug 2009)
New Revision: 11287
Modified:
trunk/qgis/src/app/composer/qgscomposerlabelwidget.cpp
trunk/qgis/src/app/composer/qgscomposerlegendwidget.cpp
Log:
Mac: Additional use of Qt non-native font dialog for 32-bit builds until native QFontDialog bugs are fixed.
Modified: trunk/qgis/src/app/composer/qgscomposerlabelwidget.cpp
===================================================================
--- trunk/qgis/src/app/composer/qgscomposerlabelwidget.cpp 2009-08-06 15:02:41 UTC (rev 11286)
+++ trunk/qgis/src/app/composer/qgscomposerlabelwidget.cpp 2009-08-06 15:47:43 UTC (rev 11287)
@@ -50,7 +50,12 @@
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 );
Modified: trunk/qgis/src/app/composer/qgscomposerlegendwidget.cpp
===================================================================
--- trunk/qgis/src/app/composer/qgscomposerlegendwidget.cpp 2009-08-06 15:02:41 UTC (rev 11286)
+++ trunk/qgis/src/app/composer/qgscomposerlegendwidget.cpp 2009-08-06 15:47:43 UTC (rev 11287)
@@ -132,7 +132,12 @@
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 @@
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 @@
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 );
More information about the QGIS-commit
mailing list