resize boxdialog
This commit is contained in:
@@ -59,6 +59,11 @@ function boxdialog:init(name, bounds, title)
|
|||||||
|
|
||||||
-- select buttons by default
|
-- select buttons by default
|
||||||
self:panel():select(self:buttons())
|
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
|
end
|
||||||
|
|
||||||
-- get box
|
-- get box
|
||||||
@@ -70,11 +75,5 @@ function boxdialog:box()
|
|||||||
return self._BOX
|
return self._BOX
|
||||||
end
|
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 module
|
||||||
return boxdialog
|
return boxdialog
|
||||||
|
@@ -121,10 +121,5 @@ function dialog:on_event(e)
|
|||||||
return window.on_event(self, e)
|
return window.on_event(self, e)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- on resize
|
|
||||||
function dialog:on_resize()
|
|
||||||
window.on_resize(self)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- return module
|
-- return module
|
||||||
return dialog
|
return dialog
|
||||||
|
@@ -74,10 +74,5 @@ function inputdialog:textedit()
|
|||||||
return self._TEXTEDIT
|
return self._TEXTEDIT
|
||||||
end
|
end
|
||||||
|
|
||||||
-- on resize
|
|
||||||
function inputdialog:on_resize()
|
|
||||||
textdialog.on_resize(self)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- return module
|
-- return module
|
||||||
return inputdialog
|
return inputdialog
|
||||||
|
@@ -70,10 +70,5 @@ function textdialog:on_event(e)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- on resize
|
|
||||||
function textdialog:on_resize()
|
|
||||||
dialog.on_resize(self)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- return module
|
-- return module
|
||||||
return textdialog
|
return textdialog
|
||||||
|
Reference in New Issue
Block a user