diff --git a/krita/pics/misc-dark/dark_ox16-action-object-align-horizontal-left-calligra.svg b/krita/pics/misc-dark/dark_ox16-action-object-align-horizontal-left-calligra.svg --- a/krita/pics/misc-dark/dark_ox16-action-object-align-horizontal-left-calligra.svg +++ b/krita/pics/misc-dark/dark_ox16-action-object-align-horizontal-left-calligra.svg @@ -15,8 +15,8 @@ id="svg2" version="1.1" inkscape:version="0.92.1 r15371" - sodipodi:docname="dark_ox16-action-object-align-horizontal-left-calligra.svg" - inkscape:export-filename="C:\dribbble\krita icons\Collaborate\1_flat\other\ox16-action-object-align-horizontal-left-calligra.png" + sodipodi:docname="dark_ox16-action-object-align-horizontal-right-calligra.svg" + inkscape:export-filename="C:\dribbble\krita icons\Collaborate\1_flat\other\light_ox16-action-object-align-horizontal-right-calligra.png" inkscape:export-xdpi="45" inkscape:export-ydpi="45"> - - - + + + + + diff --git a/krita/pics/misc-dark/dark_ox16-action-object-align-horizontal-right-calligra.svg b/krita/pics/misc-dark/dark_ox16-action-object-align-horizontal-right-calligra.svg --- a/krita/pics/misc-dark/dark_ox16-action-object-align-horizontal-right-calligra.svg +++ b/krita/pics/misc-dark/dark_ox16-action-object-align-horizontal-right-calligra.svg @@ -15,8 +15,8 @@ id="svg2" version="1.1" inkscape:version="0.92.1 r15371" - sodipodi:docname="dark_ox16-action-object-align-horizontal-right-calligra.svg" - inkscape:export-filename="C:\dribbble\krita icons\Collaborate\1_flat\other\light_ox16-action-object-align-horizontal-right-calligra.png" + sodipodi:docname="dark_ox16-action-object-align-horizontal-left-calligra.svg" + inkscape:export-filename="C:\dribbble\krita icons\Collaborate\1_flat\other\ox16-action-object-align-horizontal-left-calligra.png" inkscape:export-xdpi="45" inkscape:export-ydpi="45"> - - - - - + + + diff --git a/krita/pics/misc-dark/misc-dark-icons.qrc b/krita/pics/misc-dark/misc-dark-icons.qrc --- a/krita/pics/misc-dark/misc-dark-icons.qrc +++ b/krita/pics/misc-dark/misc-dark-icons.qrc @@ -3,8 +3,6 @@ dark_draw-eraser.svg dark_geometry.svg dark_ox16-action-object-align-horizontal-center-calligra.svg - dark_ox16-action-object-align-horizontal-left-calligra.svg - dark_ox16-action-object-align-horizontal-right-calligra.svg dark_ox16-action-object-align-vertical-bottom-calligra.svg dark_ox16-action-object-align-vertical-center-calligra.svg dark_ox16-action-object-align-vertical-top-calligra.svg @@ -63,5 +61,7 @@ dark_curve-preset-l.svg dark_curve-preset-j.svg dark_curve-preset-arch.svg + dark_ox16-action-object-align-horizontal-right-calligra.svg + dark_ox16-action-object-align-horizontal-left-calligra.svg diff --git a/krita/pics/misc-light/light_ox16-action-object-align-horizontal-left-calligra.svg b/krita/pics/misc-light/light_ox16-action-object-align-horizontal-left-calligra.svg --- a/krita/pics/misc-light/light_ox16-action-object-align-horizontal-left-calligra.svg +++ b/krita/pics/misc-light/light_ox16-action-object-align-horizontal-left-calligra.svg @@ -15,8 +15,8 @@ id="svg2" version="1.1" inkscape:version="0.92.1 r15371" - sodipodi:docname="light_ox16-action-object-align-horizontal-left-calligra.svg" - inkscape:export-filename="C:\dribbble\krita icons\Collaborate\1_flat\other\ox16-action-object-align-horizontal-left-calligra.png" + sodipodi:docname="light_ox16-action-object-align-horizontal-right-calligra.svg" + inkscape:export-filename="C:\dribbble\krita icons\Collaborate\1_flat\other\light_ox16-action-object-align-horizontal-right-calligra.png" inkscape:export-xdpi="45" inkscape:export-ydpi="45"> - - - + + + + + diff --git a/krita/pics/misc-light/light_ox16-action-object-align-horizontal-right-calligra.svg b/krita/pics/misc-light/light_ox16-action-object-align-horizontal-right-calligra.svg --- a/krita/pics/misc-light/light_ox16-action-object-align-horizontal-right-calligra.svg +++ b/krita/pics/misc-light/light_ox16-action-object-align-horizontal-right-calligra.svg @@ -15,8 +15,8 @@ id="svg2" version="1.1" inkscape:version="0.92.1 r15371" - sodipodi:docname="light_ox16-action-object-align-horizontal-right-calligra.svg" - inkscape:export-filename="C:\dribbble\krita icons\Collaborate\1_flat\other\light_ox16-action-object-align-horizontal-right-calligra.png" + sodipodi:docname="light_ox16-action-object-align-horizontal-left-calligra.svg" + inkscape:export-filename="C:\dribbble\krita icons\Collaborate\1_flat\other\ox16-action-object-align-horizontal-left-calligra.png" inkscape:export-xdpi="45" inkscape:export-ydpi="45"> - - - - - + + + diff --git a/krita/pics/misc-light/misc-light-icons.qrc b/krita/pics/misc-light/misc-light-icons.qrc --- a/krita/pics/misc-light/misc-light-icons.qrc +++ b/krita/pics/misc-light/misc-light-icons.qrc @@ -3,8 +3,6 @@ light_draw-eraser.svg light_geometry.svg light_ox16-action-object-align-horizontal-center-calligra.svg - light_ox16-action-object-align-horizontal-left-calligra.svg - light_ox16-action-object-align-horizontal-right-calligra.svg light_ox16-action-object-align-vertical-bottom-calligra.svg light_ox16-action-object-align-vertical-center-calligra.svg light_ox16-action-object-align-vertical-top-calligra.svg @@ -63,5 +61,7 @@ light_curve-preset-l.svg light_curve-preset-j.svg light_curve-preset-arch.svg + light_ox16-action-object-align-horizontal-left-calligra.svg + light_ox16-action-object-align-horizontal-right-calligra.svg diff --git a/plugins/dockers/arrangedocker/arrange_docker_widget.h b/plugins/dockers/arrangedocker/arrange_docker_widget.h --- a/plugins/dockers/arrangedocker/arrange_docker_widget.h +++ b/plugins/dockers/arrangedocker/arrange_docker_widget.h @@ -37,6 +37,7 @@ ~ArrangeDockerWidget() override; void setActionCollection(KActionCollection *collection); + void switchState(bool enabled); private: Ui::ArrangeDockerWidget *ui; diff --git a/plugins/dockers/arrangedocker/arrange_docker_widget.cpp b/plugins/dockers/arrangedocker/arrange_docker_widget.cpp --- a/plugins/dockers/arrangedocker/arrange_docker_widget.cpp +++ b/plugins/dockers/arrangedocker/arrange_docker_widget.cpp @@ -88,4 +88,15 @@ setEnabled(enabled); } +void ArrangeDockerWidget::switchState(bool enabled) +{ + if (enabled) { + ui->buttons->show(); + ui->disabledLabel->hide(); + } else { + ui->buttons->hide(); + ui->disabledLabel->show(); + } +} + diff --git a/plugins/dockers/arrangedocker/arrange_docker_widget.ui b/plugins/dockers/arrangedocker/arrange_docker_widget.ui --- a/plugins/dockers/arrangedocker/arrange_docker_widget.ui +++ b/plugins/dockers/arrangedocker/arrange_docker_widget.ui @@ -6,292 +6,522 @@ 0 0 - 838 - 448 + 303 + 426 - - - - - 2 + + + + + QFrame::NoFrame - - - - Qt::NoFocus - - - - - - - - - - Qt::NoFocus - - - - - - - - - - Qt::NoFocus - - - - - - - - - - QFrame::VLine - - - QFrame::Raised - - - - - - - Qt::NoFocus - - - - - - - - - - Qt::NoFocus - - - - - - - - - - Qt::NoFocus - - - - - - - - - - Qt::NoFocus - - - - - - - - - - Qt::NoFocus - - - - - - - - - - Qt::NoFocus - - - - - - - - - - Qt::NoFocus - - - - - - - - - - Qt::NoFocus - - - - - - - - - - Qt::NoFocus - - - - - - - - - - Qt::NoFocus - - - - - - - - - - Qt::Vertical - - - QSizePolicy::Minimum - - - - 6 - 6 - - - - - - - - Qt::Horizontal - - - QSizePolicy::Preferred - - - - 6 - 6 - - - - - - - - Qt::NoFocus - - - - - - - - - - Qt::NoFocus - - - - - - - - - - QFrame::VLine - - - QFrame::Raised - - - - - - - Qt::NoFocus - - - - - - - - - - Qt::NoFocus - - - - - - - - - - Qt::NoFocus - - - - - - - - - - Qt::NoFocus - - - - - - - - - - Qt::NoFocus - - - - - - - + + QFrame::Raised + + + + 4 + + + 5 + + + 5 + + + 5 + + + + + Activate the Select Shapes Tool to arrange objects. + + + true + + + + + - - - - Qt::Horizontal + + + + + 0 + 0 + - - - 631 - 20 - + + QFrame::NoFrame - + + QFrame::Raised + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 4 + + + 7 + + + 7 + + + 5 + + + + + Align + + + Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft + + + + + + + Qt::NoFocus + + + + + + + 22 + 22 + + + + + + + + Qt::NoFocus + + + + + + + 22 + 22 + + + + + + + + Qt::NoFocus + + + + + + + 22 + 22 + + + + + + + + Qt::NoFocus + + + + + + + 22 + 22 + + + + + + + + Qt::NoFocus + + + + + + + 22 + 22 + + + + + + + + Order + + + Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft + + + + + + + Qt::NoFocus + + + + + + + 22 + 22 + + + + + + + + Qt::NoFocus + + + + + + + 22 + 22 + + + + + + + + Qt::NoFocus + + + + + + + 22 + 22 + + + + + + + + Spacing + + + Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft + + + + + + + Group + + + Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft + + + + + + + Qt::NoFocus + + + + + + + 22 + 22 + + + + + + + + Qt::NoFocus + + + + + + + 22 + 22 + + + + + + + + Qt::NoFocus + + + + + + + 22 + 22 + + + + + + + + Qt::NoFocus + + + + + + + 22 + 22 + + + + + + + + Qt::NoFocus + + + + + + + 22 + 22 + + + + + + + + Qt::NoFocus + + + + + + + 22 + 22 + + + + + + + + Qt::NoFocus + + + + + + + 22 + 22 + + + + + + + + Qt::NoFocus + + + + + + + 22 + 22 + + + + + + + + Qt::NoFocus + + + + + + + 22 + 22 + + + + + + + + Qt::NoFocus + + + + + + + 22 + 22 + + + + + + + + Qt::NoFocus + + + + + + + 22 + 22 + + + + + + + + Qt::NoFocus + + + + + + + 22 + 22 + + + + + + + + Distribute + + + Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft + + + + + + + + 0 + 15 + + + + Qt::Horizontal + + + + + + + + 0 + 15 + + + + Qt::Horizontal + + + + + + + + 0 + 15 + + + + Qt::Horizontal + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + - + Qt::Vertical 20 - 323 + 40 diff --git a/plugins/dockers/arrangedocker/arrangedocker_dock.h b/plugins/dockers/arrangedocker/arrangedocker_dock.h --- a/plugins/dockers/arrangedocker/arrangedocker_dock.h +++ b/plugins/dockers/arrangedocker/arrangedocker_dock.h @@ -37,6 +37,7 @@ private Q_SLOTS: void slotToolChanged(); + void slotToolChanged(QString toolId); private: ArrangeDockerWidget *m_configWidget; diff --git a/plugins/dockers/arrangedocker/arrangedocker_dock.cpp b/plugins/dockers/arrangedocker/arrangedocker_dock.cpp --- a/plugins/dockers/arrangedocker/arrangedocker_dock.cpp +++ b/plugins/dockers/arrangedocker/arrangedocker_dock.cpp @@ -31,6 +31,7 @@ , m_canvas(0) { m_configWidget = new ArrangeDockerWidget(this); + m_configWidget->switchState(false); setWidget(m_configWidget); setEnabled(m_canvas); } @@ -58,7 +59,7 @@ m_canvas->toolProxy(), SIGNAL(toolChanged(QString)), this, - SLOT(slotToolChanged())); + SLOT(slotToolChanged(QString))); m_canvasConnections.addConnection( m_canvas->shapeManager(), @@ -80,3 +81,10 @@ KActionCollection *collection = m_canvas->viewManager()->actionCollection(); m_configWidget->setActionCollection(collection); } + +void ArrangeDockerDock::slotToolChanged(QString toolId) +{ + bool enableWidget = (toolId == "InteractionTool") ? true : false; + m_configWidget->switchState(enableWidget); + slotToolChanged(); +}