Skip to content

Commit a0a8a61

Browse files
committed
Enabled latest dev changes in lua API so that script_manager responds better to panel resizing
1 parent 9987322 commit a0a8a61

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

tools/script_manager.lua

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ local CS = dt.configuration.running_os == "windows" and "&" or ";"
6565

6666
local LUA_DIR = dt.configuration.config_dir .. PS .. "lua"
6767
local LUA_SCRIPT_REPO = "https://github.com/darktable-org/lua-scripts.git"
68+
local CURR_API_VERSION = dt.configuration.api_version_string
6869

6970
dt.print_log("LUA_DIR is " .. LUA_DIR)
7071

@@ -284,7 +285,7 @@ local function deactivate(script, scriptname)
284285
end
285286

286287
local function create_enable_disable_button(btext, sname, req)
287-
return dt.new_widget("button")
288+
button = dt.new_widget("button")
288289
{
289290
label = btext .. sname,
290291
tooltip = get_script_doc(req),
@@ -310,6 +311,10 @@ local function create_enable_disable_button(btext, sname, req)
310311
end
311312
end
312313
}
314+
if CURR_API_VERSION >= "6.0.1" then
315+
button.ellipsize = "middle"
316+
end
317+
return button
313318
end
314319

315320
local function load_script_stack()
@@ -733,6 +738,12 @@ sm.main_stack = dt.new_widget("stack"){
733738
table.unpack(sm.main_stack_items),
734739
}
735740

741+
if CURR_API_VERSION >= "6.0.1" then
742+
sm.main_stack.h_size_fixed = false
743+
sm.main_stack.v_size_fixed = false
744+
end
745+
746+
736747
-- make a combobox for the selector
737748

738749
sm.main_menu = dt.new_widget("combobox"){

0 commit comments

Comments
 (0)