summaryrefslogtreecommitdiff
path: root/xmake/core/ui/panel.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/core/ui/panel.lua')
-rw-r--r--xmake/core/ui/panel.lua20
1 files changed, 20 insertions, 0 deletions
diff --git a/xmake/core/ui/panel.lua b/xmake/core/ui/panel.lua
index 6576c0b24..417f1d725 100644
--- a/xmake/core/ui/panel.lua
+++ b/xmake/core/ui/panel.lua
@@ -276,6 +276,26 @@ function panel:draw()
end
end
+-- resize panel
+function panel:resize()
+
+ -- resize panel?
+ local resize = self:state("resize")
+ if resize then
+ view.resize(self)
+ end
+
+ -- resize all child views
+ for v in self:views() do
+ if resize then
+ v:state_set("resize", true)
+ end
+ if v:state("visible") and (v:state("resize") or v:type() == "panel") then
+ v:resize()
+ end
+ end
+end
+
-- refresh panel
function panel:refresh()