flet icon indicating copy to clipboard operation
flet copied to clipboard

Setting `ButtonStyle.text_style` displays grey screen

Open ClearSafety opened this issue 1 year ago • 0 comments

Duplicate Check

  • [X] I have searched the opened issues and there are no duplicates

Describe the bug

I'm using the control 'TextButton' and would like to customize its text. In 'style' property of 'TextButton', I'm using the class 'ButtonStyle'.

When I use TextStyle as value for 'style' (that is a property of 'ButtonStyle'), it displays a grey page. You can see it in the pictures attached.

Code sample

Code
import flet as ft

def main(page: ft.Page):
       
    btn = ft.TextButton(
        text='Text Button 1',
        style=ft.ButtonStyle(
            color=ft.colors.GREEN,
            text_style=ft.TextStyle(
                size=10
            )
        )
    )

    page.add(btn)

ft.app(target=main)

To reproduce

Just run the code.

Expected behavior

No response

Screenshots / Videos

Captures

[Upload m no TextStyle with TextStyle edia here]

Operating System

Windows

Operating system details

Windows 11 Pro

Flet version

0.24.1

Regression

No, it isn't

Suggestions

No response

Logs

Logs
[Paste your logs here]

Additional details

No response

ClearSafety avatar Oct 11 '24 16:10 ClearSafety