Commit b260fb7c authored by Julius Künzel's avatar Julius Künzel 💬
Browse files

[Kdenlive Settings] Improve layout and usability

parent 0a63da41
......@@ -273,12 +273,7 @@ void KdenliveSettingsDialog::initProjectPage()
connect(m_pw, &ProfileWidget::profileChanged, this, &KdenliveSettingsDialog::slotDialogModified);
m_configProject.projecturl->setMode(KFile::Directory);
m_configProject.projecturl->setUrl(QUrl::fromLocalFile(KdenliveSettings::defaultprojectfolder()));
connect(m_configProject.kcfg_customprojectfolder, &QCheckBox::stateChanged, this,
[this](int state) { m_configProject.kcfg_sameprojectfolder->setEnabled(state == Qt::Unchecked); });
connect(m_configProject.kcfg_sameprojectfolder, &QCheckBox::stateChanged, this, [this](int state) {
m_configProject.kcfg_customprojectfolder->setEnabled(state == Qt::Unchecked);
m_configProject.projecturl->setEnabled(state == Qt::Unchecked);
});
connect(m_configProject.kcfg_customprojectfolder, &QCheckBox::toggled, m_configProject.projecturl, &KUrlRequester::setEnabled);
connect(m_configProject.kcfg_videotracks, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, [this]() {
if (m_configProject.kcfg_videotracks->value() + m_configProject.kcfg_audiotracks->value() <= 0) {
m_configProject.kcfg_videotracks->setValue(1);
......@@ -764,7 +759,7 @@ void KdenliveSettingsDialog::initDevices()
m_configSdl.kcfg_audio_backend->setCurrentIndex(ix);
KdenliveSettings::setAudio_backend(ix);
}
m_configSdl.group_sdl->setEnabled(KdenliveSettings::audiobackend().startsWith(QLatin1String("sdl")));
slotCheckAudioBackend();
// Fill monitors data
fillMonitorData();
......@@ -1301,8 +1296,11 @@ void KdenliveSettingsDialog::slotCheckAlsaDriver()
void KdenliveSettingsDialog::slotCheckAudioBackend()
{
QString value = m_configSdl.kcfg_audio_backend->currentData().toString();
m_configSdl.group_sdl->setEnabled(value.startsWith(QLatin1String("sdl")));
bool isSdl = m_configSdl.kcfg_audio_backend->currentData().toString().startsWith(QLatin1String("sdl"));
m_configSdl.label_audio_driver->setEnabled(isSdl);
m_configSdl.kcfg_audio_driver->setEnabled(isSdl);
m_configSdl.label_audio_device->setEnabled(isSdl);
m_configSdl.kcfg_audio_device->setEnabled(isSdl);
}
void KdenliveSettingsDialog::loadTranscodeProfiles()
......
This diff is collapsed.
......@@ -10,10 +10,7 @@
<height>300</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="2">
<widget class="KColorButton" name="kcfg_thumbColor2"/>
</item>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
......@@ -21,7 +18,27 @@
</property>
</widget>
</item>
<item row="0" column="1">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="KColorButton" name="kcfg_thumbColor1"/>
</item>
<item>
<widget class="KColorButton" name="kcfg_thumbColor2"/>
</item>
</layout>
</item>
<item row="2" column="1">
<widget class="KColorButton" name="kcfg_overlayColor"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Monitor overlay color:</string>
</property>
</widget>
</item>
<item row="3" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
......@@ -34,32 +51,6 @@
</property>
</spacer>
</item>
<item row="0" column="3">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>36</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="1">
<widget class="KColorButton" name="kcfg_thumbColor1"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Monitor overlay color:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="KColorButton" name="kcfg_overlayColor"/>
</item>
</layout>
</widget>
<customwidgets>
......@@ -69,11 +60,6 @@
<header>kcolorbutton.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>kcfg_thumbColor1</tabstop>
<tabstop>kcfg_thumbColor2</tabstop>
<tabstop>kcfg_overlayColor</tabstop>
</tabstops>
<resources/>
<connections/>
</ui>
......@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>476</width>
<height>524</height>
<height>560</height>
</rect>
</property>
<property name="sizePolicy">
......@@ -29,6 +29,13 @@
<string>Proxy and Transcode Jobs</string>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<item row="1" column="0" colspan="2">
<widget class="QCheckBox" name="kcfg_nice_tasks">
<property name="text">
<string>Use lower CPU priority for proxy and transcode tasks</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QSpinBox" name="kcfg_proxythreads">
<property name="sizePolicy">
......@@ -42,13 +49,6 @@
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="QCheckBox" name="kcfg_nice_tasks">
<property name="text">
<string>Use lower CPU priority for proxy and transcode tasks</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_9">
<property name="text">
......@@ -65,10 +65,10 @@
<string>Cached Data</string>
</property>
<layout class="QGridLayout" name="gridLayout_7">
<item row="0" column="0">
<widget class="QLabel" name="label_17">
<item row="1" column="0" colspan="2">
<widget class="QLabel" name="label_18">
<property name="text">
<string>Warn if cached data exceeds:</string>
<string>Kdenlive will check this limit every 2 weeks. Set to zero to disable checking.</string>
</property>
</widget>
</item>
......@@ -91,10 +91,10 @@
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="QLabel" name="label_18">
<item row="0" column="0">
<widget class="QLabel" name="label_17">
<property name="text">
<string>Kdenlive will check this limit every 2 weeks. Set to zero to disable checking.</string>
<string>Warn if cached data exceeds:</string>
</property>
</widget>
</item>
......@@ -104,37 +104,31 @@
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
<number>3</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>MLT Environment</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_3">
<item row="6" column="1">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>FFmpeg:</string>
</property>
</spacer>
</widget>
</item>
<item row="2" column="1" colspan="2">
<widget class="KUrlRequester" name="ffprobeurl"/>
<item row="0" column="1">
<widget class="KUrlRequester" name="ffmpegurl"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label">
<item row="1" column="0">
<widget class="QLabel" name="label_13">
<property name="text">
<string>MLT profiles folder:</string>
<string>FFplay:</string>
</property>
</widget>
</item>
<item row="1" column="1" colspan="2">
<item row="1" column="1">
<widget class="KUrlRequester" name="ffplayurl"/>
</item>
<item row="2" column="0">
......@@ -144,20 +138,17 @@
</property>
</widget>
</item>
<item row="0" column="1" colspan="2">
<widget class="KUrlRequester" name="ffmpegurl"/>
<item row="2" column="1">
<widget class="KUrlRequester" name="ffprobeurl"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_13">
<item row="3" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>FFplay:</string>
<string>MLT profiles folder:</string>
</property>
</widget>
</item>
<item row="4" column="1" colspan="2">
<widget class="KUrlRequester" name="rendererpathurl"/>
</item>
<item row="3" column="1" colspan="2">
<item row="3" column="1">
<widget class="KUrlRequester" name="mltpathurl"/>
</item>
<item row="4" column="0">
......@@ -167,12 +158,8 @@
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>FFmpeg:</string>
</property>
</widget>
<item row="4" column="1">
<widget class="KUrlRequester" name="rendererpathurl"/>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_6">
......@@ -181,25 +168,11 @@
</property>
</widget>
</item>
<item row="5" column="1" colspan="2">
<item row="5" column="1">
<widget class="KUrlRequester" name="mediainfourl"/>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_2">
<attribute name="title">
<string>Default Folders</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Temporary files:</string>
</property>
</widget>
</item>
<item row="7" column="1">
<spacer name="verticalSpacer_3">
<item row="6" column="1">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
......@@ -211,70 +184,83 @@
</property>
</spacer>
</item>
<item row="0" column="1" colspan="2">
<widget class="KUrlRequester" name="tmppathurl"/>
</item>
<item row="2" column="1" colspan="2">
<widget class="KUrlRequester" name="capturefolderurl"/>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_16">
</layout>
</widget>
<widget class="QWidget" name="tab_2">
<attribute name="title">
<string>Default Folders</string>
</attribute>
<layout class="QFormLayout" name="formLayout_3">
<item row="0" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Folder for rendering, titles, scripts:</string>
</property>
<property name="wordWrap">
<bool>true</bool>
<string>Temporary files:</string>
</property>
</widget>
</item>
<item row="4" column="1" colspan="2">
<widget class="KUrlRequester" name="libraryfolderurl"/>
</item>
<item row="6" column="1" colspan="2">
<widget class="KUrlRequester" name="videofolderurl">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
<item row="0" column="1">
<widget class="KUrlRequester" name="tmppathurl"/>
</item>
<item row="1" column="0">
<item row="2" column="0">
<widget class="QLabel" name="label_10">
<property name="text">
<string>Capture folder:</string>
</property>
</widget>
</item>
<item row="3" column="0">
<item row="2" column="1">
<widget class="QComboBox" name="kcfg_capturetoprojectfolder">
<item>
<property name="text">
<string>Use default folder</string>
</property>
</item>
<item>
<property name="text">
<string>Always use project folder</string>
</property>
</item>
<item>
<property name="text">
<string>Always use custom folder</string>
</property>
</item>
</widget>
</item>
<item row="4" column="1">
<widget class="KUrlRequester" name="capturefolderurl"/>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_15">
<property name="text">
<string>Library folder:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<item row="6" column="1">
<widget class="QCheckBox" name="kcfg_librarytodefaultfolder">
<property name="text">
<string>Use default folder</string>
</property>
</widget>
</item>
<item row="3" column="2">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<item row="7" column="1">
<widget class="KUrlRequester" name="libraryfolderurl"/>
</item>
<item row="9" column="0">
<widget class="QLabel" name="label_16">
<property name="text">
<string>Folder for rendering, titles, scripts:</string>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</spacer>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="5" column="1" colspan="2">
<item row="9" column="1">
<widget class="QComboBox" name="kcfg_videotodefaultfolder">
<item>
<property name="text">
......@@ -293,39 +279,85 @@
</item>
</widget>
</item>
<item row="1" column="1" colspan="2">
<widget class="QComboBox" name="kcfg_capturetoprojectfolder">
<item>
<property name="text">
<string>Use default folder</string>
</property>
</item>
<item>
<property name="text">
<string>Always use project folder</string>
</property>
</item>
<item>
<property name="text">
<string>Always use custom folder</string>
</property>
</item>
<item row="11" column="1">
<widget class="KUrlRequester" name="videofolderurl">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="13" column="1">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_3">
<attribute name="title">
<string>Default Apps</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_6">
<item row="0" column="2">
<widget class="QPushButton" name="kp_image">
<layout class="QFormLayout" name="formLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Change…</string>
<string>Image editing:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLineEdit" name="kcfg_defaultimageapp">
<property name="placeholderText">
<string>Path to image editing application</string>
</property>
<property name="showClearButton" stdset="0">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="kp_image">
<property name="text">
<string>Change…</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLineEdit" name="kcfg_defaultaudioapp">
<property name="placeholderText">
<string>Path to audio editing application</string>
</property>
<property name="showClearButton" stdset="0">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="kp_audio">
<property name="text">
<string>Change…</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_11">
<property name="text">
......@@ -333,34 +365,32 @@
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="kcfg_defaultaudioapp">
<property name="placeholderText">
<string>Path to audio editing application</string>
</property>
<property name="showClearButton" stdset="0">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="kcfg_defaultimageapp">
<property name="placeholderText">
<string>Path to image editing application</string>
</property>
<property name="showClearButton" stdset="0">
<bool>true</bool>
</property>
</widget>
<item row="2" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QLineEdit" name="kcfg_glaxnimatePath">
<property name="placeholderText">
<string>Path to Glaxnimate executable</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="kp_anim">
<property name="text">
<string>Change…</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="kp_audio">
<item row="2" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Change…</string>
<string>Animation editing:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<item row="3" column="0">
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
......@@ -373,34 +403,6 @@
</property>
</spacer>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Image editing:</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Animation editing:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="kcfg_glaxnimatePath">
<property name="placeholderText">
<string>Path to Glaxnimate executable</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QPushButton" name="kp_anim">
<property name="text">
<string>Change…</string>
</property>
</widget>
</item>
</layout>
</widget>