Some work
This commit is contained in:
@@ -130,7 +130,6 @@ func (w *LinearLayout) HandleKey(ev *tcell.EventKey) bool {
|
||||
}
|
||||
active := w.findActive()
|
||||
if active != nil {
|
||||
w.Log("LL(%s) Active(%s) Handlekey", w.Id(), active.Id())
|
||||
if active.HandleKey(ev) {
|
||||
return true
|
||||
}
|
||||
@@ -504,6 +503,7 @@ func (w *LinearLayout) updateLLHWidgetSize(wd Widget) {
|
||||
if w.stacked {
|
||||
rH = wd.MinH()
|
||||
}
|
||||
w.Log("(%s) Resize (%s): X:%d, Y:%d", w.Id(), wd.Id(), w.getWeightedW(wd), rH)
|
||||
wd.HandleResize((&Coord{X: w.getWeightedW(wd), Y: rH}).ResizeEvent())
|
||||
}
|
||||
|
||||
@@ -562,6 +562,11 @@ func (w *LinearLayout) updateLLVWidgetPos(wd Widget) {
|
||||
}
|
||||
|
||||
func (w *LinearLayout) updateLLHWidgetPos(wd Widget) {
|
||||
debug := func(wd Widget, txt string, args ...any) {
|
||||
if wd.Id() == "mngenc.selectadversary" {
|
||||
w.Log(txt, args...)
|
||||
}
|
||||
}
|
||||
c := Coord{}
|
||||
for i := range w.widgets {
|
||||
if w.widgets[i] == wd {
|
||||
@@ -572,6 +577,7 @@ func (w *LinearLayout) updateLLHWidgetPos(wd Widget) {
|
||||
}
|
||||
if w.widgets[i].Visible() {
|
||||
c.X = w.widgets[i].GetX() + w.widgets[i].GetW()
|
||||
debug(wd, "Bumping X: %d + %d = %d", w.widgets[i].GetX(), w.widgets[i].GetW(), c.X)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -608,6 +614,7 @@ func (w *LinearLayout) updateLLHWidgetPos(wd Widget) {
|
||||
c.X += 1
|
||||
c.Y += 1
|
||||
}
|
||||
w.Log("(%s) SetPos (%s): X:%d, Y:%d", w.Id(), wd.Id(), c.X, c.Y)
|
||||
wd.SetPos(c)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user