Commit d9d38db0 authored by Timothée Giet's avatar Timothée Giet

icon clean-up in animator - second part

Some more clean-up in the animator dockers.
Note that some icons don't load properly, according to somsubhra that happens because those icons are not loaded in Krita first.
That might be because we are sharing KisView2.. and so problem should be solved after the mvc merge, once we load the dockers in krita itself.

Also hides a button that is actually useless and dangerous.

TODO:
At least add icons for "add keyframe", "add empty frame", "delete frame" .
If possible create new dark/light icons instead of colored ones for other icons.
parent bf390f7d
......@@ -80,6 +80,8 @@ dark_properties.png
dark_selection-mode_ants.png
dark_selection-mode_invisible.png
dark_selection-mode_mask.png
dark_onionA.png
dark_onionB.png
light_select.png
light_pattern.png
......@@ -96,6 +98,8 @@ light_properties.png
light_selection-mode_ants.png
light_selection-mode_invisible.png
light_selection-mode_mask.png
light_onionA.png
light_onionB.png
DESTINATION ${DATA_INSTALL_DIR}/krita/pics)
add_subdirectory(app)
......
This diff is collapsed.
......@@ -23,6 +23,7 @@
#include "kis_view2.h"
#include <KoIcon.h>
#include <kis_icon.h>
#include <QPainter>
#include <QLineEdit>
......@@ -45,17 +46,17 @@ KisAnimationLayer::KisAnimationLayer(KisAnimationLayerBox *parent, int index)
m_lblLayerName->setGeometry(QRect(10, 0, 100, 20));
m_visibilityToggle = new QPushButton(this);
m_visibilityToggle->setIcon(koIcon("list-add"));
m_visibilityToggle->setIcon(koIcon("visible"));
m_visibilityToggle->setGeometry(QRect(110, 0, 20, 20));
connect(m_visibilityToggle, SIGNAL(clicked()), this, SLOT(visibilityToggleClicked()));
m_lockToggle = new QPushButton(this);
m_lockToggle->setIcon(koIcon("list-add"));
m_lockToggle->setIcon(koIcon("unlocked"));
m_lockToggle->setGeometry(QRect(130, 0, 20, 20));
connect(m_lockToggle, SIGNAL(clicked()), this, SLOT(lockToggleClicked()));
m_onionSkinToggle = new QPushButton(this);
m_onionSkinToggle->setIcon(koIcon("list-add"));
m_onionSkinToggle->setIcon(kisIcon("onionA"));
m_onionSkinToggle->setGeometry(QRect(150, 0, 20, 20));
connect(m_onionSkinToggle, SIGNAL(clicked()), this, SLOT(onionSkinToggleClicked()));
......@@ -95,9 +96,9 @@ void KisAnimationLayer::onionSkinToggleClicked()
m_layerBox->setOnionSkinState(layer, onionSkinState);
if(onionSkinState) {
m_onionSkinToggle->setIcon(koIcon("list-remove"));
m_onionSkinToggle->setIcon(kisIcon("onionB"));
} else {
m_onionSkinToggle->setIcon(koIcon("list-add"));
m_onionSkinToggle->setIcon(koIcon("onionA"));
}
// Make onion skin changes in the canvas
......@@ -113,9 +114,9 @@ void KisAnimationLayer::lockToggleClicked()
m_layerBox->setLockState(layer, lockState);
if(lockState) {
m_lockToggle->setIcon(koIcon("list-remove"));
m_lockToggle->setIcon(koIcon("locked"));
} else {
m_lockToggle->setIcon(koIcon("list-add"));
m_lockToggle->setIcon(koIcon("unlocked"));
}
// Make lock state changes in the canvas
......@@ -131,9 +132,9 @@ void KisAnimationLayer::visibilityToggleClicked()
m_layerBox->setVisibilityState(layer, visibilityState);
if(visibilityState) {
m_visibilityToggle->setIcon(koIcon("list-remove"));
m_visibilityToggle->setIcon(koIcon("novisible"));
} else {
m_visibilityToggle->setIcon(koIcon("list-add"));
m_visibilityToggle->setIcon(koIcon("visible"));
}
// Make the visibilty state changes in the canvas
......
......@@ -82,14 +82,14 @@ void KisTimeline::init()
QToolBar* layerButtons = new QToolBar(this);
QToolButton* addLayerButton = new QToolButton(this);
addLayerButton->setIcon(koIcon("list-add"));
addLayerButton->setIcon(kisIcon("addlayer"));
addLayerButton->setToolTip(i18n("Add Animation Layer"));
KisAction* addPaintLayerAction = new KisAction(koIcon("list-add"), i18n("Add Animation Paint Layer"), this);
KisAction* addPaintLayerAction = new KisAction(koIcon("document-new"), i18n("Add Animation Paint Layer"), this);
actionManager->addAction("add_animation_paint_layer", addPaintLayerAction, actionCollection);
connect(addPaintLayerAction, SIGNAL(triggered()), this, SLOT(paintLayerPressed()));
KisAction* addVectorLayerAction = new KisAction(koIcon("list-add"), i18n("Add Animation Vector Layer"), this);
KisAction* addVectorLayerAction = new KisAction(koIcon("bookmark-new"), i18n("Add Animation Vector Layer"), this);
actionManager->addAction("add_animation_vector_layer", addVectorLayerAction, actionCollection);
connect(addVectorLayerAction, SIGNAL(triggered()), this, SLOT(vectorLayerPressed()));
......@@ -138,11 +138,13 @@ void KisTimeline::init()
leftWidget->setLayout(leftLayout);
QToolBar* frameButtons = new QToolBar(this);
/*
* remove redundant button
*
KisAction* addFrameAction = new KisAction(koIcon("list-add"), i18n("Insert Frame"), this);
actionManager->addAction("insert_frame", addFrameAction, actionCollection);
connect(addFrameAction, SIGNAL(triggered()), this, SLOT(addframePressed()));
*/
KisAction* addKeyFrameAction = new KisAction(koIcon("list-add"), i18n("Insert Keyframe"), this);
actionManager->addAction("insert_key_frame", addKeyFrameAction, actionCollection);
connect(addKeyFrameAction, SIGNAL(triggered()), this, SLOT(keyFramePressed()));
......@@ -155,7 +157,7 @@ void KisTimeline::init()
actionManager->addAction("remove_frame", removeFrameAction, actionCollection);
connect(removeFrameAction, SIGNAL(triggered()), this, SLOT(removeFramePressed()));
frameButtons->addAction(addFrameAction);
// frameButtons->addAction(addFrameAction);
frameButtons->addAction(addKeyFrameAction);
frameButtons->addAction(addBlankFrameAction);
frameButtons->addAction(removeFrameAction);
......@@ -425,6 +427,7 @@ void KisTimeline::keyFramePressed()
}
}
/*
void KisTimeline::addframePressed()
{
if(m_cells->getSelectedFrame()) {
......@@ -432,6 +435,7 @@ void KisTimeline::addframePressed()
this->m_cells->setSelectedFrame();
}
}
*/
void KisTimeline::removeFramePressed()
{
......
......@@ -83,7 +83,7 @@ private:
private slots:
void blankFramePressed();
void keyFramePressed();
void addframePressed();
// void addframePressed();
void removeFramePressed();
void frameSelectionChanged(QRect frame);
......
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