diff options
| author | ruki <[email protected]> | 2020-05-07 22:53:02 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-05-07 11:18:14 +0800 |
| commit | 1718990711ee294dd83e7adbddacca9ee2b8696f (patch) | |
| tree | 096bcf6fecb8e39d2969866e08b8b3bbc4fa2648 | |
| parent | ae51a4a32bc1259a2d06d077219ce522e51093a6 (diff) | |
support resize for ui modules
| -rw-r--r-- | xmake/actions/config/menuconf.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/xmake/actions/config/menuconf.lua b/xmake/actions/config/menuconf.lua index f0aed9a0b..479748cbb 100644 --- a/xmake/actions/config/menuconf.lua +++ b/xmake/actions/config/menuconf.lua @@ -54,7 +54,7 @@ end -- get menu config dialog function app:mconfdialog() if not self._MCONFDIALOG then - local mconfdialog = mconfdialog:new("app.config.mconfdialog", rect {1, 1, self:width() - 1, self:height() - 1}, "menu config") + local mconfdialog = mconfdialog:new("app.config.mconfdialog", rect{1, 1, self:width() - 1, self:height() - 1}, "menu config") mconfdialog:action_set(action.ac_on_exit, function (v) self:quit() os.exit() @@ -68,6 +68,12 @@ function app:mconfdialog() return self._MCONFDIALOG end +-- on resize +function app:on_resize() + self:mconfdialog():bounds_set(rect{1, 1, self:width() - 1, self:height() - 1}) + application.on_resize(self) +end + -- filter option function app:_filter_option(name) local options = |
