Make sure f-keys are updated when scrolling
This commit is contained in:
parent
1bd4a54d54
commit
4ee2071335
8
base.lua
8
base.lua
|
@ -26,7 +26,7 @@ local function filter(data)
|
||||||
if tmp ~= v[1]._filter_out then
|
if tmp ~= v[1]._filter_out then
|
||||||
v[1].widget:emit_signal("widget::updated")
|
v[1].widget:emit_signal("widget::updated")
|
||||||
end
|
end
|
||||||
if not v[1]._filter_out then
|
if (not v[1]._filter_out) and (not v[1]._hidden) then
|
||||||
visible_counter = visible_counter + v[1].height
|
visible_counter = visible_counter + v[1].height
|
||||||
data._internal.visible_item_count = data._internal.visible_item_count +1
|
data._internal.visible_item_count = data._internal.visible_item_count +1
|
||||||
v[1].f_key = data._internal.visible_item_count
|
v[1].f_key = data._internal.visible_item_count
|
||||||
|
@ -208,7 +208,7 @@ local function add_widget(data,widget,args)
|
||||||
data._internal.layout:add(item)
|
data._internal.layout:add(item)
|
||||||
if data.visible then
|
if data.visible then
|
||||||
local fit_w,fit_h = data._internal.layout:fit()
|
local fit_w,fit_h = data._internal.layout:fit()
|
||||||
data.width = fit_w
|
data.width = data._internal.width or fit_w
|
||||||
data.height = fit_h
|
data.height = fit_h
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -305,7 +305,7 @@ local function new(args)
|
||||||
private_data.visible = value
|
private_data.visible = value
|
||||||
if value then
|
if value then
|
||||||
local fit_w,fit_h = data._internal.layout:fit(9999,9999)
|
local fit_w,fit_h = data._internal.layout:fit(9999,9999)
|
||||||
data.width = fit_w
|
data.width = internal.width or fit_w
|
||||||
data.height = fit_h
|
data.height = fit_h
|
||||||
elseif data._tmp_menu and data._current_item then
|
elseif data._tmp_menu and data._current_item then
|
||||||
-- data._tmp_menu = nil
|
-- data._tmp_menu = nil
|
||||||
|
@ -396,6 +396,7 @@ local function new(args)
|
||||||
data:emit_signal("_hidden::changed",internal.items[data._start_at][1])
|
data:emit_signal("_hidden::changed",internal.items[data._start_at][1])
|
||||||
internal.items[data._start_at+data.max_items][1]._hidden = true
|
internal.items[data._start_at+data.max_items][1]._hidden = true
|
||||||
data:emit_signal("_hidden::changed",internal.items[data._start_at+data.max_items][1])
|
data:emit_signal("_hidden::changed",internal.items[data._start_at+data.max_items][1])
|
||||||
|
filter(data)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -406,6 +407,7 @@ local function new(args)
|
||||||
data:emit_signal("_hidden::changed",internal.items[data._start_at-1][1])
|
data:emit_signal("_hidden::changed",internal.items[data._start_at-1][1])
|
||||||
internal.items[data._start_at-1+data.max_items][1]._hidden = false
|
internal.items[data._start_at-1+data.max_items][1]._hidden = false
|
||||||
data:emit_signal("_hidden::changed",internal.items[data._start_at-1+data.max_items][1])
|
data:emit_signal("_hidden::changed",internal.items[data._start_at-1+data.max_items][1])
|
||||||
|
filter(data)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue