Skip to content

Commit

Permalink
Fix radio button label display
Browse files Browse the repository at this point in the history
  • Loading branch information
richardwilkes committed Dec 31, 2021
1 parent d744490 commit 1c92a65
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions radio_button.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ type RadioButton struct {
Font FontProvider
ControlColor Ink
OnControlColor Ink
OnBackgroundColor Ink
EdgeColor Ink
PressedColor Ink
OnPressedColor Ink
Expand Down Expand Up @@ -125,8 +126,8 @@ func (r *RadioButton) DefaultDraw(canvas *Canvas, dirty geom32.Rect) {
rct := rect
rct.X += circleSize + r.Gap
rct.Width -= circleSize + r.Gap
DrawLabel(canvas, rct, r.HAlign, r.VAlign, r.Text, ChooseFont(r.Font, SystemFont), fg, r.Drawable, r.Side,
r.Gap, !r.Enabled())
DrawLabel(canvas, rct, r.HAlign, r.VAlign, r.Text, ChooseFont(r.Font, SystemFont),
ChooseInk(r.OnBackgroundColor, OnBackgroundColor), r.Drawable, r.Side, r.Gap, !r.Enabled())
}
if rect.Height > circleSize {
rect.Y += mathf32.Floor((rect.Height - circleSize) / 2)
Expand Down

0 comments on commit 1c92a65

Please sign in to comment.