treeview: restore ability to disable toolbarview
This commit is contained in:
parent
76c1db97f5
commit
7b411c3ea9
|
@ -854,8 +854,10 @@ config.plugins.treeview.config_spec = {
|
||||||
description = "Default treeview width.",
|
description = "Default treeview width.",
|
||||||
path = "size",
|
path = "size",
|
||||||
type = "number",
|
type = "number",
|
||||||
default = math.ceil(toolbar_view:get_min_width() / SCALE),
|
default = toolbar_view and math.ceil(toolbar_view:get_min_width() / SCALE)
|
||||||
min = toolbar_view:get_min_width() / SCALE,
|
or 200,
|
||||||
|
min = toolbar_view and toolbar_view:get_min_width() / SCALE
|
||||||
|
or 200,
|
||||||
get_value = function(value)
|
get_value = function(value)
|
||||||
return value / SCALE
|
return value / SCALE
|
||||||
end,
|
end,
|
||||||
|
@ -863,7 +865,9 @@ config.plugins.treeview.config_spec = {
|
||||||
return value * SCALE
|
return value * SCALE
|
||||||
end,
|
end,
|
||||||
on_apply = function(value)
|
on_apply = function(value)
|
||||||
view:set_target_size("x", math.max(value, toolbar_view:get_min_width()))
|
view:set_target_size("x", math.max(
|
||||||
|
value, toolbar_view and toolbar_view:get_min_width() or 200
|
||||||
|
))
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue