Skip to content

Commit 7da1e15

Browse files
author
Iakov Senatov
committed
fix: -4pt adjustment for fixed columns
1 parent b802124 commit 7da1e15

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

GUI/Sources/Features/Panels/FileTable/NSFileTableView.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ struct NSFileTableView: NSViewRepresentable {
4444
tableView.allowsColumnResizing = false
4545
tableView.allowsColumnSelection = false
4646
tableView.columnAutoresizingStyle = .noColumnAutoresizing
47-
tableView.gridStyleMask = [] // Grid lines disabled - header dividers are sufficient
47+
tableView.gridStyleMask = .solidVerticalGridLineMask
48+
tableView.gridColor = NSColor.separatorColor.withAlphaComponent(0.4)
4849
tableView.focusRingType = .none
4950
tableView.headerView = nil // SwiftUI header
5051

@@ -159,11 +160,11 @@ struct NSFileTableView: NSViewRepresentable {
159160
// Name takes remaining space after fixed columns and dividers
160161
let nameWidth = max(100, scrollWidth - fixedColumnsWidth - dividersWidth)
161162

162-
// Sync widths - use exact spec.width for fixed columns
163+
// Sync widths - fixed columns need -4pt adjustment to align with SwiftUI header
163164
for (i, spec) in visibleSpecs.enumerated() {
164165
guard i < tableView.tableColumns.count else { break }
165166
let col = tableView.tableColumns[i]
166-
let targetWidth = spec.id == .name ? nameWidth : spec.width
167+
let targetWidth = spec.id == .name ? nameWidth : (spec.width - 4.0)
167168

168169
if abs(col.width - targetWidth) > 0.5 {
169170
col.width = targetWidth

0 commit comments

Comments
 (0)