[vlc-commits] [Git][videolan/vlc][master] 2 commits: qml: set `Navigation.parentItem` in `ViewHeader`
Steve Lhomme (@robUx4)
gitlab at videolan.org
Sat Jun 14 09:58:02 UTC 2025
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
81e907ab by Fatih Uzunoglu at 2025-06-14T09:45:35+00:00
qml: set `Navigation.parentItem` in `ViewHeader`
This is because when it is not navigable, not having
the navigation parent item set breaks navigation.
- - - - -
0693cd9a by Fatih Uzunoglu at 2025-06-14T09:45:35+00:00
qml: automatically request focus in `MainViewLoader` loaded item
So that we don't need to use `focus: true` in every main view.
We can do this because main views are expected to request focus.
Currently views in `VideoAll` are missing this, instead of setting
them there, I thought that this approach would be less fragile.
Focus reason is a different matter and is not handled here.
- - - - -
2 changed files:
- modules/gui/qt/maininterface/qml/MainViewLoader.qml
- modules/gui/qt/widgets/qml/ViewHeader.qml
Changes:
=====================================
modules/gui/qt/maininterface/qml/MainViewLoader.qml
=====================================
@@ -224,4 +224,13 @@ Loader {
sourceComponent: emptyLabel
}
+
+ // The encapsulating Loader is a focus scope. If it has active focus,
+ // is there any reason why its loaded item would not have focus?
+ Binding {
+ target: root.currentItem
+ when: root.activeFocus
+ property: "focus"
+ value: true
+ }
}
=====================================
modules/gui/qt/widgets/qml/ViewHeader.qml
=====================================
@@ -57,7 +57,7 @@ T.Pane {
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding)
-
+ Navigation.parentItem: view
Navigation.navigable: button.visible
Component.onCompleted: {
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/cf70d3d1e8a2b1e042bde6676a129a53dac505fa...0693cd9ae76030535c164f6c8b0982b45f027870
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/cf70d3d1e8a2b1e042bde6676a129a53dac505fa...0693cd9ae76030535c164f6c8b0982b45f027870
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