material: improve progress indicator layout

Fixes: https://todo.sr.ht/~eliasnaur/gio/570
Signed-off-by: Walter Werner SCHNEIDER <contact@schnwalter.eu>
This commit is contained in:
owhionetrusetuhecruos@schn.email
2024-04-20 22:15:46 +03:00
committed by Elias Naur
parent e8c73bcb37
commit 0deb7b3efc
+3
View File
@@ -54,6 +54,9 @@ func (p ProgressBarStyle) Layout(gtx layout.Context) layout.Dimensions {
if !gtx.Enabled() { if !gtx.Enabled() {
fillColor = f32color.Disabled(fillColor) fillColor = f32color.Disabled(fillColor)
} }
if fillWidth < int(p.Radius*2) {
fillWidth = int(p.Radius * 2)
}
return shader(fillWidth, fillColor) return shader(fillWidth, fillColor)
}), }),
) )