mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
[FEATURE] Colourblind preview modes now work on OSX (#4971)
* [FEATURE] Colourblind preview modes now work on OSX * Enable colour picker widgets on Mac OS and colour preview modes in composer in Mac OS
This commit is contained in:
parent
06f9842637
commit
6f7ef8ac2e
@ -326,16 +326,12 @@ QgsComposer::QgsComposer( QgsComposition *composition )
|
||||
QShortcut *ctrlEquals = new QShortcut( QKeySequence( QStringLiteral( "Ctrl+=" ) ), this );
|
||||
connect( ctrlEquals, &QShortcut::activated, mActionZoomIn, &QAction::trigger );
|
||||
|
||||
#ifndef Q_OS_MAC
|
||||
//disabled for OSX - see #10761
|
||||
//also see http://qt-project.org/forums/viewthread/3630 QGraphicsEffects are not well supported on OSX
|
||||
QMenu *previewMenu = viewMenu->addMenu( QStringLiteral( "&Preview" ) );
|
||||
previewMenu->addAction( mActionPreviewModeOff );
|
||||
previewMenu->addAction( mActionPreviewModeGrayscale );
|
||||
previewMenu->addAction( mActionPreviewModeMono );
|
||||
previewMenu->addAction( mActionPreviewProtanope );
|
||||
previewMenu->addAction( mActionPreviewDeuteranope );
|
||||
#endif
|
||||
|
||||
viewMenu->addSeparator();
|
||||
viewMenu->addAction( mActionZoomIn );
|
||||
|
@ -2244,14 +2244,6 @@ void QgisApp::createMenus()
|
||||
mSettingsMenu->insertSeparator( before );
|
||||
}
|
||||
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
//disabled for OSX - see #10761
|
||||
//also see http://qt-project.org/forums/viewthread/3630 QGraphicsEffects are not well supported on OSX
|
||||
mMenuPreviewMode->menuAction()->setVisible( false );
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
|
||||
// keep plugins from hijacking About and Preferences application menus
|
||||
|
@ -520,14 +520,13 @@ void QgsColorButton::prepareMenu()
|
||||
mMenu->addAction( pasteColorAction );
|
||||
connect( pasteColorAction, &QAction::triggered, this, &QgsColorButton::pasteColor );
|
||||
|
||||
#ifndef Q_OS_MAC
|
||||
//disabled for OSX, as it is impossible to grab the mouse under OSX
|
||||
//see note for QWidget::grabMouse() re OSX Cocoa
|
||||
//http://qt-project.org/doc/qt-4.8/qwidget.html#grabMouse
|
||||
QAction *pickColorAction = new QAction( tr( "Pick color" ), this );
|
||||
mMenu->addAction( pickColorAction );
|
||||
connect( pickColorAction, &QAction::triggered, this, &QgsColorButton::activatePicker );
|
||||
#endif
|
||||
|
||||
QAction *chooseColorAction = new QAction( tr( "Choose color..." ), this );
|
||||
mMenu->addAction( chooseColorAction );
|
||||
connect( chooseColorAction, &QAction::triggered, this, &QgsColorButton::showColorDialog );
|
||||
|
@ -201,13 +201,6 @@ QgsCompoundColorWidget::QgsCompoundColorWidget( QWidget *parent, const QColor &c
|
||||
int currentTab = settings.value( QStringLiteral( "Windows/ColorDialog/activeTab" ), 0 ).toInt();
|
||||
mTabWidget->setCurrentIndex( currentTab );
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
//disable color picker tab for OSX, as it is impossible to grab the mouse under OSX
|
||||
//see note for QWidget::grabMouse() re OSX Cocoa
|
||||
//http://qt-project.org/doc/qt-4.8/qwidget.html#grabMouse
|
||||
mTabWidget->removeTab( 3 );
|
||||
#endif
|
||||
|
||||
//setup connections
|
||||
connect( mColorBox, &QgsColorWidget::colorChanged, this, &QgsCompoundColorWidget::setColor );
|
||||
connect( mColorWheel, &QgsColorWidget::colorChanged, this, &QgsCompoundColorWidget::setColor );
|
||||
|
Loading…
x
Reference in New Issue
Block a user