From a7c9ca99f3be7733dfc1c12fb07956e354fdad3c Mon Sep 17 00:00:00 2001 From: Chris Waldon Date: Tue, 18 Apr 2023 08:24:23 -0400 Subject: [PATCH] widget/material: make ScrollBarStyle.MajorMinLen default to FingerSize Egon pointed out that the current default is unusable on touch screens in Slack, so this change should hopefully ensure the indicator is interactable on touch devices. I considered expanding the minor axis dimensions as well, but I don't know what value to use. The 38DP default would be enormous on non-mobile displays if we made that the default width. Signed-off-by: Chris Waldon --- widget/material/list.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widget/material/list.go b/widget/material/list.go index cca3465c..b28d6e35 100644 --- a/widget/material/list.go +++ b/widget/material/list.go @@ -93,7 +93,7 @@ func Scrollbar(th *Theme, state *widget.Scrollbar) ScrollbarStyle { MinorPadding: 2, }, Indicator: ScrollIndicatorStyle{ - MajorMinLen: 8, + MajorMinLen: th.FingerSize, MinorWidth: 6, CornerRadius: 3, Color: lightFg, -- 2.38.5