diff --git a/framework/uicomponents/qml/Muse/UiComponents/StyledTableView.qml b/framework/uicomponents/qml/Muse/UiComponents/StyledTableView.qml index 019b7410f3..9229f9c33f 100644 --- a/framework/uicomponents/qml/Muse/UiComponents/StyledTableView.qml +++ b/framework/uicomponents/qml/Muse/UiComponents/StyledTableView.qml @@ -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 diff --git a/framework/uicomponents/qml/Muse/UiComponents/internal/StyledTableViewCell.qml b/framework/uicomponents/qml/Muse/UiComponents/internal/StyledTableViewCell.qml index 30e38dbcd6..a2c7ba7a39 100644 --- a/framework/uicomponents/qml/Muse/UiComponents/internal/StyledTableViewCell.qml +++ b/framework/uicomponents/qml/Muse/UiComponents/internal/StyledTableViewCell.qml @@ -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: { diff --git a/framework/uicomponents/qml/Muse/UiComponents/internal/StyledTableViewColumn.qml b/framework/uicomponents/qml/Muse/UiComponents/internal/StyledTableViewColumn.qml index ad9b37c128..5db0a8e70b 100644 --- a/framework/uicomponents/qml/Muse/UiComponents/internal/StyledTableViewColumn.qml +++ b/framework/uicomponents/qml/Muse/UiComponents/internal/StyledTableViewColumn.qml @@ -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 @@ -137,6 +141,7 @@ Item { SeparatorLine { anchors.right: parent.right orientation: Qt.Vertical + visible: root.showTrailingSeparator } NavigationFocusBorder {