finally window drag works

This commit is contained in:
Jeff Carr 2025-02-05 11:58:27 -06:00
parent ec68f448af
commit 6a0fd773f4
3 changed files with 5 additions and 3 deletions

View File

@ -94,8 +94,7 @@ func (tk *guiWidget) moveNew() {
if tk.node.WidgetType == widget.Window {
tk.DrawAt(w, h)
tk.redrawWindow(w, h)
s := fmt.Sprintf("move(%dx%d) %s WIN", w, h, tk.cuiName)
tk.dumpWidget(s)
// tk.dumpWidget(fmt.Sprintf("move(%dx%d) %s WIN", w, h, tk.cuiName))
return
}
if tk.node.WidgetType == widget.Flag {

View File

@ -101,7 +101,7 @@ func (w *guiWidget) DrawAt(offsetW, offsetH int) {
w.setColor(&colorActiveW)
w.placeWidgets(offsetW, offsetH) // compute the sizes & places for each widget
w.active = false
w.dumpWidget(fmt.Sprintf("DrawAt(%d,%d)", offsetW, offsetH))
// w.dumpWidget(fmt.Sprintf("DrawAt(%d,%d)", offsetW, offsetH))
}
func (w *guiWidget) simpleDrawAt(offsetW, offsetH int) {

View File

@ -13,6 +13,9 @@ func (tk *guiWidget) redrawWindow(w int, h int) {
if tk.node.WidgetType != widget.Window {
return
}
tk.gocuiSize.w0 = w - 2
tk.gocuiSize.h0 = h - 1
tk.setFullSize() // might make the green box the right size
tk.frame = false