forked from tslocum/cview
Set DropDown options list width to at least as wide as the originating field
This commit is contained in:
parent
89fa23ab00
commit
97f450fc34
|
@ -661,6 +661,9 @@ func (d *DropDown) Draw(screen tcell.Screen) {
|
|||
if d.list.scrollBarVisibility == ScrollBarAlways || (d.list.scrollBarVisibility == ScrollBarAuto && len(d.options) > lheight) {
|
||||
lwidth++ // Add space for scroll bar
|
||||
}
|
||||
if lwidth < fieldWidth {
|
||||
lwidth = fieldWidth
|
||||
}
|
||||
d.list.SetRect(lx, ly, lwidth, lheight)
|
||||
d.list.Draw(screen)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue