Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting ButtonStyle.text_style displays grey screen #4144

Closed
1 task done
ClearSafety opened this issue Oct 11, 2024 · 0 comments · Fixed by #4105
Closed
1 task done

Setting ButtonStyle.text_style displays grey screen #4144

ClearSafety opened this issue Oct 11, 2024 · 0 comments · Fixed by #4105
Assignees
Labels
bug Something isn't working controls

Comments

@ClearSafety
Copy link

Duplicate Check

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

@ndonkoHenri ndonkoHenri self-assigned this Oct 11, 2024
@ndonkoHenri ndonkoHenri added bug Something isn't working controls labels Oct 11, 2024
@ndonkoHenri ndonkoHenri changed the title TextButton incompatible with TextStile Setting ButtonStyle.text_style displays grey screen Oct 11, 2024
@ndonkoHenri ndonkoHenri linked a pull request Oct 11, 2024 that will close this issue
@ndonkoHenri ndonkoHenri moved this from 🆕 New to 👀 In review in Flet Development Oct 11, 2024
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Flet Development Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working controls
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants