[vlc-devel] [PATCH 06/14] qml: set differentiated highlight zone in KeyNavigableListView when the layout is Horizontal
Alexandre Janniaux
ajanni at videolabs.io
Thu Feb 6 15:53:36 CET 2020
Hi,
On Thu, Feb 06, 2020 at 01:56:43PM +0100, Pierre Lamot wrote:
> ---
> modules/gui/qt/widgets/qml/KeyNavigableListView.qml | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/modules/gui/qt/widgets/qml/KeyNavigableListView.qml b/modules/gui/qt/widgets/qml/KeyNavigableListView.qml
> index fb08bec6dc..5fa635a5ca 100644
> --- a/modules/gui/qt/widgets/qml/KeyNavigableListView.qml
> +++ b/modules/gui/qt/widgets/qml/KeyNavigableListView.qml
> @@ -107,9 +107,12 @@ NavigableFocusScope {
> contentWidth: contentItem.childrenRect.width
> contentHeight: contentItem.childrenRect.height
>
> -
> - preferredHighlightBegin : highlightMargin + (headerItem ? headerItem.height : 0)
> - preferredHighlightEnd : height - highlightMargin
> + preferredHighlightBegin : (view.orientation === ListView.Vertical)
> + ? highlightMargin + (headerItem ? headerItem.height : 0)
> + : highlightMargin
> + preferredHighlightEnd : (view.orientation === ListView.Vertical)
> + ? height - highlightMargin
> + : width- highlightMargin
Nit. Maybe add a space between width and - to ease reading.
> highlightRangeMode: ListView.ApplyRange
>
> focus: true
> --
> 2.17.1
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list