summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2017-12-22 00:59:46 +0800
committerruki <[email protected]>2017-12-21 23:58:39 +0800
commit8594fdccd6cb87909a227f6ad0d794188bc11584 (patch)
tree7ee21b336f3137f95187e77b362e6a94aa8eb38a
parentfe6f634879645e86609dfb014bab5546bfe0e7fc (diff)
fix statusbar bug
-rw-r--r--xmake/core/ui/application.lua2
-rw-r--r--xmake/core/ui/menubar.lua1
-rw-r--r--xmake/core/ui/statusbar.lua1
-rw-r--r--xmake/core/ui/view.lua2
4 files changed, 5 insertions, 1 deletions
diff --git a/xmake/core/ui/application.lua b/xmake/core/ui/application.lua
index 874864826..4ea18ad55 100644
--- a/xmake/core/ui/application.lua
+++ b/xmake/core/ui/application.lua
@@ -98,7 +98,7 @@ end
-- get statusbar
function application:statusbar()
if not self._STATUSBAR then
- return statusbar:new("statusbar", rect{0, self:height() - 1, self:width(), self:height()})
+ self._STATUSBAR = statusbar:new("statusbar", rect{0, self:height() - 1, self:width(), self:height()})
end
return self._STATUSBAR
end
diff --git a/xmake/core/ui/menubar.lua b/xmake/core/ui/menubar.lua
index fa9fc910c..df55f1610 100644
--- a/xmake/core/ui/menubar.lua
+++ b/xmake/core/ui/menubar.lua
@@ -78,6 +78,7 @@ end
-- set title
function menubar:title_set(title)
self._TITLE = title or ""
+ self:invalidate()
end
-- return module
diff --git a/xmake/core/ui/statusbar.lua b/xmake/core/ui/statusbar.lua
index 97c05f916..634bdbfc3 100644
--- a/xmake/core/ui/statusbar.lua
+++ b/xmake/core/ui/statusbar.lua
@@ -85,6 +85,7 @@ end
-- set status info
function statusbar:info_set(info)
self._INFO = info or ""
+ self:invalidate()
end
-- return module
diff --git a/xmake/core/ui/view.lua b/xmake/core/ui/view.lua
index fc63ec181..adfcbe209 100644
--- a/xmake/core/ui/view.lua
+++ b/xmake/core/ui/view.lua
@@ -212,6 +212,7 @@ end
function view:show(visible)
if self:state("visible") ~= visible then
self:state_set("visible", visible)
+ self:invalidate()
end
end
@@ -291,6 +292,7 @@ end
-- set attribute
function view:attr_set(name, value)
self._ATTRS[name] = value
+ self:invalidate()
end
-- need redraw view