Skip to content
Snippets Groups Projects
Commit e96cec48 authored by Prince Gupta's avatar Prince Gupta :speech_balloon: Committed by Pierre Lamot
Browse files

qml: position context button outside the row content in KeyNavigableTableView


Signed-off-by: default avatarPierre Lamot <pierre@videolabs.io>
parent 6c533b1c
No related branches found
No related tags found
No related merge requests found
......@@ -69,8 +69,10 @@ NavigableFocusScope {
property var selectionDelegateModel
property real rowHeight: VLCStyle.tableRow_height
readonly property int _contextButtonHorizontalSpace: VLCStyle.icon_normal + VLCStyle.margin_xxsmall * 2
readonly property real availableRowWidth: width
- ( !!section.property ? VLCStyle.table_section_width * 2 : 0 )
- _contextButtonHorizontalSpace
property alias spacing: view.spacing
property int horizontalSpacing: VLCStyle.column_margin_width
......@@ -140,6 +142,7 @@ NavigableFocusScope {
leftMargin: VLCStyle.margin_xxxsmall
rightMargin: VLCStyle.margin_xxxsmall
horizontalCenter: parent.horizontalCenter
horizontalCenterOffset: - root._contextButtonHorizontalSpace / 2
}
height: implicitHeight
topPadding: root.headerTopPadding
......@@ -264,6 +267,7 @@ NavigableFocusScope {
leftMargin: VLCStyle.margin_xxxsmall
rightMargin: VLCStyle.margin_xxxsmall
horizontalCenter: parent.horizontalCenter
horizontalCenterOffset: - root._contextButtonHorizontalSpace / 2
top: parent.top
bottom: parent.bottom
}
......@@ -299,9 +303,9 @@ NavigableFocusScope {
}
Widgets.ContextButton {
anchors.right: content.right
anchors.top: content.top
anchors.bottom: content.bottom
anchors.left: content.right
anchors.leftMargin: VLCStyle.margin_xxsmall
anchors.verticalCenter: content.verticalCenter
backgroundColor: hovered || activeFocus ?
VLCStyle.colors.getBgColor( lineView.selected, hovered,
activeFocus ) : "transparent"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment