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

Fix issue #2712 and #2828 #2914

Merged
merged 1 commit into from
Apr 3, 2024
Merged

Fix issue #2712 and #2828 #2914

merged 1 commit into from
Apr 3, 2024

Conversation

isaffathir
Copy link
Contributor

Test code:
#2712

import flet as ft

def main(page: ft.Page):
    page.padding = 0
    def on_long_press(e):
        print('on long press')
        page.add(ft.Text('on_long_press triggered'))
    def on_click(e):
        print('on click')
        page.add(ft.Text('on_click triggered'))
    container = ft.Container(
        bgcolor= ft.colors.RED,
        content= ft.Text('Test Long Press'),
        height= 100,
        width= 100,
        on_click= on_click,
        on_long_press= on_long_press 
    )
    page.add(ft.SafeArea(container))
    
ft.app(target=main)

#2828

import flet as ft
def main(page: ft.Page):
    child = ft.Container(
        bgcolor= ft.colors.ORANGE,
        alignment= ft.alignment.center,
        
    )
    container = ft.Container(
        content= child,
        # bgcolor= ft.colors.RED,
        height= 200,
        width= 200,
        border_radius= ft.BorderRadius(
            top_left= 0,
            top_right= 30,
            bottom_left= 30,
            bottom_right= 30
        ),
        alignment = ft.alignment.center,
        on_click= lambda e: print('clicked'),
        ink = True
    )
    page.add(container)
ft.app(target=main)

@FeodorFitsner FeodorFitsner merged commit c1c063f into flet-dev:main Apr 3, 2024
1 of 2 checks passed
50Bytes-dev pushed a commit to 50Bytes-dev/flet that referenced this pull request May 18, 2024
zrr1999 pushed a commit to zrr1999/flet that referenced this pull request Jul 17, 2024
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.

2 participants