From 788f52e46e4333be8522f80cd033eba206fda3ff Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 13 Jan 2018 00:37:36 +0800 Subject: add resize state --- xmake/core/ui/boxdialog.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xmake/core/ui/boxdialog.lua') diff --git a/xmake/core/ui/boxdialog.lua b/xmake/core/ui/boxdialog.lua index 74b32b685..d46b2ed09 100644 --- a/xmake/core/ui/boxdialog.lua +++ b/xmake/core/ui/boxdialog.lua @@ -41,14 +41,14 @@ function boxdialog:init(name, bounds, title) -- insert box self:panel():insert(self:box()) - -- resize text bounds - self:text():bounds():resize(self:panel():width(), math.floor(self:panel():height() / 4)) + -- resize text + self:text():bounds().ey = 3 end -- get box function boxdialog:box() if not self._BOX then - self._BOX = window:new("boxdialog.box", rect{0, math.floor(self:panel():height() / 4), self:panel():width(), self:panel():height() - 1}) + self._BOX = window:new("boxdialog.box", rect{0, 3, self:panel():width(), self:panel():height() - 1}) self._BOX:border():cornerattr_set("black", "white") end return self._BOX -- cgit v1.3.1