[vlc-commits] qt: add color scheme option in simple preferences

Prince Gupta git at videolan.org
Mon Mar 1 10:40:08 UTC 2021


vlc | branch: master | Prince Gupta <guptaprince8832 at gmail.com> | Tue Feb 23 15:53:53 2021 +0530| [f842dca9fd99694ad3f515ae82a220e0ff4d1dce] | committer: Pierre Lamot

qt: add color scheme option in simple preferences

Signed-off-by: Pierre Lamot <pierre at videolabs.io>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f842dca9fd99694ad3f515ae82a220e0ff4d1dce
---

 modules/gui/qt/dialogs/preferences/simple_preferences.cpp |  5 +++++
 modules/gui/qt/dialogs/preferences/sprefs_interface.ui    | 13 +++++++++++++
 2 files changed, 18 insertions(+)

diff --git a/modules/gui/qt/dialogs/preferences/simple_preferences.cpp b/modules/gui/qt/dialogs/preferences/simple_preferences.cpp
index 0680c338f2..506a895272 100644
--- a/modules/gui/qt/dialogs/preferences/simple_preferences.cpp
+++ b/modules/gui/qt/dialogs/preferences/simple_preferences.cpp
@@ -28,6 +28,8 @@
 
 #include "simple_preferences.hpp"
 #include "preferences_widgets.hpp"
+#include "maininterface/main_interface.hpp"
+#include "util/color_scheme_model.hpp"
 
 #include <vlc_config_cat.h>
 #include <vlc_configuration.h>
@@ -806,6 +808,9 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
 
             CONFIG_BOOL( "metadata-network-access", MetadataNetworkAccessMode );
 
+            ui.colorSchemeComboBox->insertItems(0, p_intf->p_sys->p_mi->getColorScheme()->stringList());
+            QObject::connect( ui.colorSchemeComboBox, &QComboBox::currentTextChanged, p_intf->p_sys->p_mi->getColorScheme(), &ColorSchemeModel::setCurrent );
+
             /* UPDATE options */
 #ifdef UPDATE_CHECK
             CONFIG_BOOL( "qt-updates-notif", updatesBox );
diff --git a/modules/gui/qt/dialogs/preferences/sprefs_interface.ui b/modules/gui/qt/dialogs/preferences/sprefs_interface.ui
index 1c505156c3..cf20749328 100644
--- a/modules/gui/qt/dialogs/preferences/sprefs_interface.ui
+++ b/modules/gui/qt/dialogs/preferences/sprefs_interface.ui
@@ -284,6 +284,19 @@
              <item row="11" column="2" colspan="2">
               <widget class="QComboBox" name="autoRaiseComboBox"/>
              </item>
+             <item row="12" column="0">
+              <widget class="QLabel" name="colorSchemeLabel">
+               <property name="text">
+                <string>Color Scheme:</string>
+               </property>
+               <property name="buddy">
+                <cstring>colorSchemeComboBox</cstring>
+               </property>
+              </widget>
+             </item>
+             <item row="12" column="2" colspan="2">
+              <widget class="QComboBox" name="colorSchemeComboBox"/>
+             </item>
             </layout>
            </widget>
           </item>



More information about the vlc-commits mailing list