vlc | branch: master | Prince Gupta <[email protected]> | Wed Jun 3 16:54:50 2020 +0530| [58c0d38cf3a3304a220d5d82f2e9c1ae21d18ba2] | committer: Pierre Lamot
qml: centre align section of KeyNavigableTableView > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=58c0d38cf3a3304a220d5d82f2e9c1ae21d18ba2 --- modules/gui/qt/widgets/qml/KeyNavigableTableView.qml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml b/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml index 718a02b576..75de47e522 100644 --- a/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml +++ b/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml @@ -87,6 +87,10 @@ NavigableFocusScope { headerPositioning: ListView.OverlayHeader header: Rectangle { + + readonly property alias contentX: row.x + readonly property alias contentWidth: row.width + width: parent.width height: childrenRect.height color: headerColor @@ -98,6 +102,8 @@ NavigableFocusScope { height: childrenRect.height Row { + id: row + anchors { leftMargin: VLCStyle.margin_xxxsmall rightMargin: VLCStyle.margin_xxxsmall @@ -149,6 +155,16 @@ NavigableFocusScope { } } + section.delegate: Text { + x: headerItem.contentX - VLCStyle.table_section_width + topPadding: VLCStyle.margin_xsmall + bottomPadding: VLCStyle.margin_xxsmall + leftPadding: VLCStyle.table_section_text_margin + text: section + font.pixelSize: VLCStyle.fontHeight_normal + color: VLCStyle.colors.accent + } + delegate:Rectangle { id: lineView _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
