mirror of
https://invent.kde.org/graphics/okular
synced 2024-10-12 10:53:09 +00:00
Add an action to toggle Change Colors
This has the exact same behaviour of clicking the toolbox Settigs > Configure Okular > Accessibility > Change colors and then clicking Ok, therefore changing the saved configs. BUGS: 173264 FIXED-IN: 4.12.0
This commit is contained in:
parent
e95b1db23c
commit
afc74e76ef
|
@ -533,6 +533,10 @@ do { \
|
|||
mz->setShortcut( Qt::CTRL + Qt::Key_2 );
|
||||
mz->setActionGroup( d->mouseModeActionGroup );
|
||||
mz->setChecked( Okular::Settings::mouseMode() == Okular::Settings::EnumMouseMode::Zoom );
|
||||
|
||||
KAction * aToogleChangeColors = new KAction(i18n("&Toogle Change Colors"), this);
|
||||
ac->addAction("toogle_change_colors", aToogleChangeColors );
|
||||
connect( aToogleChangeColors, SIGNAL(triggered()), this, SLOT(slotToogleChangeColors()) );
|
||||
}
|
||||
|
||||
// WARNING: 'setupViewerActions' must have been called before this method
|
||||
|
@ -4881,6 +4885,13 @@ void PageView::slotProcessRenditionAction( const Okular::RenditionAction *action
|
|||
};
|
||||
}
|
||||
|
||||
void PageView::slotToogleChangeColors()
|
||||
{
|
||||
Okular::SettingsCore::setChangeColors( !Okular::SettingsCore::changeColors() );
|
||||
Okular::Settings::self()->writeConfig();
|
||||
viewport()->update();
|
||||
}
|
||||
|
||||
//END private SLOTS
|
||||
|
||||
#include "pageview.moc"
|
||||
|
|
|
@ -262,6 +262,7 @@ Q_OBJECT
|
|||
void slotAnnotationWindowDestroyed( QObject *window );
|
||||
void slotProcessMovieAction( const Okular::MovieAction *action );
|
||||
void slotProcessRenditionAction( const Okular::RenditionAction *action );
|
||||
void slotToogleChangeColors();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue