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 <christopher.waldon.dev@gmail.com>
This commit is contained in:
Chris Waldon
2023-04-18 08:24:23 -04:00
committed by Elias Naur
parent f77bf9a42c
commit a7c9ca99f3
+1 -1
View File
@@ -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,