diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2020-01-20 21:19:26 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2020-01-20 21:19:26 +0000 |
| commit | a1badd59575697bc727a3b72ed4140f0f0b13f6b (patch) | |
| tree | 2c60297e50eb0b68d74b7235f004cae3daf84a9a /src/plugins/Ui/qsui | |
| parent | b4f07bac926f18240d8dc7ce8805e5882f2b2e46 (diff) | |
| download | qmmp-a1badd59575697bc727a3b72ed4140f0f0b13f6b.tar.gz qmmp-a1badd59575697bc727a3b72ed4140f0f0b13f6b.tar.bz2 qmmp-a1badd59575697bc727a3b72ed4140f0f0b13f6b.zip | |
qsui: added color settings for waveform seekbar
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9210 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Ui/qsui')
| -rw-r--r-- | src/plugins/Ui/qsui/colorwidget.cpp | 5 | ||||
| -rw-r--r-- | src/plugins/Ui/qsui/forms/qsuisettings.ui | 1538 | ||||
| -rw-r--r-- | src/plugins/Ui/qsui/mainwindow.cpp | 1 | ||||
| -rw-r--r-- | src/plugins/Ui/qsui/qsuisettings.cpp | 11 | ||||
| -rw-r--r-- | src/plugins/Ui/qsui/qsuiwaveformseekbar.cpp | 25 | ||||
| -rw-r--r-- | src/plugins/Ui/qsui/qsuiwaveformseekbar.h | 2 |
6 files changed, 889 insertions, 693 deletions
diff --git a/src/plugins/Ui/qsui/colorwidget.cpp b/src/plugins/Ui/qsui/colorwidget.cpp index d774dbfdc..8c07bed3d 100644 --- a/src/plugins/Ui/qsui/colorwidget.cpp +++ b/src/plugins/Ui/qsui/colorwidget.cpp @@ -19,6 +19,7 @@ ***************************************************************************/ #include <QPalette> +#include <QDebug> #include "colorwidget.h" ColorWidget::ColorWidget(QWidget *parent) : QFrame(parent) @@ -42,11 +43,11 @@ void ColorWidget::setOptions(QColorDialog::ColorDialogOptions options) void ColorWidget::mousePressEvent(QMouseEvent *) { - QColor color = QColorDialog::getColor(palette().color(backgroundRole()), parentWidget(), + QColor color = QColorDialog::getColor(QColor(m_colorName), parentWidget(), tr("Select Color"), m_options); if (color.isValid()) { - setColor(color.name()); + setColor(color.name((m_options & QColorDialog::ShowAlphaChannel) ? QColor::HexArgb : QColor::HexRgb)); } } diff --git a/src/plugins/Ui/qsui/forms/qsuisettings.ui b/src/plugins/Ui/qsui/forms/qsuisettings.ui index f69395c7a..9308d4800 100644 --- a/src/plugins/Ui/qsui/forms/qsuisettings.ui +++ b/src/plugins/Ui/qsui/forms/qsuisettings.ui @@ -6,8 +6,8 @@ <rect> <x>0</x> <y>0</y> - <width>497</width> - <height>529</height> + <width>512</width> + <height>578</height> </rect> </property> <property name="windowTitle"> @@ -186,685 +186,867 @@ </attribute> <layout class="QVBoxLayout" name="verticalLayout_8"> <item> - <widget class="QGroupBox" name="groupBox_4"> - <property name="title"> - <string>Visualization Colors</string> - </property> - <layout class="QGridLayout" name="gridLayout_4"> - <item row="0" column="0"> - <widget class="QLabel" name="label"> - <property name="text"> - <string>Color #1:</string> - </property> - </widget> - </item> - <item row="0" column="1"> - <widget class="ColorWidget" name="vColor1"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Plain</enum> - </property> - </widget> - </item> - <item row="0" column="3"> - <widget class="QLabel" name="label_3"> - <property name="text"> - <string>Peaks:</string> - </property> - </widget> - </item> - <item row="0" column="4"> - <widget class="ColorWidget" name="peaksColor"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="QLabel" name="label_4"> - <property name="text"> - <string>Color #2:</string> - </property> - </widget> - </item> - <item row="1" column="1"> - <widget class="ColorWidget" name="vColor2"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - </widget> - </item> - <item row="1" column="3"> - <widget class="QLabel" name="label_5"> - <property name="text"> - <string>Background:</string> - </property> - </widget> - </item> - <item row="1" column="4"> - <widget class="ColorWidget" name="bgColor"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - </widget> - </item> - <item row="2" column="0"> - <widget class="QLabel" name="label_6"> - <property name="text"> - <string>Color #3:</string> - </property> - </widget> - </item> - <item row="2" column="1"> - <widget class="ColorWidget" name="vColor3"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - </widget> - </item> - <item row="2" column="3" colspan="3"> - <spacer name="horizontalSpacer"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Preferred</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item row="0" column="2" rowspan="3"> - <spacer name="horizontalSpacer_4"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item row="0" column="5" rowspan="2"> - <spacer name="horizontalSpacer_3"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>10</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item row="3" column="0" colspan="6"> - <layout class="QHBoxLayout" name="horizontalLayout_6"> - <item> - <spacer name="horizontalSpacer_12"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QPushButton" name="resetColorsButton"> - <property name="text"> - <string>Reset colors</string> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QGroupBox" name="groupBox_3"> - <property name="title"> - <string>Playlist Colors</string> + <widget class="QScrollArea" name="scrollArea"> + <property name="widgetResizable"> + <bool>true</bool> </property> - <layout class="QVBoxLayout" name="verticalLayout_7"> - <item> - <widget class="QCheckBox" name="plSystemColorsCheckBox"> - <property name="text"> - <string>Use system colors</string> - </property> - <property name="checked"> - <bool>true</bool> - </property> - </widget> - </item> - <item> - <widget class="QWidget" name="widget_2" native="true"> - <property name="enabled"> - <bool>false</bool> - </property> - <layout class="QGridLayout" name="gridLayout_2"> - <item row="0" column="0"> - <widget class="QLabel" name="label_7"> - <property name="text"> - <string>Background #1:</string> - </property> - </widget> - </item> - <item row="0" column="1"> - <widget class="ColorWidget" name="plBg1Color"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - </widget> - </item> - <item row="0" column="2" rowspan="5" colspan="2"> - <spacer name="horizontalSpacer_5"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>43</height> - </size> - </property> - </spacer> - </item> - <item row="0" column="4" colspan="2"> - <widget class="QLabel" name="label_10"> - <property name="text"> - <string>Normal text:</string> - </property> - </widget> - </item> - <item row="0" column="6"> - <widget class="ColorWidget" name="plTextNormalColor"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - </widget> - </item> - <item row="0" column="7" rowspan="5"> - <spacer name="horizontalSpacer_6"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>66</width> - <height>68</height> - </size> - </property> - </spacer> - </item> - <item row="1" column="0"> - <widget class="QLabel" name="label_8"> - <property name="text"> - <string>Background #2:</string> - </property> - </widget> - </item> - <item row="1" column="1"> - <widget class="ColorWidget" name="plBg2Color"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - </widget> - </item> - <item row="1" column="4" colspan="2"> - <widget class="QLabel" name="label_11"> - <property name="text"> - <string>Current text:</string> - </property> - </widget> - </item> - <item row="1" column="6"> - <widget class="ColorWidget" name="plTextCurrentColor"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - </widget> - </item> - <item row="2" column="0"> - <widget class="QLabel" name="label_9"> - <property name="text"> - <string>Highlighted background:</string> - </property> - </widget> - </item> - <item row="2" column="1"> - <widget class="ColorWidget" name="plHlColor"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - </widget> - </item> - <item row="2" column="4" colspan="2"> - <widget class="QLabel" name="label_12"> - <property name="text"> - <string>Highlighted text:</string> - </property> - </widget> - </item> - <item row="2" column="6"> - <widget class="ColorWidget" name="plTextHlCurrentColor"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Plain</enum> - </property> - </widget> - </item> - <item row="3" column="0" rowspan="2"> - <widget class="QLabel" name="label_19"> - <property name="text"> - <string>Splitter:</string> - </property> - </widget> - </item> - <item row="3" column="1" rowspan="2"> - <widget class="ColorWidget" name="plSplitterColor"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - <property name="baseSize"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Plain</enum> - </property> - </widget> - </item> - <item row="4" column="4" colspan="2"> - <widget class="QLabel" name="label_15"> - <property name="text"> - <string>Group text:</string> - </property> - </widget> - </item> - <item row="4" column="6"> - <widget class="ColorWidget" name="plGrTextColor"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Plain</enum> - </property> - </widget> - </item> - <item row="6" column="0"> - <widget class="QLabel" name="label_14"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="text"> - <string>Group background:</string> - </property> - </widget> - </item> - <item row="6" column="1"> - <widget class="ColorWidget" name="plGrBgColor"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Plain</enum> - </property> - </widget> - </item> - <item row="7" column="0" colspan="5"> - <widget class="QCheckBox" name="plOverrideCurrentBgCheckBox"> - <property name="text"> - <string>Override current track background</string> - </property> - </widget> - </item> - <item row="8" column="0"> - <widget class="QLabel" name="label_20"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="text"> - <string>Current track background:</string> - </property> - </widget> - </item> - <item row="8" column="1"> - <widget class="ColorWidget" name="plCurrentTrackBgColor"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Plain</enum> - </property> - </widget> - </item> - <item row="5" column="0" colspan="8"> - <widget class="QCheckBox" name="plOverrideGroupBgCheckBox"> - <property name="text"> - <string>Override group background</string> - </property> - </widget> - </item> - <item row="6" column="4" colspan="4"> - <spacer name="horizontalSpacer_9"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>110</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item row="8" column="4" colspan="4"> - <spacer name="horizontalSpacer_10"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>189</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - </layout> - </widget> - </item> - </layout> + <widget class="QWidget" name="scrollAreaWidgetContents"> + <property name="geometry"> + <rect> + <x>0</x> + <y>-28</y> + <width>454</width> + <height>535</height> + </rect> + </property> + <layout class="QVBoxLayout" name="verticalLayout_9"> + <item> + <widget class="QGroupBox" name="groupBox_4"> + <property name="title"> + <string>Visualization Colors</string> + </property> + <layout class="QGridLayout" name="gridLayout_4"> + <item row="0" column="0"> + <widget class="QLabel" name="label"> + <property name="text"> + <string>Color #1:</string> + </property> + </widget> + </item> + <item row="0" column="1"> + <widget class="ColorWidget" name="vColor1"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + <property name="frameShape"> + <enum>QFrame::Box</enum> + </property> + <property name="frameShadow"> + <enum>QFrame::Plain</enum> + </property> + </widget> + </item> + <item row="0" column="3"> + <widget class="QLabel" name="label_3"> + <property name="text"> + <string>Peaks:</string> + </property> + </widget> + </item> + <item row="0" column="4"> + <widget class="ColorWidget" name="peaksColor"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + <property name="frameShape"> + <enum>QFrame::Box</enum> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="label_4"> + <property name="text"> + <string>Color #2:</string> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="ColorWidget" name="vColor2"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + <property name="frameShape"> + <enum>QFrame::Box</enum> + </property> + </widget> + </item> + <item row="1" column="3"> + <widget class="QLabel" name="label_5"> + <property name="text"> + <string>Background:</string> + </property> + </widget> + </item> + <item row="1" column="4"> + <widget class="ColorWidget" name="bgColor"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + <property name="frameShape"> + <enum>QFrame::Box</enum> + </property> + </widget> + </item> + <item row="2" column="0"> + <widget class="QLabel" name="label_6"> + <property name="text"> + <string>Color #3:</string> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="ColorWidget" name="vColor3"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + <property name="frameShape"> + <enum>QFrame::Box</enum> + </property> + </widget> + </item> + <item row="2" column="3" colspan="3"> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Preferred</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item row="0" column="2" rowspan="3"> + <spacer name="horizontalSpacer_4"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item row="0" column="5" rowspan="2"> + <spacer name="horizontalSpacer_3"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>10</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item row="3" column="0" colspan="6"> + <layout class="QHBoxLayout" name="horizontalLayout_6"> + <item> + <spacer name="horizontalSpacer_12"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="resetColorsButton"> + <property name="text"> + <string>Reset colors</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QGroupBox" name="groupBox_3"> + <property name="title"> + <string>Playlist Colors</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout_7"> + <item> + <widget class="QCheckBox" name="plSystemColorsCheckBox"> + <property name="text"> + <string>Use system colors</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QWidget" name="widget_2" native="true"> + <property name="enabled"> + <bool>false</bool> + </property> + <layout class="QGridLayout" name="gridLayout_2"> + <item row="4" column="6"> + <widget class="ColorWidget" name="plGrTextColor"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + <property name="frameShape"> + <enum>QFrame::Box</enum> + </property> + <property name="frameShadow"> + <enum>QFrame::Plain</enum> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="ColorWidget" name="plHlColor"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + <property name="frameShape"> + <enum>QFrame::Box</enum> + </property> + </widget> + </item> + <item row="8" column="1"> + <widget class="ColorWidget" name="plCurrentTrackBgColor"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + <property name="frameShape"> + <enum>QFrame::Box</enum> + </property> + <property name="frameShadow"> + <enum>QFrame::Plain</enum> + </property> + </widget> + </item> + <item row="2" column="6"> + <widget class="ColorWidget" name="plTextHlCurrentColor"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + <property name="frameShape"> + <enum>QFrame::Box</enum> + </property> + <property name="frameShadow"> + <enum>QFrame::Plain</enum> + </property> + </widget> + </item> + <item row="1" column="6"> + <widget class="ColorWidget" name="plTextCurrentColor"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + <property name="frameShape"> + <enum>QFrame::Box</enum> + </property> + </widget> + </item> + <item row="0" column="2" rowspan="5" colspan="2"> + <spacer name="horizontalSpacer_5"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>43</height> + </size> + </property> + </spacer> + </item> + <item row="0" column="7" rowspan="5"> + <spacer name="horizontalSpacer_6"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>66</width> + <height>68</height> + </size> + </property> + </spacer> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="label_8"> + <property name="text"> + <string>Background #2:</string> + </property> + </widget> + </item> + <item row="8" column="4" colspan="4"> + <spacer name="horizontalSpacer_10"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>189</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item row="0" column="1"> + <widget class="ColorWidget" name="plBg1Color"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + <property name="frameShape"> + <enum>QFrame::Box</enum> + </property> + </widget> + </item> + <item row="2" column="0"> + <widget class="QLabel" name="label_9"> + <property name="text"> + <string>Highlighted background:</string> + </property> + </widget> + </item> + <item row="0" column="4" colspan="2"> + <widget class="QLabel" name="label_10"> + <property name="text"> + <string>Normal text:</string> + </property> + </widget> + </item> + <item row="3" column="1" rowspan="2"> + <widget class="ColorWidget" name="plSplitterColor"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + <property name="baseSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + <property name="frameShape"> + <enum>QFrame::Box</enum> + </property> + <property name="frameShadow"> + <enum>QFrame::Plain</enum> + </property> + </widget> + </item> + <item row="3" column="0" rowspan="2"> + <widget class="QLabel" name="label_19"> + <property name="text"> + <string>Splitter:</string> + </property> + </widget> + </item> + <item row="1" column="4" colspan="2"> + <widget class="QLabel" name="label_11"> + <property name="text"> + <string>Current text:</string> + </property> + </widget> + </item> + <item row="2" column="4" colspan="2"> + <widget class="QLabel" name="label_12"> + <property name="text"> + <string>Highlighted text:</string> + </property> + </widget> + </item> + <item row="8" column="0"> + <widget class="QLabel" name="label_20"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Current track background:</string> + </property> + </widget> + </item> + <item row="0" column="6"> + <widget class="ColorWidget" name="plTextNormalColor"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + <property name="frameShape"> + <enum>QFrame::Box</enum> + </property> + </widget> + </item> + <item row="7" column="0" colspan="5"> + <widget class="QCheckBox" name="plOverrideCurrentBgCheckBox"> + <property name="text"> + <string>Override current track background</string> + </property> + </widget> + </item> + <item row="6" column="1"> + <widget class="ColorWidget" name="plGrBgColor"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + <property name="frameShape"> + <enum>QFrame::Box</enum> + </property> + <property name="frameShadow"> + <enum>QFrame::Plain</enum> + </property> + </widget> + </item> + <item row="6" column="4" colspan="4"> + <spacer name="horizontalSpacer_9"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>110</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item row="6" column="0"> + <widget class="QLabel" name="label_14"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Group background:</string> + </property> + </widget> + </item> + <item row="5" column="0" colspan="8"> + <widget class="QCheckBox" name="plOverrideGroupBgCheckBox"> + <property name="text"> + <string>Override group background</string> + </property> + </widget> + </item> + <item row="4" column="4" colspan="2"> + <widget class="QLabel" name="label_15"> + <property name="text"> + <string>Group text:</string> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="ColorWidget" name="plBg2Color"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + <property name="frameShape"> + <enum>QFrame::Box</enum> + </property> + </widget> + </item> + <item row="0" column="0"> + <widget class="QLabel" name="label_7"> + <property name="text"> + <string>Background #1:</string> + </property> + </widget> + </item> + </layout> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QGroupBox" name="groupBox_8"> + <property name="title"> + <string>Waveform Seekbar Colors</string> + </property> + <layout class="QGridLayout" name="gridLayout_5"> + <item row="1" column="0"> + <widget class="QLabel" name="label_24"> + <property name="text"> + <string>Progress bar:</string> + </property> + </widget> + </item> + <item row="0" column="1"> + <widget class="ColorWidget" name="wfsbBgColor"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + <property name="frameShape"> + <enum>QFrame::Box</enum> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="ColorWidget" name="wfsbProgressBarColor"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + <property name="frameShape"> + <enum>QFrame::Box</enum> + </property> + </widget> + </item> + <item row="1" column="4"> + <widget class="ColorWidget" name="wfsbRmsColor"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + <property name="frameShape"> + <enum>QFrame::Box</enum> + </property> + </widget> + </item> + <item row="0" column="0"> + <widget class="QLabel" name="label_21"> + <property name="text"> + <string>Background:</string> + </property> + </widget> + </item> + <item row="1" column="3"> + <widget class="QLabel" name="label_23"> + <property name="text"> + <string>RMS:</string> + </property> + </widget> + </item> + <item row="0" column="2" rowspan="2"> + <spacer name="horizontalSpacer_11"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item row="0" column="4"> + <widget class="ColorWidget" name="wfsbWaveFormColor"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + <property name="frameShape"> + <enum>QFrame::Box</enum> + </property> + </widget> + </item> + <item row="0" column="3"> + <widget class="QLabel" name="label_22"> + <property name="text"> + <string>Waveform:</string> + </property> + </widget> + </item> + <item row="0" column="5" rowspan="2"> + <spacer name="horizontalSpacer_13"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> + </item> + <item> + <spacer name="verticalSpacer_4"> + <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> </item> - <item> - <spacer name="verticalSpacer_4"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>129</height> - </size> - </property> - </spacer> - </item> </layout> </widget> <widget class="QWidget" name="tab_3"> diff --git a/src/plugins/Ui/qsui/mainwindow.cpp b/src/plugins/Ui/qsui/mainwindow.cpp index afa5bbeb8..54332c1c9 100644 --- a/src/plugins/Ui/qsui/mainwindow.cpp +++ b/src/plugins/Ui/qsui/mainwindow.cpp @@ -344,6 +344,7 @@ void MainWindow::showSettings() readSettings(); ActionManager::instance()->saveActions(); m_analyzer->readSettings(); + m_seekBar->readSettings(); } void MainWindow::updateVolumeIcon() diff --git a/src/plugins/Ui/qsui/qsuisettings.cpp b/src/plugins/Ui/qsui/qsuisettings.cpp index c84ce26f1..89b13fb23 100644 --- a/src/plugins/Ui/qsui/qsuisettings.cpp +++ b/src/plugins/Ui/qsui/qsuisettings.cpp @@ -45,6 +45,8 @@ QSUiSettings::QSUiSettings(QWidget *parent) : QWidget(parent) m_ui.toolBarIconSizeComboBox->addItem(tr("32x32"), 32); m_ui.toolBarIconSizeComboBox->addItem(tr("48x48"), 48); m_ui.toolBarIconSizeComboBox->addItem(tr("64x64"), 64); + //other settings + m_ui.wfsbProgressBarColor->setOptions(QColorDialog::ShowAlphaChannel); //load settings readSettings(); loadFonts(); @@ -207,6 +209,11 @@ void QSUiSettings::readSettings() m_ui.plCurrentTrackBgColor->setColor(settings.value("pl_current_bg_color", normal_bg).toString()); m_ui.plOverrideGroupBgCheckBox->setChecked(settings.value("pl_override_group_bg", false).toBool()); m_ui.plOverrideCurrentBgCheckBox->setChecked(settings.value("pl_override_current_bg", false).toBool()); + //waveform seekbar color + m_ui.wfsbBgColor->setColor(settings.value("wfsb_bg_color", "Black").toString()); + m_ui.wfsbRmsColor->setColor(settings.value("wfsb_rms_color", "#DDDDDD").toString()); + m_ui.wfsbWaveFormColor->setColor(settings.value("wfsb_waveform_color", "#BECBFF").toString()); + m_ui.wfsbProgressBarColor->setColor(settings.value("wfsb_progressbar_color", "#9633CA10").toString()); //toolbar int index = m_ui.toolBarIconSizeComboBox->findData(settings.value("toolbar_icon_size", -1).toInt()); m_ui.toolBarIconSizeComboBox->setCurrentIndex(index > 0 ? index : 0); @@ -254,6 +261,10 @@ void QSUiSettings::writeSettings() settings.setValue("use_system_fonts", m_ui.systemFontsCheckBox->isChecked()); int index = m_ui.toolBarIconSizeComboBox->currentIndex(); settings.setValue("toolbar_icon_size", m_ui.toolBarIconSizeComboBox->itemData(index)); + settings.setValue("wfsb_bg_color", m_ui.wfsbBgColor->colorName()); + settings.setValue("wfsb_rms_color", m_ui.wfsbRmsColor->colorName()); + settings.setValue("wfsb_waveform_color", m_ui.wfsbWaveFormColor->colorName()); + settings.setValue("wfsb_progressbar_color", m_ui.wfsbProgressBarColor->colorName()); settings.endGroup(); } diff --git a/src/plugins/Ui/qsui/qsuiwaveformseekbar.cpp b/src/plugins/Ui/qsui/qsuiwaveformseekbar.cpp index 339080105..872144c87 100644 --- a/src/plugins/Ui/qsui/qsuiwaveformseekbar.cpp +++ b/src/plugins/Ui/qsui/qsuiwaveformseekbar.cpp @@ -44,6 +44,19 @@ QSize QSUIWaveformSeekBar::sizeHint() const return QSize(200, 100); } +void QSUIWaveformSeekBar::readSettings() +{ + QSettings settings(Qmmp::configFile(), QSettings::IniFormat); + settings.beginGroup("Simple"); + m_bgColor.setNamedColor(settings.value("wfsb_bg_color", "Black").toString()); + m_rmsColor.setNamedColor(settings.value("wfsb_rms_color", "#DDDDDD").toString()); + m_waveFormColor.setNamedColor(settings.value("wfsb_waveform_color", "#BECBFF").toString()); + m_progressBar.setNamedColor(settings.value("wfsb_progressbar_color", "#9633CA10").toString()); + settings.endGroup(); + drawWaveform(); +} + + void QSUIWaveformSeekBar::onStateChanged(Qmmp::State state) { switch (state) @@ -294,18 +307,6 @@ void QSUIWaveformSeekBar::drawWaveform() update(); } -void QSUIWaveformSeekBar::readSettings() -{ - QSettings settings(Qmmp::configFile(), QSettings::IniFormat); - settings.beginGroup("Simple"); - m_bgColor.setNamedColor(settings.value("wfsb_bg_color", "Black").toString()); - m_rmsColor.setNamedColor(settings.value("wfsb_rms_color", "#DDDDDD").toString()); - m_waveFormColor.setNamedColor(settings.value("wfsb_waveform_color", "#BECBFF").toString()); - m_progressBar.setNamedColor(settings.value("wfsb_progressbar_color", "#9633CA10").toString()); - settings.endGroup(); - drawWaveform(); -} - QSUIWaveformScanner::QSUIWaveformScanner(QObject *parent) : QThread(parent) {} diff --git a/src/plugins/Ui/qsui/qsuiwaveformseekbar.h b/src/plugins/Ui/qsui/qsuiwaveformseekbar.h index 226552ebc..d768e7312 100644 --- a/src/plugins/Ui/qsui/qsuiwaveformseekbar.h +++ b/src/plugins/Ui/qsui/qsuiwaveformseekbar.h @@ -39,6 +39,7 @@ class QSUIWaveformSeekBar : public QWidget public: explicit QSUIWaveformSeekBar(QWidget *parent = nullptr); QSize sizeHint() const override; + void readSettings(); private slots: void onStateChanged(Qmmp::State state); @@ -53,7 +54,6 @@ private: void mouseReleaseEvent(QMouseEvent *) override; void mouseMoveEvent(QMouseEvent *e) override; void drawWaveform(); - void readSettings(); SoundCore *m_core; QSUIWaveformScanner *m_scanner = nullptr; |
