diff options
| author | ruki <[email protected]> | 2018-01-16 00:31:23 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-01-15 21:08:18 +0800 |
| commit | 3b822fc48d1b11055e12463872c22950d2c61b4d (patch) | |
| tree | a02e40638c82b6d91c309efe8b43d25a36c1c291 | |
| parent | af73bd6d7c07a97d9f02f3a8dc67754ac5c68f23 (diff) | |
fix view.draw arguments
| -rw-r--r-- | xmake/core/ui/button.lua | 4 | ||||
| -rw-r--r-- | xmake/core/ui/label.lua | 4 | ||||
| -rw-r--r-- | xmake/core/ui/panel.lua | 6 | ||||
| -rw-r--r-- | xmake/core/ui/window.lua | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/xmake/core/ui/button.lua b/xmake/core/ui/button.lua index 482dcef9a..fdbfcbe64 100644 --- a/xmake/core/ui/button.lua +++ b/xmake/core/ui/button.lua @@ -49,10 +49,10 @@ function button:init(name, bounds, text, action) end -- draw button -function button:draw() +function button:draw(transparent) -- draw background - view.draw(self) + view.draw(self, transparent) -- strip text string local str = self:text() diff --git a/xmake/core/ui/label.lua b/xmake/core/ui/label.lua index 524326540..2615414c1 100644 --- a/xmake/core/ui/label.lua +++ b/xmake/core/ui/label.lua @@ -44,10 +44,10 @@ function label:init(name, bounds, text) end -- draw view -function label:draw() +function label:draw(transparent) -- draw background - view.draw(self) + view.draw(self, transparent) -- get the text attribute value local textattr = self:textattr_val() diff --git a/xmake/core/ui/panel.lua b/xmake/core/ui/panel.lua index b7d9aced3..e9a3a54ae 100644 --- a/xmake/core/ui/panel.lua +++ b/xmake/core/ui/panel.lua @@ -259,14 +259,14 @@ function panel:state_set(name, enable) end -- draw panel -function panel:draw() +function panel:draw(transparent) -- redraw panel? local redraw = self:state("redraw") -- draw panel background first if redraw then - view.draw(self) + view.draw(self, transparent) end -- draw all child views @@ -275,7 +275,7 @@ function panel:draw() v:state_set("redraw", true) end if v:state("visible") and (v:state("redraw") or v:type() == "panel") then - v:draw() + v:draw(transparent) end end end diff --git a/xmake/core/ui/window.lua b/xmake/core/ui/window.lua index ff50e3481..6ce486d3d 100644 --- a/xmake/core/ui/window.lua +++ b/xmake/core/ui/window.lua @@ -99,7 +99,7 @@ end function window:border() if not self._BORDER then local border = view:new("window.border", self:frame():bounds()) - function border:draw() + function border:draw(transparent) -- draw background (transparent) view.draw(self, true) |
