[vlc-commits] [Git][videolan/vlc][master] 2 commits: qt: add expand_inverted.svg

Steve Lhomme (@robUx4) gitlab at videolan.org
Tue Aug 8 14:08:39 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
9e248a57 by Mohit Marathe at 2023-08-08T13:42:39+00:00
qt: add expand_inverted.svg

- - - - -
6f7ea7b2 by Mohit Marathe at 2023-08-08T13:42:39+00:00
qt: add button to toggle controlbar visibility for interactive videos

- - - - -


6 changed files:

- modules/gui/qt/Makefile.am
- modules/gui/qt/pixmaps/VLCIcons.json
- modules/gui/qt/pixmaps/VLCIcons.ttf
- + modules/gui/qt/pixmaps/icons/expand_inverted.svg
- modules/gui/qt/player/qml/Player.qml
- modules/gui/qt/style/VLCIcons.qml


Changes:

=====================================
modules/gui/qt/Makefile.am
=====================================
@@ -663,6 +663,7 @@ libqt_plugin_la_RES = \
 	gui/qt/pixmaps/icons/eject.svg \
 	gui/qt/pixmaps/icons/ellipsis.svg \
 	gui/qt/pixmaps/icons/enqueue.svg \
+	gui/qt/pixmaps/icons/expand_inverted.svg \
 	gui/qt/pixmaps/icons/expand.svg \
 	gui/qt/pixmaps/icons/extended.svg \
 	gui/qt/pixmaps/icons/faster.svg \


=====================================
modules/gui/qt/pixmaps/VLCIcons.json
=====================================
@@ -26,6 +26,7 @@
         {"key":"eject", "path": "./icons/eject.svg"},
         {"key":"ellipsis", "path": "./icons/ellipsis.svg"},
         {"key":"enqueue", "path": "./icons/enqueue.svg"},
+        {"key":"expand_inverted", "path": "./icons/expand_inverted.svg"},
         {"key":"expand", "path": "./icons/expand.svg"},
         {"key":"extended", "path": "./icons/extended.svg"},
         {"key":"faster", "path": "./icons/faster.svg"},


=====================================
modules/gui/qt/pixmaps/VLCIcons.ttf
=====================================
Binary files a/modules/gui/qt/pixmaps/VLCIcons.ttf and b/modules/gui/qt/pixmaps/VLCIcons.ttf differ


=====================================
modules/gui/qt/pixmaps/icons/expand_inverted.svg
=====================================
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg fill="none" version="1.1" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
+ <g transform="scale(1,-1)  translate(0, -24)">
+ <path d="m12 14.283-4-4 0.5664-0.56641 3.4336 3.4336 3.4336-3.4336 0.56641 0.56641z" fill="#000" stroke-width=".8"/>
+</g>
+</svg>


=====================================
modules/gui/qt/player/qml/Player.qml
=====================================
@@ -188,7 +188,13 @@ FocusScope {
 
         onMouseMoved: {
             //short interval for mouse events
-            toolbarAutoHide.setVisible(1000)
+            if (Player.isInteractive)
+            {
+                toggleControlBarButtonAutoHide.restart()
+                videoSurface.cursorShape = Qt.ArrowCursor
+            }
+            else
+                toolbarAutoHide.setVisible(1000)
         }
     }
 
@@ -333,7 +339,10 @@ FocusScope {
             showToolbar: MainCtx.hasToolbarMenu && (MainCtx.intfMainWindow.visibility !== Window.FullScreen)
 
             Navigation.parentItem: rootPlayer
-            Navigation.downItem: playlistpopup.showPlaylist ? playlistpopup : (audioControls.visible ? audioControls : controlBarView)
+            Navigation.downItem: playlistpopup.showPlaylist ?
+                                     playlistpopup : (audioControls.visible ?
+                                                          audioControls : (Player.isInteractive ?
+                                                                               toggleControlBarButton : controlBarView))
 
             onTogglePlaylistVisibility: playlistVisibility.togglePlaylistVisibility()
 
@@ -497,7 +506,7 @@ FocusScope {
                 spacing: VLCStyle.margin_xxsmall
                 Navigation.parentItem: rootPlayer
                 Navigation.upItem: topcontrolView
-                Navigation.downItem: controlBarView
+                Navigation.downItem: Player.isInteractive ? toggleControlBarButton : controlBarView
 
                 model: ObjectModel {
                     Widgets.IconToolButton {
@@ -600,7 +609,7 @@ FocusScope {
 
                 Navigation.parentItem: rootPlayer
                 Navigation.upItem: topcontrolView
-                Navigation.downItem: controlBarView
+                Navigation.downItem: Player.isInteractive ? toggleControlBarButton : controlBarView
                 Navigation.leftAction: closePlaylist
                 Navigation.cancelAction: closePlaylist
 
@@ -650,6 +659,44 @@ FocusScope {
         }
     }
 
+    Timer {
+        // toggleControlBarButton's visibility depends on this timer
+        id: toggleControlBarButtonAutoHide
+        running: true
+        repeat: false
+        interval: 3000
+
+        onTriggered: {
+            // Cursor hides when toggleControlBarButton is not visible
+            videoSurface.forceActiveFocus()
+            videoSurface.cursorShape = Qt.BlankCursor
+        }
+    }
+
+    Widgets.ButtonExt {
+        id: toggleControlBarButton
+        visible: Player.isInteractive
+                 && rootPlayer.hasEmbededVideo
+                 && !(MainCtx.pinVideoControls && !Player.fullscreen)
+                 && (toggleControlBarButtonAutoHide.running === true
+                     || controlBarView.state !== "hidden" || toggleControlBarButton.hovered)
+        focus: true
+        anchors {
+            bottom: controlBarView.state === "hidden" ? parent.bottom : controlBarView.top
+            horizontalCenter: parent.horizontalCenter
+        }
+        iconSize: VLCStyle.icon_large
+        iconTxt: controlBarView.state === "hidden" ? VLCIcons.expand_inverted : VLCIcons.expand
+
+        Navigation.parentItem: rootPlayer
+        Navigation.upItem: playlistpopup.showPlaylist ? playlistpopup : (audioControls.visible ? audioControls : topcontrolView)
+        Navigation.downItem: controlBarView
+
+        onClicked: {
+            toolbarAutoHide.toggleForceVisible();
+        }
+    }
+
     Widgets.LoaderFade {
         id: controlBarView
 
@@ -684,7 +731,10 @@ FocusScope {
                           : ControlBar.TimeTextPosition.AboveSlider
 
             Navigation.parentItem: rootPlayer
-            Navigation.upItem: playlistpopup.showPlaylist ? playlistpopup : (audioControls.visible ? audioControls : topcontrolView)
+            Navigation.upItem: playlistpopup.showPlaylist ?
+                                   playlistpopup : (Player.isInteractive ?
+                                                        toggleControlBarButton : (audioControls.visible ?
+                                                                                      audioControls : topcontrolView))
 
             onRequestLockUnlockAutoHide: rootPlayer.lockUnlockAutoHide(lock)
 


=====================================
modules/gui/qt/style/VLCIcons.qml
=====================================
@@ -35,59 +35,60 @@ QtObject {
     readonly property string eject : "\ue013"
     readonly property string ellipsis : "\ue014"
     readonly property string enqueue : "\ue015"
-    readonly property string expand : "\ue016"
-    readonly property string extended : "\ue017"
-    readonly property string faster : "\ue018"
-    readonly property string frame_by_frame : "\ue019"
-    readonly property string fullscreen : "\ue01a"
-    readonly property string grid : "\ue01b"
-    readonly property string history : "\ue01c"
-    readonly property string home : "\ue01d"
-    readonly property string info : "\ue01e"
-    readonly property string list : "\ue01f"
-    readonly property string menu : "\ue020"
-    readonly property string next : "\ue021"
-    readonly property string pause : "\ue022"
-    readonly property string play : "\ue023"
-    readonly property string play_outline : "\ue024"
-    readonly property string play_reverse : "\ue025"
-    readonly property string playlist : "\ue026"
-    readonly property string playlist_clear : "\ue027"
-    readonly property string previous : "\ue028"
-    readonly property string profile_new : "\ue029"
-    readonly property string record : "\ue02a"
-    readonly property string remove : "\ue02b"
-    readonly property string renderer : "\ue02c"
-    readonly property string repeat_all : "\ue02d"
-    readonly property string repeat_one : "\ue02e"
-    readonly property string search : "\ue02f"
-    readonly property string shuffle_on : "\ue030"
-    readonly property string skip_back : "\ue031"
-    readonly property string skip_for : "\ue032"
-    readonly property string slower : "\ue033"
-    readonly property string snapshot : "\ue034"
-    readonly property string space : "\ue035"
-    readonly property string stop : "\ue036"
-    readonly property string stream : "\ue037"
-    readonly property string time : "\ue038"
-    readonly property string topbar_discover : "\ue039"
-    readonly property string topbar_music : "\ue03a"
-    readonly property string topbar_network : "\ue03b"
-    readonly property string topbar_sort : "\ue03c"
-    readonly property string topbar_video : "\ue03d"
-    readonly property string tv : "\ue03e"
-    readonly property string tvtelx : "\ue03f"
-    readonly property string transparency : "\ue040"
-    readonly property string circle : "\ue041"
-    readonly property string visualization : "\ue042"
-    readonly property string volume_high : "\ue043"
-    readonly property string volume_low : "\ue044"
-    readonly property string volume_medium : "\ue045"
-    readonly property string volume_muted : "\ue046"
-    readonly property string volume_zero : "\ue047"
-    readonly property string window_close : "\ue048"
-    readonly property string window_maximize : "\ue049"
-    readonly property string window_minimize : "\ue04a"
-    readonly property string window_restore : "\ue04b"
+    readonly property string expand_inverted : "\ue016"
+    readonly property string expand : "\ue017"
+    readonly property string extended : "\ue018"
+    readonly property string faster : "\ue019"
+    readonly property string frame_by_frame : "\ue01a"
+    readonly property string fullscreen : "\ue01b"
+    readonly property string grid : "\ue01c"
+    readonly property string history : "\ue01d"
+    readonly property string home : "\ue01e"
+    readonly property string info : "\ue01f"
+    readonly property string list : "\ue020"
+    readonly property string menu : "\ue021"
+    readonly property string next : "\ue022"
+    readonly property string pause : "\ue023"
+    readonly property string play : "\ue024"
+    readonly property string play_outline : "\ue025"
+    readonly property string play_reverse : "\ue026"
+    readonly property string playlist : "\ue027"
+    readonly property string playlist_clear : "\ue028"
+    readonly property string previous : "\ue029"
+    readonly property string profile_new : "\ue02a"
+    readonly property string record : "\ue02b"
+    readonly property string remove : "\ue02c"
+    readonly property string renderer : "\ue02d"
+    readonly property string repeat_all : "\ue02e"
+    readonly property string repeat_one : "\ue02f"
+    readonly property string search : "\ue030"
+    readonly property string shuffle_on : "\ue031"
+    readonly property string skip_back : "\ue032"
+    readonly property string skip_for : "\ue033"
+    readonly property string slower : "\ue034"
+    readonly property string snapshot : "\ue035"
+    readonly property string space : "\ue036"
+    readonly property string stop : "\ue037"
+    readonly property string stream : "\ue038"
+    readonly property string time : "\ue039"
+    readonly property string topbar_discover : "\ue03a"
+    readonly property string topbar_music : "\ue03b"
+    readonly property string topbar_network : "\ue03c"
+    readonly property string topbar_sort : "\ue03d"
+    readonly property string topbar_video : "\ue03e"
+    readonly property string tv : "\ue03f"
+    readonly property string tvtelx : "\ue040"
+    readonly property string transparency : "\ue041"
+    readonly property string circle : "\ue042"
+    readonly property string visualization : "\ue043"
+    readonly property string volume_high : "\ue044"
+    readonly property string volume_low : "\ue045"
+    readonly property string volume_medium : "\ue046"
+    readonly property string volume_muted : "\ue047"
+    readonly property string volume_zero : "\ue048"
+    readonly property string window_close : "\ue049"
+    readonly property string window_maximize : "\ue04a"
+    readonly property string window_minimize : "\ue04b"
+    readonly property string window_restore : "\ue04c"
 
 }



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/a03de829e136f6374fbc31d451d5134068570342...6f7ea7b2e4327d62284b40b854878016f632ca11

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/a03de829e136f6374fbc31d451d5134068570342...6f7ea7b2e4327d62284b40b854878016f632ca11
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