fixed roll button dissappearing in windows build
This commit is contained in:
@@ -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])
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user