From 7f682053d3a01df196c3f0acfa739d3d80d01bd7 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 16 Oct 2018 23:57:28 +0200 Subject: [PATCH] lua: fix hintbox/messagebox default width Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/b0dc739d8d447e364c1638121907c9b3bc3ed47c Author: vanhofen Date: 2018-10-16 (Tue, 16 Oct 2018) Origin message was: ------------------ - lua: fix hintbox/messagebox default width --- src/gui/lua/lua_hintbox.cpp | 2 +- src/gui/lua/lua_messagebox.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/lua/lua_hintbox.cpp b/src/gui/lua/lua_hintbox.cpp index deaaf26bc..d1c042c5b 100644 --- a/src/gui/lua/lua_hintbox.cpp +++ b/src/gui/lua/lua_hintbox.cpp @@ -86,7 +86,7 @@ int CLuaInstHintbox::HintboxNew(lua_State *L) tableLookup(L, "name", name) || tableLookup(L, "title", name) || tableLookup(L, "caption", name); tableLookup(L, "text", text); tableLookup(L, "icon", icon); - lua_Integer width = 450; + lua_Integer width = HINTBOX_MIN_WIDTH; tableLookup(L, "width", width); CLuaHintbox **udata = (CLuaHintbox **) lua_newuserdata(L, sizeof(CLuaHintbox *)); diff --git a/src/gui/lua/lua_messagebox.cpp b/src/gui/lua/lua_messagebox.cpp index 9611a1254..f3fd051bc 100644 --- a/src/gui/lua/lua_messagebox.cpp +++ b/src/gui/lua/lua_messagebox.cpp @@ -66,7 +66,7 @@ int CLuaInstMessagebox::MessageboxExec(lua_State *L) tableLookup(L, "name", name) || tableLookup(L, "title", name) || tableLookup(L, "caption", name); tableLookup(L, "text", text); tableLookup(L, "icon", icon); - lua_Integer timeout = -1, width = 450, return_default_on_timeout = 0, show_buttons = 0, default_button = 0; + lua_Integer timeout = -1, width = MSGBOX_MIN_WIDTH, return_default_on_timeout = 0, show_buttons = 0, default_button = 0; tableLookup(L, "timeout", timeout); tableLookup(L, "width", width); tableLookup(L, "return_default_on_timeout", return_default_on_timeout);