fixed scroll speed

This commit is contained in:
Chr1Z93 2023-10-14 11:02:55 +02:00
parent dea47d6b36
commit 27eb4aa3c3
3 changed files with 18 additions and 17 deletions

View File

@ -830,8 +830,6 @@ end
function update_list(contentToShow)
if not library then return end
local ui = UI.getXmlTable()
-- set title according to type
local cleanName = {
campaigns = "Campaigns",
@ -843,13 +841,10 @@ function update_list(contentToShow)
UI.setValue("previewTitle", cleanName[contentToShow])
-- addition of list items according to library file
local update_height = find_tag_with_id(ui, 'ui_update_height')
local update_children = find_tag_with_id(update_height.children, 'ui_update_point')
update_children.children = {}
local childrenTable = {}
for i, v in ipairs(library[contentToShow]) do
local key = contentToShow .. "_" .. i
table.insert(update_children.children,
table.insert(childrenTable,
{
tag = 'Text',
value = v.name,
@ -861,7 +856,16 @@ function update_list(contentToShow)
})
end
update_height.attributes.height = #(update_children.children) * 24
local ui = UI.getXmlTable()
local update_point = find_tag_with_id(ui, 'ui_update_point')
update_point.children = {
tag = 'VerticalLayout',
attributes = {
padding = "10 10 0 0"
},
children = childrenTable
}
update_point.attributes.height = #childrenTable * 24
UI.setXmlTable(ui)
end

View File

@ -61,13 +61,10 @@
<!-- content list -->
<VerticalScrollView color="transparent"
minHeight="100"
flexibleHeight="100">
<Panel id="ui_update_height"
height="24">
<VerticalLayout id="ui_update_point"
padding="10">
<Text>Please refresh to see available items.</Text>
</VerticalLayout>
flexibleHeight="100"
scrollSensitivity="24">
<Panel id="ui_update_point">
<!-- this will be filled via scripting -->
</Panel>
</VerticalScrollView>

View File

@ -79,7 +79,6 @@
<!-- Option Panel -->
<TableLayout id="optionPanel"
class="window"
active="false"
rectAlignment="LowerRight"
offsetXY="-50 80">
<!-- Header: Options -->
@ -95,7 +94,8 @@
<!-- Scrollable part with options -->
<Row>
<Cell>
<VerticalScrollView horizontalScrollbarVisibility="AutohideAndExpandViewport">
<VerticalScrollView horizontalScrollbarVisibility="AutohideAndExpandViewport"
scrollSensitivity="30">
<TableLayout columnWidths="0 100 75"
autoCalculateHeight="1"
cellPadding="10 5 5 5">