aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Baptiste Mardelle <[email protected]>2016-07-13 22:03:04 +0200
committerJean-Baptiste Mardelle <[email protected]>2016-07-13 22:03:04 +0200
commit3b1a28a81f5d6e979cb66ff2522d87e807f3d5a3 (patch)
treef6fa40556f7bcb0d849619c48c07b9c04e89f210
parent2c034ca0ec39d4debf1865514ba92b57c54bbe85 (diff)
Save track header width
-rw-r--r--src/kdenlivesettings.kcfg4
-rw-r--r--src/timeline/timeline.cpp6
-rw-r--r--src/timeline/timeline.h2
3 files changed, 12 insertions, 0 deletions
diff --git a/src/kdenlivesettings.kcfg b/src/kdenlivesettings.kcfg
index 05bfd2d..c87012a 100644
--- a/src/kdenlivesettings.kcfg
+++ b/src/kdenlivesettings.kcfg
@@ -168,6 +168,10 @@
</group>
<group name="timeline">
+ <entry name="timelineheaderwidth" type="String">
+ <label>Default width for timeline track headers.</label>
+ <default></default>
+ </entry>
<entry name="defaultkeyframeinterp" type="Int">
<label>Default interpolation for keyframes.</label>
<default>1</default>
diff --git a/src/timeline/timeline.cpp b/src/timeline/timeline.cpp
index 51c8b60..fc80b93 100644
--- a/src/timeline/timeline.cpp
+++ b/src/timeline/timeline.cpp
@@ -82,6 +82,7 @@ Timeline::Timeline(KdenliveDoc *doc, const QList<QAction *> &actions, const QLis
m_trackActions << actions;
setupUi(this);
splitter->setStretchFactor(1, 2);
+ connect(splitter, &QSplitter::splitterMoved, this, &Timeline::storeHeaderSize);
m_scene = new CustomTrackScene(this);
m_trackview = new CustomTrackView(doc, this, m_scene, parent);
if (m_doc->setSceneList() == -1) *ok = false;
@@ -171,6 +172,7 @@ Timeline::Timeline(KdenliveDoc *doc, const QList<QAction *> &actions, const QLis
connect(m_disablePreview, &QAction::triggered, this, &Timeline::disablePreview);
m_disablePreview->setEnabled(false);
m_trackview->initTools();
+ splitter->restoreState(QByteArray::fromBase64(KdenliveSettings::timelineheaderwidth().toUtf8()));
QAction *previewRender = m_doc->getAction(QStringLiteral("prerender_timeline_zone"));
previewRender->setEnabled(true);
}
@@ -1997,3 +1999,7 @@ void Timeline::addPreviewRange(bool add)
m_timelinePreview->addPreviewRange(add);
}
+void Timeline::storeHeaderSize(int , int )
+{
+ KdenliveSettings::setTimelineheaderwidth(splitter->saveState().toBase64());
+}
diff --git a/src/timeline/timeline.h b/src/timeline/timeline.h
index 7fb4e9a..0878282 100644
--- a/src/timeline/timeline.h
+++ b/src/timeline/timeline.h
@@ -278,6 +278,8 @@ private slots:
void disablePreview(bool disable);
/** @brief Resize ruler layout to adjust for timeline preview. */
void resizeRuler(int height);
+ /** @brief The timeline track headers were resized, store width. */
+ void storeHeaderSize(int pos, int index);
signals:
void mousePosition(int);