go fmt on togglebutton.go
This commit is contained in:
parent
4f047b24de
commit
97c0449bbd
1 changed files with 3 additions and 3 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue