diff --git a/res/bundled.go b/res/bundled.go index 7d792b6..813afcd 100644 --- a/res/bundled.go +++ b/res/bundled.go @@ -123,12 +123,12 @@ var ResShuffleInvertSvg = &fyne.StaticResource{ var ResStarOutlineSvg = &fyne.StaticResource{ StaticName: "star-outline.svg", StaticContent: []byte( - "\r\n\r\n\r\n"), + "\r\n\r\n\r\n"), } var ResStarFilledSvg = &fyne.StaticResource{ StaticName: "star-filled.svg", StaticContent: []byte( - "\r\n\r\n\r\n"), + "\r\n\r\n\r\n"), } var ResLICENSE = &fyne.StaticResource{ StaticName: "LICENSE", diff --git a/res/icons/publicdomain/star-filled.svg b/res/icons/publicdomain/star-filled.svg index 3b4e800..3dfe015 100644 --- a/res/icons/publicdomain/star-filled.svg +++ b/res/icons/publicdomain/star-filled.svg @@ -1,4 +1,4 @@ - + \ No newline at end of file diff --git a/res/icons/publicdomain/star-outline.svg b/res/icons/publicdomain/star-outline.svg index 9e6eb46..dda4222 100644 --- a/res/icons/publicdomain/star-outline.svg +++ b/res/icons/publicdomain/star-outline.svg @@ -1,4 +1,4 @@ - + \ No newline at end of file diff --git a/ui/widgets/starrating.go b/ui/widgets/starrating.go index 14a853f..b67ea8e 100644 --- a/ui/widgets/starrating.go +++ b/ui/widgets/starrating.go @@ -16,6 +16,10 @@ var ( themedResStarOutline = theme.NewThemedResource(res.ResStarOutlineSvg) ) +const ( + starRatingBetweenStarPad = 2 +) + type StarRating struct { widget.BaseWidget @@ -34,7 +38,7 @@ func NewStarRating() *StarRating { func (s *StarRating) createContainer() { s.container = container.New(&layouts.HboxCustomPadding{ DisableThemePad: true, - ExtraPad: 2, + ExtraPad: starRatingBetweenStarPad, }) var im *canvas.Image for i := 0; i < 5; i++ { @@ -66,7 +70,7 @@ func (s *StarRating) Refresh() { } func (s *StarRating) MinSize() fyne.Size { - return fyne.NewSize(s.StarSize*5, s.StarSize) + return fyne.NewSize(s.StarSize*5+starRatingBetweenStarPad*4, s.StarSize) } func (s *StarRating) CreateRenderer() fyne.WidgetRenderer {