Really figuring some things out
This commit is contained in:
@@ -22,6 +22,7 @@ THE SOFTWARE.
|
||||
package widgets
|
||||
|
||||
import (
|
||||
wh "git.bullercodeworks.com/brian/tcell-widgets/helpers"
|
||||
"github.com/gdamore/tcell"
|
||||
)
|
||||
|
||||
@@ -63,6 +64,8 @@ const (
|
||||
AnchorErr
|
||||
)
|
||||
|
||||
var _ Widget = (*AbsoluteLayout)(nil)
|
||||
|
||||
func NewAbsoluteLayout(id string, s tcell.Style) *AbsoluteLayout {
|
||||
ret := &AbsoluteLayout{}
|
||||
ret.Init(id, s)
|
||||
@@ -83,6 +86,8 @@ func (w *AbsoluteLayout) Init(id string, s tcell.Style) {
|
||||
func (w *AbsoluteLayout) Id() string { return w.id }
|
||||
func (w *AbsoluteLayout) HandleResize(ev *tcell.EventResize) {
|
||||
w.w, w.h = ev.Size()
|
||||
w.w = wh.Min(w.w, w.WantW())
|
||||
w.h = wh.Min(w.h, w.WantH())
|
||||
w.updateWidgetLayouts()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user