Skip to content

Commit

Permalink
add HideSeparators for table
Browse files Browse the repository at this point in the history
  • Loading branch information
dweymouth committed May 27, 2024
1 parent 04f3e23 commit 3843e89
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions widget/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ type Table struct {
// Since: 2.4
StickyColumnCount int

// HideSeparators hides the separator lines between the table cells
//
// Since: 2.5
HideSeparators bool

currentFocus TableCellID
focused bool
selectedCell, hoveredCell *TableCellID
Expand Down Expand Up @@ -1043,6 +1048,11 @@ func (t *tableRenderer) Layout(s fyne.Size) {
t.t.corner.Resize(fyne.NewSize(off.X, off.Y))

t.t.dividerLayer.Resize(s)
if t.t.HideSeparators {
t.t.dividerLayer.Hide()
} else {
t.t.dividerLayer.Show()
}
}

func (t *tableRenderer) MinSize() fyne.Size {
Expand Down

0 comments on commit 3843e89

Please sign in to comment.