[vlc-commits] [Git][videolan/vlc][master] qml: add fallback widget for player toolbar

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Fri Jul 16 09:48:29 UTC 2021



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


Commits:
4413d1e1 by Fatih Uzunoglu at 2021-07-16T09:37:04+00:00
qml: add fallback widget for player toolbar

- - - - -


1 changed file:

- modules/gui/qt/player/qml/ControlButtons.qml


Changes:

=====================================
modules/gui/qt/player/qml/ControlButtons.qml
=====================================
@@ -104,9 +104,35 @@ Item{
         case ControlListModel.PLAYER_SWITCH_BUTTON: return playerSwitchBtnDelegate
         case ControlListModel.ARTWORK_INFO: return artworkInfoDelegate
         case ControlListModel.PLAYBACK_SPEED_BUTTON: return playbackSpeedButtonDelegate
+        default:
+            console.log("button delegate id " + inpID +  " doesn't exists")
+            return fallbackDelegate
+        }
+    }
+
+    Component {
+        id: fallbackDelegate
+
+        Widgets.AnimatedBackground {
+            implicitWidth: fbLabel.width + VLCStyle.focus_border * 2
+            implicitHeight: fbLabel.height + VLCStyle.focus_border * 2
+
+            activeBorderColor: colors.bgFocus
+
+            property bool paintOnly: false
+            property VLCColors colors: VLCStyle.colors
+
+            Widgets.MenuLabel {
+                id: fbLabel
+
+                anchors.centerIn: parent
+
+                text: i18n.qtr("WIDGET\nNOT\nFOUND")
+                horizontalAlignment: Text.AlignHCenter
+
+                color: colors.text
+            }
         }
-        console.log("button delegate id " + inpID +  " doesn't exists")
-        return spacerDelegate
     }
 
     Component{



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/4413d1e1ef8f575b78ae820e84b1e3eae3e2c57f

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




More information about the vlc-commits mailing list