Browse Source

Fix List dividers allowing selection

tablepad
Trevor Slocum 1 year ago
parent
commit
2fe1085168
  1. 1
      CHANGELOG
  2. 7
      list.go

1
CHANGELOG

@ -5,6 +5,7 @@ v1.5.1 (WIP)
- Add TableCell.SetBytes, TableCell.GetBytes and TableCell.GetText
- Fix List.Transform not calling handler set via SetChangedFunc
- Fix WordWrap bounds out of range
- Fix List dividers allowing selection
- Allow modification of scroll bar render text
- Allow scrolling List horizontally
- Optimize TextView (writing is 90% faster, drawing is 50% faster)

7
list.go

@ -772,7 +772,7 @@ func (l *List) transform(tr Transformation) {
}
item := l.items[l.currentItem]
if item.enabled {
if item.enabled && (item.shortcut > 0 || len(item.mainText) > 0 || len(item.secondaryText) > 0) {
break
}
@ -846,10 +846,11 @@ func (l *List) updateOffset() {
addWidth = 1
}
if l.columnOffset > (maxWidth-l.innerWidth)+addWidth {
l.columnOffset = (maxWidth - l.innerWidth) + addWidth
}
if l.columnOffset < 0 {
l.columnOffset = 0
} else if l.columnOffset > (maxWidth-l.innerWidth)+addWidth {
l.columnOffset = (maxWidth - l.innerWidth) + addWidth
}
}

Loading…
Cancel
Save