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

CupertinoButton Control #2495

Merged
merged 9 commits into from
Jan 29, 2024
Merged

CupertinoButton Control #2495

merged 9 commits into from
Jan 29, 2024

Conversation

ndonkoHenri
Copy link
Contributor

@ndonkoHenri ndonkoHenri commented Jan 27, 2024

Closes #2377

Test code:

import flet as ft


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

    page.add(
        ft.CupertinoButton(
            on_click=lambda e: print("CupertinoButton clicked!"),
            alignment=ft.alignment.top_left,
            content=ft.Text("Test", color=ft.colors.YELLOW),
            bgcolor=ft.cupertino_colors.SECONDARY_LABEL,
            border_radius=ft.border_radius.all(15),
            opacity_on_click=None,
            filled=True
        ),
        ft.ElevatedButton(
            width=200,
            bgcolor=ft.cupertino_colors.ACTIVE_ORANGE,
            adaptive=True,
            content=ft.Row(
                [
                    ft.Icon(name=ft.icons.FAVORITE, color="pink"),
                    ft.Icon(name=ft.icons.AUDIOTRACK, color="green"),
                    ft.Icon(name=ft.icons.BEACH_ACCESS, color="blue"),
                ],
                alignment=ft.MainAxisAlignment.SPACE_AROUND,
            ),
        )
    )


ft.app(target=main)

@FeodorFitsner FeodorFitsner merged commit adb15f7 into main Jan 29, 2024
2 checks passed
@ndonkoHenri ndonkoHenri deleted the cupertino-button branch January 29, 2024 19:50
zrr1999 pushed a commit to zrr1999/flet that referenced this pull request Jul 17, 2024
* initial commit

* add .idea to gitignore

* check opacity limits

* move specifics to the top

* fix opacity

* prop: filled

* sort imports

* prop: min_size

* prop: adaptive
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.

CupertinoButton control
2 participants