Really figuring some things out

This commit is contained in:
2025-08-07 11:18:03 -05:00
parent 7c96fbb187
commit b476c74683
23 changed files with 737 additions and 249 deletions

View File

@@ -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()
}