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

Allow the color and bgcolor of FilledButton and FilledTonalButton to be set through the style #2435

Merged
merged 1 commit into from
Jan 20, 2024

Conversation

ndonkoHenri
Copy link
Collaborator

Closes #2268

Test code:

import flet as ft


def main(page: ft.Page):
    page.window_always_on_top = True
    page.theme_mode = ft.ThemeMode.LIGHT

    page.add(
        ft.FilledButton(
            "Material",
            icon=ft.icons.ACCESSIBILITY,
            style=ft.ButtonStyle(bgcolor=ft.colors.GREEN, color=ft.colors.BLUE_ACCENT),
        ),
        ft.FilledTonalButton(
            "Material",
            icon=ft.icons.ACCESSIBILITY,
            style=ft.ButtonStyle(bgcolor=ft.colors.RED, color=ft.colors.YELLOW),
        ),
    )


ft.app(target=main)

@FeodorFitsner FeodorFitsner merged commit 5257897 into main Jan 20, 2024
3 checks passed
@ndonkoHenri ndonkoHenri deleted the filled-button-fix branch January 20, 2024 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FilledButton and FilledToneButton doesn't respect the style keyword
2 participants