[vlc-commits] [Git][videolan/vlc][master] 6 commits: qml: fix missing import in `Fallback.qml`
Felix Paul Kühne (@fkuehne)
gitlab at videolan.org
Wed Oct 28 07:58:27 UTC 2026
Felix Paul Kühne pushed to branch master at VideoLAN / VLC
Commits:
c11970cc by Fatih Uzunoglu at 2026-10-28T08:36:37+01:00
qml: fix missing import in `Fallback.qml`
Amends fc710473.
- - - - -
6d9e6b03 by Fatih Uzunoglu at 2026-10-28T08:36:37+01:00
qml: fix focus state not forwarded to color context in `Fallback.qml`
This breaks focus indication.
- - - - -
0edfc125 by Fatih Uzunoglu at 2026-10-28T08:36:37+01:00
qml: do not elide text in `Fallback.qml`
Elision is not applicable here, since this
control is not an expanding control.
- - - - -
8576f55e by Fatih Uzunoglu at 2026-10-28T08:36:37+01:00
qml: add broken widget indication in `Fallback.qml`
Currently this control can only indicate widget is
not found.
- - - - -
1759fddf by Fatih Uzunoglu at 2026-10-28T08:36:37+01:00
qml: use broken widget indicator if loading fails in `ControlRepeater`
- - - - -
0c23b0d4 by Fatih Uzunoglu at 2026-10-28T08:36:37+01:00
qml: use broken widget indicator if loading fails in `EditorDNDDelegate`
- - - - -
3 changed files:
- modules/gui/qt/dialogs/toolbar/qml/EditorDNDDelegate.qml
- modules/gui/qt/player/qml/ControlRepeater.qml
- modules/gui/qt/player/qml/controlbarcontrols/Fallback.qml
Changes:
=====================================
modules/gui/qt/dialogs/toolbar/qml/EditorDNDDelegate.qml
=====================================
@@ -25,6 +25,7 @@ import QtQml.Models
import VLC.Player
import VLC.Widgets as Widgets
import VLC.Style
+import VLC.PlayerControls as PC
T.Control {
id: control
@@ -159,10 +160,24 @@ T.Control {
anchors.fill: (parent === control.contentItem) ? parent : undefined
- source: PlayerControlbarControls.control(model.id).source
+ source: targetSource
+
+ readonly property url targetSource: PlayerControlbarControls.control(model.id).source
+
+ onTargetSourceChanged: {
+ source = targetSource
+ }
Drag.source: control
+ onStatusChanged: {
+ if (status === Loader.Error) {
+ const fallback = "qrc:///qt/qml/VLC/PlayerControls/Fallback.qml"
+ console.assert(loader.source !== fallback)
+ loader.setSource(fallback, { type: PC.Fallback.Broken })
+ }
+ }
+
onLoaded: {
item.paintOnly = true
item.enabled = false
=====================================
modules/gui/qt/player/qml/ControlRepeater.qml
=====================================
@@ -19,6 +19,7 @@ import QtQuick
import QtQuick.Layouts
import VLC.MainInterface
+import VLC.PlayerControls as PC
Repeater {
id: repeater
@@ -50,7 +51,13 @@ Repeater {
// Settings
- source: PlayerControlbarControls.control(model.id).source
+ source: targetSource
+
+ readonly property url targetSource: PlayerControlbarControls.control(model.id).source
+
+ onTargetSourceChanged: {
+ source = targetSource
+ }
focus: (index === 0)
@@ -64,6 +71,14 @@ Repeater {
Layout.alignment: repeater.alignment
+ onStatusChanged: {
+ if (status === Loader.Error) {
+ const fallback = "qrc:///qt/qml/VLC/PlayerControls/Fallback.qml"
+ console.assert(loader.source !== fallback)
+ loader.setSource(fallback, { type: PC.Fallback.Broken })
+ }
+ }
+
Binding on visible {
delayed: true // this is important
when: condition
=====================================
modules/gui/qt/player/qml/controlbarcontrols/Fallback.qml
=====================================
@@ -18,23 +18,39 @@
import QtQuick
import QtQuick.Layouts
+import QtQuick.Templates as T
import VLC.MainInterface
import VLC.Widgets as Widgets
import VLC.Util
import VLC.Style
-Control {
+T.Control {
+ id: root
+
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+ implicitContentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+ implicitContentHeight + topPadding + bottomPadding)
+
padding: VLCStyle.focus_border
Keys.priority: Keys.AfterItem
Keys.onPressed: (event) => Navigation.defaultKeyAction(event)
+ property int type: Fallback.NotFound
+
property bool paintOnly: false
+ enum Type {
+ NotFound,
+ Broken
+ }
+
readonly property ColorContext colorContext: ColorContext {
id: theme
colorSet: ColorContext.View
+ focused: root.visualFocus
}
background: Widgets.AnimatedBackground {
@@ -43,7 +59,18 @@ Control {
}
contentItem: Widgets.MenuLabel {
- text: qsTr("WIDGET\nNOT\nFOUND")
+ text: {
+ switch (root.type) {
+ case Fallback.NotFound:
+ return qsTr("WIDGET\nNOT\nFOUND")
+ case Fallback.Broken:
+ return qsTr("BROKEN\nWIDGET")
+ default:
+ return qsTr("N/A")
+ }
+ }
+
+ elide: Text.ElideNone
horizontalAlignment: Text.AlignHCenter
color: theme.fg.primary
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/6836ae77aefe852ed5b35bf4012b2a3afea4f807...0c23b0d4b1e4b8a492abcec095ca5a946db9ca73
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/6836ae77aefe852ed5b35bf4012b2a3afea4f807...0c23b0d4b1e4b8a492abcec095ca5a946db9ca73
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the vlc-commits
mailing list