go fmt on togglebutton.go

This commit is contained in:
Oliver 'kfsone' Smith 2021-02-24 13:53:51 -08:00
parent 4f047b24de
commit 97c0449bbd

View file

@ -8,7 +8,7 @@ type togglebuttonColoring struct {
}
// togglebuttonColors lists the styling for each supported state.
var togglebuttonColors = map[ControlState]togglebuttonColoring {
var togglebuttonColors = map[ControlState]togglebuttonColoring{
Normal: {ToggleDefaultBorderColor, ToggleDefaultInsideColor, ToggleDefaultTextColor},
// Hijacking 'Clicked' for the 'active' state.
Clicked: {ToggleActiveBorderColor, ToggleActiveInsideColor, ToggleDefaultTextColor},
@ -21,7 +21,7 @@ func ToggleButton(bounds rl.Rectangle, text string, active bool) bool {
textHeight := int32(style[GlobalTextFontsize])
textWidth := rl.MeasureText(text, textHeight)
ConstrainRectangle(&bounds, textWidth, textWidth + GetStyle32(ToggleTextPadding), textHeight, textHeight + GetStyle32(ToggleTextPadding))
ConstrainRectangle(&bounds, textWidth, textWidth+GetStyle32(ToggleTextPadding), textHeight, textHeight+GetStyle32(ToggleTextPadding))
state := GetInteractionState(bounds)
if state == Clicked {