|
|
@ -380,9 +380,6 @@ func (d *DropDown) Draw(screen tcell.Screen) {
|
|
|
|
fieldWidth = rightLimit - x
|
|
|
|
fieldWidth = rightLimit - x
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fieldStyle := tcell.StyleDefault.Background(d.fieldBackgroundColor)
|
|
|
|
fieldStyle := tcell.StyleDefault.Background(d.fieldBackgroundColor)
|
|
|
|
if d.HasFocus() && !d.open {
|
|
|
|
|
|
|
|
fieldStyle = fieldStyle.Background(d.fieldTextColor)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if d.disabled {
|
|
|
|
if d.disabled {
|
|
|
|
fieldStyle = fieldStyle.Background(d.backgroundColor)
|
|
|
|
fieldStyle = fieldStyle.Background(d.backgroundColor)
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -408,9 +405,6 @@ func (d *DropDown) Draw(screen tcell.Screen) {
|
|
|
|
text = d.currentOptionPrefix + d.options[d.currentOption].Text + d.currentOptionSuffix
|
|
|
|
text = d.currentOptionPrefix + d.options[d.currentOption].Text + d.currentOptionSuffix
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// Just show the current selection.
|
|
|
|
// Just show the current selection.
|
|
|
|
if d.HasFocus() && !d.open && !d.disabled {
|
|
|
|
|
|
|
|
color = d.fieldBackgroundColor
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Print(screen, text, x, y, fieldWidth, AlignLeft, color)
|
|
|
|
Print(screen, text, x, y, fieldWidth, AlignLeft, color)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|