Commit 1547c783 authored by Simone Gaiarin's avatar Simone Gaiarin Committed by Oliver Sander

Move "erase drawings" action to last position and change its icon

It is more logical to have the drawing tools first, then the eraser,
and then the action to delete everything. Also the two actions to erase
things are close to each other now.

The icon of "erase drawing" has been changed to draw-eraser-delete-objects
to distinguish it from the "Eraser" tool.

BUG: 399734

Differential Revision: https://phabricator.kde.org/D16171
parent 59307b57
......@@ -903,7 +903,7 @@ void Part::setupActions()
QAction *eraseDrawingAction = new QAction( i18n( "Erase Drawings" ), ac );
ac->addAction( QStringLiteral("presentation_erase_drawings"), eraseDrawingAction );
eraseDrawingAction->setIcon( QIcon::fromTheme( QStringLiteral("draw-eraser") ) );
eraseDrawingAction->setIcon( QIcon::fromTheme( QStringLiteral("draw-eraser-delete-objects") ) );
eraseDrawingAction->setEnabled( false );
QAction *configureAnnotations = new QAction( i18n( "Configure Annotations..." ), ac );
......
......@@ -193,11 +193,6 @@ PresentationWidget::PresentationWidget( QWidget * parent, Okular::Document * doc
setPlayPauseIcon();
addAction( playPauseAct );
m_topBar->addSeparator();
QAction *eraseDrawingAct = collection->action( QStringLiteral("presentation_erase_drawings") );
eraseDrawingAct->setEnabled( true );
connect(eraseDrawingAct, &QAction::triggered, this, &PresentationWidget::clearDrawings);
m_topBar->addAction( eraseDrawingAct );
addAction( eraseDrawingAct );
foreach(QAction *action, drawingToolActions->actions())
{
......@@ -208,6 +203,12 @@ PresentationWidget::PresentationWidget( QWidget * parent, Okular::Document * doc
connect( drawingToolActions, &DrawingToolActions::changeEngine, this, &PresentationWidget::slotChangeDrawingToolEngine );
connect( drawingToolActions, &DrawingToolActions::actionsRecreated, this, &PresentationWidget::slotAddDrawingToolActions );
QAction *eraseDrawingAct = collection->action( QStringLiteral("presentation_erase_drawings") );
eraseDrawingAct->setEnabled( true );
connect(eraseDrawingAct, &QAction::triggered, this, &PresentationWidget::clearDrawings);
m_topBar->addAction( eraseDrawingAct );
addAction( eraseDrawingAct );
QDesktopWidget *desktop = QApplication::desktop();
if ( desktop->numScreens() > 1 )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment