[vlc-devel] [PATCH] qml: widgets: fix scrollbar can be hidden by the miniplayer

Pierre Lamot pierre at videolabs.io
Wed Jan 27 17:38:38 UTC 2021


LGTM

On 2021-01-27 12:16, Aleksey Kuznetsov wrote:
> ---
>  modules/gui/qt/maininterface/qml/MainGridView.qml      | 2 ++
>  modules/gui/qt/maininterface/qml/MainTableView.qml     | 2 ++
>  modules/gui/qt/medialibrary/qml/MusicTracksDisplay.qml | 1 +
>  modules/gui/qt/widgets/qml/ExpandGridView.qml          | 5 ++++-
>  modules/gui/qt/widgets/qml/KeyNavigableListView.qml    | 1 +
>  modules/gui/qt/widgets/qml/KeyNavigableTableView.qml   | 2 ++
>  6 files changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/modules/gui/qt/maininterface/qml/MainGridView.qml
> b/modules/gui/qt/maininterface/qml/MainGridView.qml
> index e8bb76c32f..e119c2b364 100644
> --- a/modules/gui/qt/maininterface/qml/MainGridView.qml
> +++ b/modules/gui/qt/maininterface/qml/MainGridView.qml
> @@ -22,6 +22,8 @@ import "qrc:///widgets/" as Widgets
>  Widgets.ExpandGridView {
>      id: root
> 
> +    gridScrollBar.bottomPadding: footerItem.height
> +
>      footerDelegate: MiniPlayerBottomMargin {
>          width: root.width
>      }
> diff --git a/modules/gui/qt/maininterface/qml/MainTableView.qml
> b/modules/gui/qt/maininterface/qml/MainTableView.qml
> index 0828a16e1f..d16488ebfd 100644
> --- a/modules/gui/qt/maininterface/qml/MainTableView.qml
> +++ b/modules/gui/qt/maininterface/qml/MainTableView.qml
> @@ -23,6 +23,8 @@ import "qrc:///widgets/" as Widgets
>  Widgets.KeyNavigableTableView {
>      id: root
> 
> +    listScrollBar.bottomPadding: footerItem.height
> +
>      footer: MiniPlayerBottomMargin {
>          width: root.width
>      }
> diff --git a/modules/gui/qt/medialibrary/qml/MusicTracksDisplay.qml
> b/modules/gui/qt/medialibrary/qml/MusicTracksDisplay.qml
> index 42be9a9d6e..a98621ac73 100644
> --- a/modules/gui/qt/medialibrary/qml/MusicTracksDisplay.qml
> +++ b/modules/gui/qt/medialibrary/qml/MusicTracksDisplay.qml
> @@ -65,6 +65,7 @@ Widgets.NavigableFocusScope {
>              else
>                  tracklistdisplay_id.currentIndex = 0;
>          }
> +        listScrollBar.bottomPadding: footerItem.height
>          footer: MainInterface.MiniPlayerBottomMargin {
>          }
>      }
> diff --git a/modules/gui/qt/widgets/qml/ExpandGridView.qml
> b/modules/gui/qt/widgets/qml/ExpandGridView.qml
> index f3cf3228ed..7e9aebb143 100644
> --- a/modules/gui/qt/widgets/qml/ExpandGridView.qml
> +++ b/modules/gui/qt/widgets/qml/ExpandGridView.qml
> @@ -48,6 +48,7 @@ NavigableFocusScope {
>      property alias contentHeight: flickable.contentHeight
>      property alias contentWidth: flickable.contentWidth
>      property alias contentX: flickable.contentX
> +    property alias gridScrollBar: flickableScrollBar
>      property bool isAnimating: animateRetractItem.running ||
> animateExpandItem.running
> 
>      property int _count: 0
> @@ -336,7 +337,9 @@ NavigableFocusScope {
>          clip: true
> 
>          flickableDirection: Flickable.VerticalFlick
> -        ScrollBar.vertical: ScrollBar { }
> +        ScrollBar.vertical: ScrollBar {
> +            id: flickableScrollBar
> +        }
> 
>          Loader {
>              id: headerItemLoader
> diff --git a/modules/gui/qt/widgets/qml/KeyNavigableListView.qml
> b/modules/gui/qt/widgets/qml/KeyNavigableListView.qml
> index 80d92528d2..950819628e 100644
> --- a/modules/gui/qt/widgets/qml/KeyNavigableListView.qml
> +++ b/modules/gui/qt/widgets/qml/KeyNavigableListView.qml
> @@ -74,6 +74,7 @@ NavigableFocusScope {
>      property alias fadeRectBottomHovered: fadeRectBottom.isHovered
>      property alias fadeRectTopHovered: fadeRectTop.isHovered
> 
> +    property alias listScrollBar: scroll_id
>      property int scrollBarWidth: scroll_id.visible ? scroll_id.width : 
> 0
> 
>      property bool keyNavigationWraps : false
> diff --git a/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml
> b/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml
> index f475465185..b004a6f4ae 100644
> --- a/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml
> +++ b/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml
> @@ -85,6 +85,8 @@ NavigableFocusScope {
>      property alias displaced: view.displaced
>      property Item dragItem
> 
> +    property alias listScrollBar: view.listScrollBar
> +
>      Accessible.role: Accessible.Table
> 
>      function positionViewAtIndex(index, mode) {


More information about the vlc-devel mailing list