From ea569f04e6c286b21d1d1cc4161908f443923e0c Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Tue, 28 Feb 2017 22:08:34 +0100 Subject: [PATCH] lua cwindow.new: Fix draw small windows - Ignore percent conversion of width and height to remain compatible with the Lua API Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/2d30ef10d8a4f085ca8cbef6b0cc5c18f41d8c34 Author: Michael Liebmann Date: 2017-02-28 (Tue, 28 Feb 2017) Origin message was: ------------------ lua cwindow.new: Fix draw small windows - Ignore percent conversion of width and height to remain compatible with the Lua API ------------------ This commit was generated by Migit --- src/gui/lua/lua_cc_window.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/lua/lua_cc_window.cpp b/src/gui/lua/lua_cc_window.cpp index 7dc5e77bd..494487614 100644 --- a/src/gui/lua/lua_cc_window.cpp +++ b/src/gui/lua/lua_cc_window.cpp @@ -127,6 +127,10 @@ int CLuaInstCCWindow::CCWindowNew(lua_State *L) CLuaCCWindow **udata = (CLuaCCWindow **) lua_newuserdata(L, sizeof(CLuaCCWindow *)); *udata = new CLuaCCWindow(); (*udata)->w = new CComponentsWindow(x, y, dx, dy, name.c_str(), icon.c_str(), 0, has_shadow, (fb_pixel_t)color_frame, (fb_pixel_t)color_body, (fb_pixel_t)color_shadow); + /* Ignore percent conversion of width and height + to remain compatible with the Lua API */ + (*udata)->w->setWidth(dx); + (*udata)->w->setHeight(dy); if (!show_header) (*udata)->w->showHeader(false);