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
This commit is contained in:
Simone Gaiarin 2018-12-21 12:40:49 +01:00 committed by Oliver Sander
parent 59307b57ab
commit 1547c78340
2 changed files with 7 additions and 6 deletions

View file

@ -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 );

View file

@ -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 )
{