[vlc-commits] qml: show top section of current view in header of KeyNavigableTableView

Prince Gupta git at videolan.org
Thu Aug 27 12:44:22 CEST 2020


vlc | branch: master | Prince Gupta <guptaprince8832 at gmail.com> | Fri Aug 21 15:29:42 2020 +0530| [c08f5767e6e04f1bee83f9cc9c98e52d8afe3b44] | committer: Pierre Lamot

qml: show top section of current view in header of KeyNavigableTableView

Signed-off-by: Pierre Lamot <pierre at videolabs.io>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c08f5767e6e04f1bee83f9cc9c98e52d8afe3b44
---

 modules/gui/qt/widgets/qml/KeyNavigableTableView.qml | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml b/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml
index 8564a4779b..2b8c16efcf 100644
--- a/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml
+++ b/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml
@@ -98,12 +98,24 @@ NavigableFocusScope {
             property alias loadedHeader: headerLoader.item
 
             width: parent.width
-            height: childrenRect.height
+            height: col.height
             color: headerColor
             visible: view.modelCount > 0
             z: 3
 
+            Widgets.ListLabel {
+                x: contentX - VLCStyle.table_section_width
+                y: row.y
+                height: row.height
+                leftPadding: VLCStyle.table_section_text_margin
+                text: view.currentSection
+                color: VLCStyle.colors.accent
+                visible: text !== "" && view.contentY > (VLCStyle.fontHeight_normal + VLCStyle.margin_xxsmall - col.height)
+            }
+
             Column {
+                id: col
+
                 width: parent.width
                 height: childrenRect.height
 



More information about the vlc-commits mailing list