forked from joejulian/gio
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:
committed by
Elias Naur
parent
e8c73bcb37
commit
0deb7b3efc
@@ -54,6 +54,9 @@ func (p ProgressBarStyle) Layout(gtx layout.Context) layout.Dimensions {
|
||||
if !gtx.Enabled() {
|
||||
fillColor = f32color.Disabled(fillColor)
|
||||
}
|
||||
if fillWidth < int(p.Radius*2) {
|
||||
fillWidth = int(p.Radius * 2)
|
||||
}
|
||||
return shader(fillWidth, fillColor)
|
||||
}),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user