From c5d00daff2dbf4307508d85c2a0a83a3c4922794 Mon Sep 17 00:00:00 2001 From: Paul MARTIN Date: Mon, 15 Jun 2026 14:53:28 +0200 Subject: [PATCH] [uicomponents] omit table separators that double the container border The last column's right separator and the last row's bottom separator sat on top of the table's 1px container border, giving those edges a doubled, thicker look. Hide them when the content fills that dimension (so the edge coincides with the border); keep them otherwise, so a table with empty space below/right still delimits its last row/column. --- .../qml/Muse/UiComponents/StyledTableView.qml | 5 +++++ .../Muse/UiComponents/internal/StyledTableViewCell.qml | 8 ++++++++ .../Muse/UiComponents/internal/StyledTableViewColumn.qml | 5 +++++ 3 files changed, 18 insertions(+) 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 {