From b409020338731437d21050be4aac6ec636d46763 Mon Sep 17 00:00:00 2001 From: jmawet Date: Fri, 7 Aug 2026 17:09:57 -0700 Subject: [PATCH] fix home row padding settings --- components/home/HomeRows.bs | 25 +++-------- settings/settings.json | 84 ++++++++++++++++++------------------- 2 files changed, 47 insertions(+), 62 deletions(-) diff --git a/components/home/HomeRows.bs b/components/home/HomeRows.bs index 6c4d30412..80a267b33 100644 --- a/components/home/HomeRows.bs +++ b/components/home/HomeRows.bs @@ -148,29 +148,14 @@ sub updateSize() 'Set width of Rows to cut off at edge of Safe Zone m.top.itemSize = [1703, itemHeight] - ' spacing between rows (modern reserves space for the focused card info block) + ' Padding arrives as a number value that needs to be scaled from flutter to roku + paddingKey = isModernHomeRows() ? "ui.home.modernRowsPadding" : "ui.home.classicRowsPadding" + padding = Val(m.global.session.user.settings[paddingKey]) if isModernHomeRows() - paddingKey = "ui.home.modernRowsPadding" - compactSpacing = 360 - spaciousSpacing = 560 - defaultSpacing = 460 + verticalSpacing = (padding - 200) * (padding / 360) else - paddingKey = "ui.home.classicRowsPadding" - compactSpacing = 10 - spaciousSpacing = 90 - defaultSpacing = 30 + verticalSpacing = padding * 2 end if - - ' Padding arrives as either a pixel value or a named preset - padding = m.global.session.user.settings[paddingKey] - paddingStr = isValid(padding) ? padding.ToStr() : "" - verticalSpacing = Val(paddingStr) - if verticalSpacing <= 0 - if isStringEqual(paddingStr, "compact") then verticalSpacing = compactSpacing - if isStringEqual(paddingStr, "spacious") then verticalSpacing = spaciousSpacing - if verticalSpacing <= 0 then verticalSpacing = defaultSpacing - end if - m.top.itemSpacing = [0, verticalSpacing] ' spacing between items in a row. Modern keeps cards tight, the focused card diff --git a/settings/settings.json b/settings/settings.json index 83f73a6ba..19a8d21c1 100644 --- a/settings/settings.json +++ b/settings/settings.json @@ -334,48 +334,6 @@ "type": "bool", "default": "false" }, - { - "title": "Classic Layout Home Rows Padding", - "description": "Adjust vertical padding between home screen rows in classic layout", - "settingName": "ui.home.classicRowsPadding", - "type": "radio", - "default": "30", - "options": [ - { "title": "10 px", "id": "10" }, - { "title": "20 px", "id": "20" }, - { "title": "30 px (Default)", "id": "30" }, - { "title": "40 px", "id": "40" }, - { "title": "50 px", "id": "50" }, - { "title": "60 px", "id": "60" }, - { "title": "70 px", "id": "70" }, - { "title": "80 px", "id": "80" }, - { "title": "90 px", "id": "90" }, - { "title": "100 px", "id": "100" }, - { "title": "110 px", "id": "110" }, - { "title": "120 px", "id": "120" }, - { "title": "130 px", "id": "130" } - ] - }, - { - "title": "Modern Layout Home Rows Padding", - "description": "Adjust vertical padding between home screen rows in modern layout", - "settingName": "ui.home.modernRowsPadding", - "type": "radio", - "default": "460", - "options": [ - { "title": "360 px", "id": "360" }, - { "title": "380 px", "id": "380" }, - { "title": "400 px", "id": "400" }, - { "title": "420 px", "id": "420" }, - { "title": "440 px", "id": "440" }, - { "title": "460 px (Default)", "id": "460" }, - { "title": "480 px", "id": "480" }, - { "title": "500 px", "id": "500" }, - { "title": "520 px", "id": "520" }, - { "title": "540 px", "id": "540" }, - { "title": "560 px", "id": "560" } - ] - }, { "title": "Recommendation Engine Source", "description": "Select the recommendation engine source for home screen recommendations", @@ -884,6 +842,48 @@ } ] }, + { + "title": "Classic Layout Home Rows Padding", + "description": "Adjust vertical padding between home screen rows in classic layout", + "settingName": "ui.home.classicRowsPadding", + "type": "radio", + "default": "30", + "options": [ + { "title": "10 px", "id": "10" }, + { "title": "20 px", "id": "20" }, + { "title": "30 px (Default)", "id": "30" }, + { "title": "40 px", "id": "40" }, + { "title": "50 px", "id": "50" }, + { "title": "60 px", "id": "60" }, + { "title": "70 px", "id": "70" }, + { "title": "80 px", "id": "80" }, + { "title": "90 px", "id": "90" }, + { "title": "100 px", "id": "100" }, + { "title": "110 px", "id": "110" }, + { "title": "120 px", "id": "120" }, + { "title": "130 px", "id": "130" } + ] + }, + { + "title": "Modern Layout Home Rows Padding", + "description": "Adjust vertical padding between home screen rows in modern layout", + "settingName": "ui.home.modernRowsPadding", + "type": "radio", + "default": "460", + "options": [ + { "title": "360 px", "id": "360" }, + { "title": "380 px", "id": "380" }, + { "title": "400 px", "id": "400" }, + { "title": "420 px", "id": "420" }, + { "title": "440 px", "id": "440" }, + { "title": "460 px (Default)", "id": "460" }, + { "title": "480 px", "id": "480" }, + { "title": "500 px", "id": "500" }, + { "title": "520 px", "id": "520" }, + { "title": "540 px", "id": "540" }, + { "title": "560 px", "id": "560" } + ] + }, { "title": "Since You Watched Rows Settings", "description": "Customize the Since You Watched rows.",