Skip to content

Container with border_radius doesn't clip its content #1225

@InesaFitsner

Description

@InesaFitsner

import flet as ft

def main(page: ft.Page):

c = ft.Container(
        border_radius=10,
        #border=ft.border.all(4, ft.colors.ON_SECONDARY_CONTAINER),
        #margin=10,
        #padding=10,
        content=ft.Column(
            spacing=0,
            controls=[
                ft.Container(
                    height=50, 
                    bgcolor=ft.colors.PRIMARY, 
                    content=ft.Text("PRIMARY"), 
                    alignment = ft.alignment.center, 
                    #border_radius=ft.border_radius.only(topLeft=10, topRight=10)
                    ),
                ft.Container(
                    height=50, 
                    bgcolor=ft.colors.ON_PRIMARY, 
                    content=ft.Text("ON_PRIMARY"), 
                    alignment = ft.alignment.center),
                ft.Container(
                    height=50, 
                    bgcolor=ft.colors.PRIMARY_CONTAINER, 
                    content=ft.Text("PRIMARY_CONTAINER"), 
                    alignment = ft.alignment.center),
                ft.Container(
                    height=50, 
                    bgcolor=ft.colors.ON_PRIMARY_CONTAINER, 
                    content=ft.Text("ON_PRIMARY_CONTAINER"), 
                    alignment = ft.alignment.center,
                    #border_radius=ft.border_radius.only(bottomLeft=10, bottomRight=10)
                )
            ]))

page.add(c)

ft.app(target=main)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions