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

Container Issue when ink = True #2628

Closed
lekshmanmj opened this issue Feb 14, 2024 · 0 comments · Fixed by #2701
Closed

Container Issue when ink = True #2628

lekshmanmj opened this issue Feb 14, 2024 · 0 comments · Fixed by #2701
Labels
bug Something isn't working

Comments

@lekshmanmj
Copy link
Contributor

Description
Border, bgcolor, shadow, ink animation are hidden below other controls when inked container is placed among other controls in a stack.

Code example to reproduce the issue:

import flet as ft

def main(page: ft.Page):
    page.vertical_alignment = ft.MainAxisAlignment.CENTER
    page.horizontal_alignment = ft.CrossAxisAlignment.CENTER
    page.theme_mode = ft.ThemeMode.DARK
    button = ft.Container(
        bgcolor= ft.colors.GREEN,
        content=ft.Icon(
            ft.icons.MENU_BOOK_ROUNDED,
            color= ft.colors.BLUE,
            size= 30
        ),
        padding=18,
        alignment=ft.alignment.center,
        border_radius=20,
        border= ft.Border(
            top= ft.BorderSide(width= 2, color= ft.colors.RED),
            left= ft.BorderSide(width= 2, color= ft.colors.RED),
            bottom= ft.BorderSide(width= 2, color= ft.colors.RED),
            right= ft.BorderSide(width= 2, color= ft.colors.RED)
        ),
        shadow = ft.BoxShadow(
            blur_radius = 20,
            color = ft.colors.YELLOW_ACCENT_700,
            blur_style = ft.ShadowBlurStyle.OUTER,
        ),
        on_click=lambda e: print("Clicked"),
        ink=True,
        bottom= 20, right= 20
    )
    simply_container = ft.Container(
        bgcolor= ft.colors.with_opacity(1, ft.colors.BLACK),
        height= page.height * 0.8,
        width= page.width * 0.8,
        bottom= 20, right= 40
    )
    stack = ft.Stack(
        controls= [
            simply_container,
            button
        ],
        expand= True
    )
    page.add(stack)

ft.app(target=main)

Describe the results you received:
image

Describe the results you expected:
image

Additional information you deem important (e.g. issue happens only occasionally):
This Issue occurs only when ink = True

Flet version (pip show flet):

Name: flet
Version: 0.19.0
Summary: Flet for Python - easily build interactive multi-platform apps in Python
Home-page: 
Author: Appveyor Systems Inc.
Author-email: hello@flet.dev
License: Apache-2.0
Location: /home/lekshman/bbb/bbb_env/lib/python3.11/site-packages
Requires: cookiecutter, flet-runtime, packaging, qrcode, watchdog, websocket-client, websockets
Required-by: 

Give your requirements.txt file (don't pip freeze, instead give direct packages):

flet

Operating system:
Kali Linux

Additional environment details:
Nil

@lekshmanmj lekshmanmj changed the title Container Ink Issue Container Issue when ink = True Feb 14, 2024
@FeodorFitsner FeodorFitsner added the bug Something isn't working label Feb 14, 2024
FeodorFitsner pushed a commit that referenced this issue Feb 29, 2024
* initial commit

* add mouseCursor and delete not needed event

* Update ink_well.py

* Fix container.dart

The Ink or InkWell widget must have a Material widget as an ancestor.

* Revert change,duplicate control InkWell

Flet already use InkWell on container.dart

* Add on_release (Callback after click)

* Add ink_color
zrr1999 pushed a commit to zrr1999/flet that referenced this issue Jul 17, 2024
* initial commit

* add mouseCursor and delete not needed event

* Update ink_well.py

* Fix container.dart

The Ink or InkWell widget must have a Material widget as an ancestor.

* Revert change,duplicate control InkWell

Flet already use InkWell on container.dart

* Add on_release (Callback after click)

* Add ink_color
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants