resize boxdialog

This commit is contained in:
ruki
2020-05-05 23:45:25 +08:00
parent 60f41eec71
commit f3f455874a
4 changed files with 5 additions and 21 deletions

View File

@@ -59,6 +59,11 @@ function boxdialog:init(name, bounds, title)
-- select buttons by default
self:panel():select(self:buttons())
-- on resize for panel
self:panel():action_add(action.ac_on_resized, function (v)
self:box():bounds_set(rect{0, 3, v:width(), v:height() - 1})
end)
end
-- get box
@@ -70,11 +75,5 @@ function boxdialog:box()
return self._BOX
end
-- on resize
function boxdialog:on_resize()
self:box():bounds_set(rect{0, 3, self:panel():width(), self:panel():height() - 1})
textdialog.on_resize(self)
end
-- return module
return boxdialog

View File

@@ -121,10 +121,5 @@ function dialog:on_event(e)
return window.on_event(self, e)
end
-- on resize
function dialog:on_resize()
window.on_resize(self)
end
-- return module
return dialog

View File

@@ -74,10 +74,5 @@ function inputdialog:textedit()
return self._TEXTEDIT
end
-- on resize
function inputdialog:on_resize()
textdialog.on_resize(self)
end
-- return module
return inputdialog

View File

@@ -70,10 +70,5 @@ function textdialog:on_event(e)
end
end
-- on resize
function textdialog:on_resize()
dialog.on_resize(self)
end
-- return module
return textdialog