[vlc-commits] [Git][videolan/vlc][master] qt: Add Support for --no-qt-bgcone with CLI

Steve Lhomme (@robUx4) gitlab at videolan.org
Mon Sep 9 13:42:28 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
26ca0a4f by Darshan Jain at 2024-09-09T12:54:49+00:00
qt: Add Support for --no-qt-bgcone with CLI

The feature allows to hide the artwork and cone placeholder in the
Player View.
This can be activated from extended settings or from Command Line
using --no-qt-bgcone

- - - - -


3 changed files:

- modules/gui/qt/maininterface/mainctx.cpp
- modules/gui/qt/maininterface/mainctx.hpp
- modules/gui/qt/player/qml/Player.qml


Changes:

=====================================
modules/gui/qt/maininterface/mainctx.cpp
=====================================
@@ -359,6 +359,8 @@ void MainCtx::loadPrefs(const bool callSignals)
     /* Are we in the enhanced always-video mode or not ? */
     loadFromVLCOption(b_minimalView, "qt-minimal-view", nullptr);
 
+    loadFromVLCOption(m_bgCone, "qt-bgcone", &MainCtx::bgConeToggled);
+
     /* Should the UI stays on top of other windows */
     loadFromVLCOption(b_interfaceOnTop, "video-on-top", [this](MainCtx *)
     {
@@ -616,6 +618,16 @@ void MainCtx::setPlayerPlaylistWidthFactor( double factor )
     }
 }
 
+void MainCtx::setbgCone(bool bgCone)
+{
+    if (m_bgCone == bgCone)
+        return;
+
+    m_bgCone = bgCone;
+
+    emit bgConeToggled();
+}
+
 void MainCtx::setShowRemainingTime( bool show )
 {
     m_showRemainingTime = show;


=====================================
modules/gui/qt/maininterface/mainctx.hpp
=====================================
@@ -145,6 +145,8 @@ class MainCtx : public QObject
     // NOTE: This is useful when we want to prioritize player hotkeys over QML keyboard navigation.
     Q_PROPERTY(bool preferHotkeys READ preferHotkeys WRITE setPreferHotkeys NOTIFY preferHotkeysChanged FINAL)
 
+    //Property for Activating bgCone in player view
+    Q_PROPERTY(bool bgCone READ isbgCone WRITE setbgCone NOTIFY bgConeToggled FINAL) 
     Q_PROPERTY(bool windowSuportExtendedFrame READ windowSuportExtendedFrame NOTIFY windowSuportExtendedFrameChanged)
     Q_PROPERTY(unsigned windowExtendedMargin READ windowExtendedMargin WRITE setWindowExtendedMargin NOTIFY windowExtendedMarginChanged)
     Q_PROPERTY(SearchCtx* search MEMBER m_search CONSTANT FINAL)
@@ -240,7 +242,8 @@ public:
 
     inline OsType getOSName() const {return m_osName;}
     inline int getOSVersion() const {return m_osVersion;}
-
+    
+    inline bool isbgCone() const {return m_bgCone; }
     inline bool windowSuportExtendedFrame() const { return m_windowSuportExtendedFrame; }
     inline unsigned windowExtendedMargin() const { return m_windowExtendedMargin; }
     void setWindowSuportExtendedFrame(bool support);
@@ -377,6 +380,7 @@ protected:
     OsType m_osName;
     int m_osVersion;
 
+    bool m_bgCone = true;
     bool m_windowSuportExtendedFrame = false;
     unsigned m_windowExtendedMargin = 0;
 
@@ -409,7 +413,8 @@ public slots:
 
     void setPinVideoControls( bool );
     void setPinOpacity( float );
-
+    
+    void setbgCone(bool);
     void updateIntfScaleFactor();
     void onWindowVisibilityChanged(QWindow::Visibility);
     void setHasAcrylicSurface(bool);
@@ -480,6 +485,7 @@ signals:
 
     void navBoxToggled();
 
+    void bgConeToggled();
     void windowSuportExtendedFrameChanged();
     void windowExtendedMarginChanged(unsigned margin);
 


=====================================
modules/gui/qt/player/qml/Player.qml
=====================================
@@ -400,6 +400,7 @@ FocusScope {
                 Layout.alignment: Qt.AlignHCenter
 
                 readonly property real sizeConstant: 2.7182
+                visible: MainCtx.bgCone
 
                 Image {
                     id: cover



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/26ca0a4f83fad107cb0ed4cf00d6e4de4b9c634b

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/26ca0a4f83fad107cb0ed4cf00d6e4de4b9c634b
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list