Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ Item {
leftMargin: showVerticalHeader ? 8 : index === 0 ? 16 : 8
rightMargin: showVerticalHeader ? 8 : index === tableView.model.columnCount() - 1 ? 16 : 8

// The container border already delimits the right edge; a trailing
// separator on the last column would double up with it — but only
// once the columns fill the viewport width.
showTrailingSeparator: index !== tableView.model.columnCount() - 1 || tableView.contentWidth < tableView.width

title: display.title
preferredWidth: display.preferredWidth
availableFormats: display.availableFormats
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -567,10 +567,18 @@ TableViewDelegate {
SeparatorLine {
anchors.bottom: parent.bottom
orientation: Qt.Horizontal
// Drop the underline on the last row only when the rows fill the
// viewport, so its bottom edge coincides with the container border.
// With empty space below, the last row still needs its separator.
visible: root.row !== tableView.rows - 1 || tableView.contentHeight < tableView.height
}
SeparatorLine {
anchors.right: parent.right
orientation: Qt.Vertical
// Likewise, drop the trailing edge on the last column only when the
// columns fill the viewport width (otherwise it delimits the column
// from the empty space to its right).
visible: root.column !== tableView.model.columnCount() - 1 || tableView.contentWidth < tableView.width
}

Component.onCompleted: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ Item {
property string title: ""
property int preferredWidth: 0

// Hidden for the last column, whose right edge coincides with the
// table's container border (avoids a doubled border line).
property bool showTrailingSeparator: true

property var availableFormats: null

property real leftMargin: 0
Expand Down Expand Up @@ -137,6 +141,7 @@ Item {
SeparatorLine {
anchors.right: parent.right
orientation: Qt.Vertical
visible: root.showTrailingSeparator
}

NavigationFocusBorder {
Expand Down