[vlc-commits] [Git][videolan/vlc][master] 4 commits: qml: add property stating when the FSM is running

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Mon Dec 4 13:29:26 UTC 2023



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
3ddc5209 by Pierre Lamot at 2023-12-04T12:38:57+00:00
qml: add property stating when the FSM is running

when the FSM is instantiated, the active "states" are undefined until the
Component.Complete is run. as the QML initialisation order is undefined this may
cause transition issues at startup

- - - - -
8aa538ff by Pierre Lamot at 2023-12-04T12:38:57+00:00
qml: don't transition at initialisation in DrawerExt

- - - - -
2caf3e51 by Pierre Lamot at 2023-12-04T12:38:57+00:00
qml: only transition playqueue visibility when the FSM is running

- - - - -
cd922bee by Pierre Lamot at 2023-12-04T12:38:57+00:00
configure: fix inverted outcome of QtQuickTest check

- - - - -


4 changed files:

- configure.ac
- modules/gui/qt/player/qml/Player.qml
- modules/gui/qt/util/qml/FSM.qml
- modules/gui/qt/widgets/qml/DrawerExt.qml


Changes:

=====================================
configure.ac
=====================================
@@ -3991,9 +3991,9 @@ AS_IF([test "${enable_qt}" != "no"], [
       ])
 
       PKG_CHECK_MODULES([QT5_QUICK_TEST], [Qt5QuickTest], [
-          AS_IF([test "$PYTHON3" != "no" && ${PYTHON3} ${srcdir}/buildsystem/check_qml_module.py --qmake "${QMAKE}" --modules QtTest=1.12], [], [
+          AS_IF([test "$PYTHON3" != "no" && ${PYTHON3} ${srcdir}/buildsystem/check_qml_module.py --qmake "${QMAKE}" --modules QtTest=1.12], [
               have_qt5_quick_test="yes"
-          ])
+          ], [])
       ],[
       ])
 


=====================================
modules/gui/qt/player/qml/Player.qml
=====================================
@@ -604,7 +604,12 @@ FocusScope {
 
         focus: false
         edge: Widgets.DrawerExt.Edges.Right
-        state: playlistVisibility.isPlaylistVisible ? "visible" : "hidden"
+
+        Binding on state {
+            when: playlistVisibility.started
+            value: playlistVisibility.isPlaylistVisible ? "visible" : "hidden"
+        }
+
         component: Rectangle {
             width: Helpers.clamp(rootPlayer.width / resizeHandle.widthFactor
                                  , playlistView.minimumWidth


=====================================
modules/gui/qt/util/qml/FSM.qml
=====================================
@@ -77,6 +77,8 @@ FSMState {
 
     property bool running: true
 
+    property bool started: false
+
     /**
      * @param {FSMState} state state handling the event
      * @param {string} event name of the event
@@ -318,5 +320,6 @@ FSMState {
         }
 
         _changeState(fsm)
+        fsm.started = true
     }
 }


=====================================
modules/gui/qt/widgets/qml/DrawerExt.qml
=====================================
@@ -53,7 +53,7 @@ FocusScope {
         focus: true
     }
 
-    state: "hidden"
+    state: ""
     states: [
         State {
             name: "visible"
@@ -101,6 +101,7 @@ FocusScope {
 
     transitions: [
         Transition {
+            from: "visible"
             to: "hidden"
             SequentialAnimation {
                 NumberAnimation {
@@ -118,6 +119,7 @@ FocusScope {
             }
         },
         Transition {
+            from: "hidden"
             to: "visible"
             SequentialAnimation {
                 PropertyAction {



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/15c8ab6ed010b8d551f1149574e44d1e95d12d9c...cd922bee013ea1052ef74d5d70cc079e9e7505fa

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/15c8ab6ed010b8d551f1149574e44d1e95d12d9c...cd922bee013ea1052ef74d5d70cc079e9e7505fa
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