[vlc-commits] [Git][videolan/vlc][master] qml: use grouped property for fading edge in KeyNavigableListView instead of aliasing
Steve Lhomme (@robUx4)
gitlab at videolan.org
Fri Nov 17 14:47:59 UTC 2023
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
ab853bd0 by Fatih Uzunoglu at 2023-11-17T14:29:23+00:00
qml: use grouped property for fading edge in KeyNavigableListView instead of aliasing
- - - - -
6 changed files:
- modules/gui/qt/maininterface/qml/MainTableView.qml
- modules/gui/qt/medialibrary/qml/MusicAlbumsGridExpandDelegate.qml
- modules/gui/qt/medialibrary/qml/MusicArtistsAlbums.qml
- modules/gui/qt/playlist/qml/PlaylistListView.qml
- modules/gui/qt/widgets/qml/KeyNavigableListView.qml
- modules/gui/qt/widgets/qml/KeyNavigableTableView.qml
Changes:
=====================================
modules/gui/qt/maininterface/qml/MainTableView.qml
=====================================
@@ -26,5 +26,5 @@ Widgets.KeyNavigableTableView {
displayMarginEnd: g_mainDisplay.displayMargin
- enableEndFade: (g_mainDisplay.hasMiniPlayer === false)
+ fadingEdge.enableEndFade: (g_mainDisplay.hasMiniPlayer === false)
}
=====================================
modules/gui/qt/medialibrary/qml/MusicAlbumsGridExpandDelegate.qml
=====================================
@@ -358,7 +358,7 @@ FocusScope {
headerColor: theme.bg.secondary
- backgroundColor: headerColor
+ fadingEdge.backgroundColor: headerColor
readonly property int _nbCols: VLCStyle.gridColumnsForWidth(tracks.availableRowWidth)
=====================================
modules/gui/qt/medialibrary/qml/MusicArtistsAlbums.qml
=====================================
@@ -155,8 +155,8 @@ FocusScope {
visible: !VLCStyle.isScreenSmall && (artistModel.count > 0)
focus: !VLCStyle.isScreenSmall && (artistModel.count > 0)
- backgroundColor: artistListBackground.usingAcrylic ? "transparent"
- : artistListBackground.alternativeColor
+ fadingEdge.backgroundColor: artistListBackground.usingAcrylic ? "transparent"
+ : artistListBackground.alternativeColor
// To get blur effect while scrolling in mainview
displayMarginEnd: g_mainDisplay.displayMargin
=====================================
modules/gui/qt/playlist/qml/PlaylistListView.qml
=====================================
@@ -252,18 +252,18 @@ T.Pane {
model: root.model
- BindingCompat on enableBeginningFade {
+ BindingCompat on fadingEdge.enableBeginningFade {
when: (autoScroller.scrollingDirection === Util.ViewDragAutoScrollHandler.Direction.Backward)
value: false
}
- BindingCompat on enableEndFade {
+ BindingCompat on fadingEdge.enableEndFade {
when: (autoScroller.scrollingDirection === Util.ViewDragAutoScrollHandler.Direction.Forward)
value: false
}
- backgroundColor: root.background.usingAcrylic ? "transparent"
- : listView.colorContext.bg.primary
+ fadingEdge.backgroundColor: root.background.usingAcrylic ? "transparent"
+ : listView.colorContext.bg.primary
contentWidth: width
=====================================
modules/gui/qt/widgets/qml/KeyNavigableListView.qml
=====================================
@@ -46,10 +46,10 @@ ListView {
// Aliases
- property alias backgroundColor: fadingEdge.backgroundColor
- property alias enableEndFade: fadingEdge.enableEndFade
- property alias enableBeginningFade: fadingEdge.enableBeginningFade
- property alias fadeSize: fadingEdge.fadeSize
+ // TODO: Qt 7 try to assign the item inline if it is possible
+ // to set it to null, so that the item is not created
+ // if the effect is not wanted.
+ property alias fadingEdge: fadingEdge
//forward view properties
@@ -71,8 +71,6 @@ ListView {
activeFocusOnTab: true
- backgroundColor: theme.bg.primary
-
//key navigation is reimplemented for item selection
keyNavigationEnabled: false
keyNavigationWraps: false
@@ -269,6 +267,8 @@ ListView {
anchors.fill: parent
listView: root
+
+ backgroundColor: theme.bg.primary
}
Component {
=====================================
modules/gui/qt/widgets/qml/KeyNavigableTableView.qml
=====================================
@@ -121,10 +121,7 @@ FocusScope {
property alias footerItem: view.footerItem
property alias footer: view.footer
- property alias backgroundColor: view.backgroundColor
- property alias fadeSize: view.fadeSize
- property alias enableBeginningFade: view.enableBeginningFade
- property alias enableEndFade: view.enableEndFade
+ property alias fadingEdge: view.fadingEdge
property alias add: view.add
property alias displaced: view.displaced
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/ab853bd0a3b6197ed0d2201e6c558d2e25bc02ae
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/ab853bd0a3b6197ed0d2201e6c558d2e25bc02ae
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