[lua] Rename Dialog:canvas{ autoScaling -> autoscaling } (fix #4011)

This commit is contained in:
David Capello 2023-08-21 21:10:51 -03:00
parent 75d7834609
commit 702a7d5265

View File

@ -1197,12 +1197,21 @@ int Dialog_canvas(lua_State* L)
}
lua_pop(L, 1);
type = lua_getfield(L, 2, "autoScaling");
type = lua_getfield(L, 2, "autoscaling");
if (type != LUA_TNIL) {
widget->setAutoScaling(lua_toboolean(L, -1));
}
lua_pop(L, 1);
// Backward compatibility with "autoScaling" parameter.
if (type == LUA_TNIL) {
type = lua_getfield(L, 2, "autoScaling");
if (type != LUA_TNIL) {
widget->setAutoScaling(lua_toboolean(L, -1));
}
lua_pop(L, 1);
}
if (widget->isAutoScaling())
sz *= ui::guiscale();