Commit 8469dfac authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Make monitor overlay guides color configurable

parent 339b1514
Pipeline #159100 passed with stage
in 10 minutes and 46 seconds
......@@ -13,6 +13,7 @@ SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
#include "kdenlivesettings.h"
#include "mainwindow.h"
#include "monitor/monitor.h"
#include "monitor/monitorproxy.h"
#include "profiles/profilemodel.hpp"
#include "profiles/profilerepository.hpp"
#include "profilesdialog.h"
......@@ -1123,6 +1124,12 @@ void KdenliveSettingsDialog::updateSettings()
pCore->getMonitor(Kdenlive::ClipMonitor)->refreshAudioThumbs();
}
if (m_configColors.kcfg_overlayColor->color() != KdenliveSettings::overlayColor()) {
KdenliveSettings::setOverlayColor(m_configColors.kcfg_overlayColor->color());
pCore->getMonitor(Kdenlive::ProjectMonitor)->getControllerProxy()->colorsChanged();
pCore->getMonitor(Kdenlive::ClipMonitor)->getControllerProxy()->colorsChanged();
}
if (m_configSdl.kcfg_volume->value() != KdenliveSettings::volume()) {
KdenliveSettings::setVolume(m_configSdl.kcfg_volume->value());
resetConsumer = true;
......
......@@ -1024,6 +1024,11 @@
<default>#2ed172</default>
</entry>
<entry name="overlayColor" type="Color">
<label>Color to draw the monitor overlay guides.</label>
<default>#00ffff</default>
</entry>
<entry name="rescalekeepratio" type="Bool">
<label>Keep aspect ratio in render dialog rescale widget.</label>
<default>true</default>
......
......@@ -360,6 +360,11 @@ QColor MonitorProxy::thumbColor2() const
return KdenliveSettings::thumbColor2();
}
QColor MonitorProxy::overlayColor() const
{
return KdenliveSettings::overlayColor();
}
bool MonitorProxy::audioThumbFormat() const
{
return KdenliveSettings::displayallchannels();
......
......@@ -41,6 +41,7 @@ class MonitorProxy : public QObject
Q_PROPERTY(double speed MEMBER m_speed NOTIFY speedChanged)
Q_PROPERTY(QColor thumbColor1 READ thumbColor1 NOTIFY colorsChanged)
Q_PROPERTY(QColor thumbColor2 READ thumbColor2 NOTIFY colorsChanged)
Q_PROPERTY(QColor overlayColor READ overlayColor NOTIFY colorsChanged)
Q_PROPERTY(bool autoKeyframe READ autoKeyframe NOTIFY autoKeyframeChanged)
Q_PROPERTY(bool audioThumbFormat READ audioThumbFormat NOTIFY audioThumbFormatChanged)
Q_PROPERTY(bool audioThumbNormalize READ audioThumbNormalize NOTIFY audioThumbNormalizeChanged)
......@@ -75,6 +76,7 @@ public:
Q_INVOKABLE void seek(int delta, uint modifiers);
Q_INVOKABLE QColor thumbColor1() const;
Q_INVOKABLE QColor thumbColor2() const;
Q_INVOKABLE QColor overlayColor() const;
Q_INVOKABLE QByteArray getUuid() const;
Q_INVOKABLE const QPoint clipBoundary(int ix);
bool audioThumbFormat() const;
......
......@@ -52,7 +52,7 @@ Item {
property int overlayType: controller.overlayType
property color thumbColor1: controller.thumbColor1
property color thumbColor2: controller.thumbColor2
property color overlayColor: 'cyan'
property color overlayColor: controller.overlayColor
property bool isClipMonitor: true
property int dragType: 0
property string baseThumbPath
......
......@@ -40,7 +40,7 @@ Item {
property double frameSize: 10
property double timeScale: 1
property int overlayType: controller.overlayType
property color overlayColor: 'cyan'
property color overlayColor: controller.overlayColor
property bool isClipMonitor: false
FontMetrics {
......
......@@ -17,7 +17,7 @@ Item {
property rect framesize
property point profile: controller.profile
property int overlayType: controller.overlayType
property color overlayColor: 'cyan'
property color overlayColor: controller.overlayColor
property point center
property double scalex
property double scaley
......
......@@ -18,7 +18,7 @@ Item {
property rect adjustedFrame
property point profile: controller.profile
property int overlayType: controller.overlayType
property color overlayColor: 'cyan'
property color overlayColor: controller.overlayColor
property point center
property double scalex
property double scaley
......
......@@ -20,7 +20,7 @@ Item {
property point center
property real baseUnit: fontMetrics.font.pixelSize * 0.8
property int overlayType: controller.overlayType
property color overlayColor: 'cyan'
property color overlayColor: controller.overlayColor
property double scalex : 1
property double scaley : 1
property bool captureRightClick: true
......
......@@ -18,7 +18,7 @@ Item {
property rect framesize
property point profile: controller.profile
property int overlayType: 0
property color overlayColor: 'cyan'
property color overlayColor: controller.overlayColor
property point center
property double scalex
property double scaley
......
......@@ -40,7 +40,7 @@ Item {
property double frameSize: 10
property double timeScale: 1
property int overlayType: controller.overlayType
property color overlayColor: 'cyan'
property color overlayColor: controller.overlayColor
property bool isClipMonitor: false
FontMetrics {
......
......@@ -11,6 +11,9 @@
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="2">
<widget class="KColorButton" name="kcfg_thumbColor2"/>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
......@@ -18,11 +21,18 @@
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="KColorButton" name="kcfg_thumbColor1"/>
</item>
<item row="0" column="2">
<widget class="KColorButton" name="kcfg_thumbColor2"/>
<item row="2" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>248</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="3">
<spacer name="horizontalSpacer">
......@@ -37,18 +47,18 @@
</property>
</spacer>
</item>
<item row="0" column="1">
<widget class="KColorButton" name="kcfg_thumbColor1"/>
</item>
<item row="1" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>248</height>
</size>
<widget class="QLabel" name="label">
<property name="text">
<string>Monitor overlay color:</string>
</property>
</spacer>
</widget>
</item>
<item row="1" column="1">
<widget class="KColorButton" name="kcfg_overlayColor"/>
</item>
</layout>
</widget>
......
Supports Markdown
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