summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/ui/dialog.lua4
-rw-r--r--xmake/core/ui/panel.lua2
-rw-r--r--xmake/core/ui/view.lua2
3 files changed, 3 insertions, 5 deletions
diff --git a/tests/ui/dialog.lua b/tests/ui/dialog.lua
index 9e4d601c1..827ca1385 100644
--- a/tests/ui/dialog.lua
+++ b/tests/ui/dialog.lua
@@ -77,9 +77,7 @@ function demo:init()
dialog_input:show(false)
end)
self:insert(dialog_input, {centerx = true, centery = true})
-
- -- TODO
--- dialog_input:show(false)
+ dialog_input:show(false)
end
-- main entry
diff --git a/xmake/core/ui/panel.lua b/xmake/core/ui/panel.lua
index 8cacefc90..fac72a2ab 100644
--- a/xmake/core/ui/panel.lua
+++ b/xmake/core/ui/panel.lua
@@ -321,7 +321,7 @@ end
function panel:refresh()
-- need not refresh? do not refresh it
- if not self:state("refresh") then
+ if not self:state("refresh") or not self:state("visible") then
return
end
diff --git a/xmake/core/ui/view.lua b/xmake/core/ui/view.lua
index 471a42b60..8c3cabaee 100644
--- a/xmake/core/ui/view.lua
+++ b/xmake/core/ui/view.lua
@@ -193,7 +193,7 @@ function view:refresh()
-- refresh to the parent view
local parent = self:parent()
- if parent then
+ if parent and self:state("visible") then
-- clip bounds with the parent view
local bounds = self:bounds()