[vlc-devel] [PATCH 2/4] qml: show top section of current view in header of KeyNavigableTableView

Prince Gupta guptaprince8832 at gmail.com
Mon Aug 24 17:12:41 CEST 2020


---
 .../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 bfe3342ea6..7494b4a3fd 100644
--- a/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml
+++ b/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml
@@ -105,12 +105,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
 
-- 
2.25.1



More information about the vlc-devel mailing list