mirror of
https://invent.kde.org/graphics/okular
synced 2024-10-05 23:49:20 +00:00
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:
parent
59307b57ab
commit
1547c78340
2
part.cpp
2
part.cpp
|
@ -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 )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue