fixed roll button dissappearing in windows build

This commit is contained in:
Grimsace
2026-02-19 15:00:31 -06:00
parent d992dfda2a
commit 67bcc43b55
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -106,7 +106,7 @@ func main() {
newCustomButton2("*", func() {
diceInputEntry.SetText(diceInputEntry.Text + "*")
}),
newCustomButton2("", func() {
newCustomButton2("BKSP", func() {
text := diceInputEntry.Text
if len(text) > 0 {
diceInputEntry.SetText(text[:len(text)-1])
+2 -2
View File
@@ -85,7 +85,7 @@ type customButton2 struct {
func (b *customButton2) CreateRenderer() fyne.WidgetRenderer {
text := canvas.NewText(b.Text, b.textColor())
text.Alignment = fyne.TextAlignCenter
background := canvas.NewRectangle(color.Transparent)
background := canvas.NewRectangle(b.backgroundColor())
return &customButton2Renderer{
text: text,
background: background,
@@ -162,7 +162,7 @@ func (b *customButton2) textColor() color.Color {
variant := fyne.CurrentApp().Settings().ThemeVariant()
switch b.Importance {
case widget.HighImportance:
return fyne.CurrentApp().Settings().Theme().Color(theme.ColorNameBackground, variant)
return color.White
default:
return fyne.CurrentApp().Settings().Theme().Color(theme.ColorNameForeground, variant)
}