[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [krita/petrovic/theme-update] plugins/dockers/animation: Fix icons updating on theme change for anim
From: Scott Petrovic <null () kde ! org>
Date: 2017-12-31 19:41:45
Message-ID: E1eVjUP-0000jO-Pc () code ! kde ! org
[Download RAW message or body]
Git commit 903bef6644ac7a8f492c8b43baf6dba4f8725144 by Scott Petrovic.
Committed on 31/12/2017 at 18:02.
Pushed by scottpetrovic into branch 'petrovic/theme-update'.
Fix icons updating on theme change for animation timeline docker
M +12 -0 plugins/dockers/animation/timeline_docker.cpp
M +3 -0 plugins/dockers/animation/timeline_docker.h
M +8 -0 plugins/dockers/animation/timeline_frames_view.cpp
M +1 -0 plugins/dockers/animation/timeline_frames_view.h
https://commits.kde.org/krita/903bef6644ac7a8f492c8b43baf6dba4f8725144
diff --git a/plugins/dockers/animation/timeline_docker.cpp \
b/plugins/dockers/animation/timeline_docker.cpp index 2f17682b43c..e67033bb2a9 100644
--- a/plugins/dockers/animation/timeline_docker.cpp
+++ b/plugins/dockers/animation/timeline_docker.cpp
@@ -120,6 +120,18 @@ void TimelineDocker::setCanvas(KoCanvasBase * canvas)
m_d->canvas->viewManager()->nodeManager(), \
SLOT(slotNonUiActivatedNode(KisNodeSP)));
m_d->model->slotCurrentNodeChanged(m_d->canvas->viewManager()->activeNode());
+
+ m_d->canvasConnections.addConnection(
+ m_d->canvas->viewManager()->mainWindow(), \
SIGNAL(themeChanged()), + this, SLOT(slotUpdateIcons()) );
+ }
+
+}
+
+void TimelineDocker::slotUpdateIcons()
+{
+ if (m_d->view) {
+ m_d->view->slotUpdateIcons();
}
}
diff --git a/plugins/dockers/animation/timeline_docker.h \
b/plugins/dockers/animation/timeline_docker.h index d234866d9b4..d441ce29f6b 100644
--- a/plugins/dockers/animation/timeline_docker.h
+++ b/plugins/dockers/animation/timeline_docker.h
@@ -41,6 +41,9 @@ public:
void unsetCanvas() override;
void setMainWindow(KisViewManager *kisview) override;
+public Q_SLOTS:
+ void slotUpdateIcons();
+
private:
struct Private;
const QScopedPointer<Private> m_d;
diff --git a/plugins/dockers/animation/timeline_frames_view.cpp \
b/plugins/dockers/animation/timeline_frames_view.cpp index a5759a46649..bf0a2071078 \
100644
--- a/plugins/dockers/animation/timeline_frames_view.cpp
+++ b/plugins/dockers/animation/timeline_frames_view.cpp
@@ -226,6 +226,7 @@ TimelineFramesView::TimelineFramesView(QWidget *parent)
m_d->volumeSlider->setSingleStep(1);
m_d->volumeSlider->setPageStep(10);
m_d->volumeSlider->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed);
+
connect(m_d->volumeSlider, SIGNAL(valueChanged(int)), \
SLOT(slotAudioVolumeChanged(int)));
QWidgetAction *volumeAction = new QWidgetAction(m_d->audioOptionsMenu);
@@ -425,6 +426,13 @@ void TimelineFramesView::slotAudioChannelMute(bool value)
}
}
+void TimelineFramesView::slotUpdateIcons()
+{
+ m_d->addLayersButton->setIcon(KisIconUtils::loadIcon("addlayer"));
+ m_d->audioOptionsButton->setIcon(KisIconUtils::loadIcon("audio-none"));
+ m_d->zoomDragButton->setIcon(KisIconUtils::loadIcon("zoom-horizontal"));
+}
+
void TimelineFramesView::slotAudioChannelRemove()
{
if (!m_d->model) return;
diff --git a/plugins/dockers/animation/timeline_frames_view.h \
b/plugins/dockers/animation/timeline_frames_view.h index c061cfb53f7..5178d9ec276 \
100644
--- a/plugins/dockers/animation/timeline_frames_view.h
+++ b/plugins/dockers/animation/timeline_frames_view.h
@@ -45,6 +45,7 @@ public:
public Q_SLOTS:
void slotSelectionChanged();
+ void slotUpdateIcons();
private Q_SLOTS:
void slotUpdateLayersMenu();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic