Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

timeline fixes

parent 790fce48
......@@ -2217,7 +2217,7 @@ void MainWindow::slotSwitchAudioThumbs()
{
KdenliveSettings::setAudiothumbnails(!KdenliveSettings::audiothumbnails());
pCore->binController()->checkAudioThumbs();
m_timelineTabs->showThumbnailsChanged();
m_timelineTabs->showAudioThumbnailsChanged();
m_buttonAudioThumbs->setChecked(KdenliveSettings::audiothumbnails());
}
......@@ -3648,7 +3648,7 @@ void MainWindow::slotUpdateTimecodeFormat(int ix)
m_effectStack->transitionConfig()->updateTimecodeFormat();
m_effectStack->updateTimecodeFormat();
pCore->bin()->updateTimecodeFormat();
pCore->projectManager()->currentTimeline()->updateRuler();
getMainTimeline()->frameFormatChanged();
m_timeFormatButton->setFont(QFontDatabase::systemFont(QFontDatabase::FixedFont));
}
......
......@@ -107,7 +107,6 @@ Rectangle {
function reparent(track) {
parent = track
isAudio = track.isAudio
height = track.height
generateWaveform()
}
......@@ -139,6 +138,7 @@ Rectangle {
Image {
id: outThumbnail
visible: timeline.showThumbnails && mltService != 'color' && !isAudio
opacity: trackRoot.isAudio || trackRoot.isHidden ? 0.2 : 1
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
......@@ -151,6 +151,7 @@ Rectangle {
Image {
id: inThumbnail
visible: timeline.showThumbnails && mltService != 'color' && !isAudio
opacity: trackRoot.isAudio || trackRoot.isHidden ? 0.2 : 1
anchors.left: parent.left
anchors.top: parent.top
anchors.bottom: parent.bottom
......@@ -162,8 +163,8 @@ Rectangle {
Row {
id: waveform
visible: hasAudio && timeline.showAudioThumbnails
height: isAudio? parent.height - 1 : (parent.height - 1) / 2
visible: hasAudio && timeline.showAudioThumbnails && !trackRoot.isMute
height: isAudio || trackRoot.isAudio ? parent.height - 1 : (parent.height - 1) / 2
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
......@@ -187,18 +188,6 @@ Rectangle {
}
}
Rectangle {
// audio peak line
visible: hasAudio && timeline.showAudioThumbnails
height: 1
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.bottomMargin: waveform.height * 0.9
color: Qt.darker(clipRoot.color)
opacity: 0.4
}
Rectangle {
// text background
id: labelRect
......
......@@ -40,6 +40,11 @@ Rectangle {
}
}
function adjustFormat() {
labelSize = fontMetrics.tightBoundingRect(timeline.timecode(36000)).width
adjustStepSize()
}
id: rulerTop
enabled: false
height: fontMetrics.font.pixelSize * 2
......
......@@ -24,6 +24,8 @@ Column{
property alias model: trackModel.model
property alias rootIndex: trackModel.rootIndex
property bool isAudio
property bool isMute
property bool isHidden
property real timeScale: 1.0
property bool isCurrentTrack: false
property bool isLocked: false
......
......@@ -533,6 +533,8 @@ Rectangle {
timeScale: timeline.scaleFactor
width: root.duration * timeScale
isAudio: audio
isMute: mute
isHidden: hidden
isCurrentTrack: currentTrack === index
trackId: item
selection: timeline.selection
......@@ -621,6 +623,7 @@ Rectangle {
Connections {
target: timeline
onPositionChanged: if (!stopScrolling) Logic.scrollIfNeeded()
onFrameFormatChanged: ruler.adjustFormat()
/*onDragging: Logic.dragging(pos, duration)
onDropped: Logic.dropped()
onDropAccepted: Logic.acceptDrop(xml)*/
......
......@@ -67,9 +67,7 @@ public:
const qreal indicesPrPixel = qreal(m_outPoint - m_inPoint) / width();
QPen pen = painter->pen();
pen.setWidthF(0.5);
pen.setColor(m_color.darker());
painter->setPen(Qt::NoPen);
// painter->setBrush(QBrush(m_color.lighter()));
pen.setColor(Qt::black);
if (!KdenliveSettings::displayallchannels()) {
m_gradient.setFinalStop(0, height());
......
......@@ -196,6 +196,7 @@ private:
signals:
void selectionChanged();
void frameFormatChanged();
void selected(Mlt::Producer *producer);
void trackHeightChanged();
void scaleFactorChanged();
......
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