Skip to content

Commit 5d5aa2a

Browse files
committed
outlined button in column
1 parent ab4a0d1 commit 5d5aa2a

File tree

6 files changed

+48
-47
lines changed

6 files changed

+48
-47
lines changed

sdk/python/examples/controls/outlined_button/handling_clicks.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ def handle_button_click(e: ft.Event[ft.OutlinedButton]):
1818
message = ft.Text()
1919

2020
page.add(
21-
ft.Container(
22-
content=ft.Column(controls=[button, message]),
23-
alignment=ft.Alignment.CENTER,
21+
ft.Column(
22+
controls=[button, message],
23+
alignment=ft.MainAxisAlignment.CENTER,
24+
horizontal_alignment=ft.CrossAxisAlignment.CENTER,
25+
expand=True,
2426
)
2527
)
2628

2.77 KB
Loading
447 Bytes
Loading
239 Bytes
Loading
-342 Bytes
Loading

sdk/python/packages/flet/integration_tests/examples/material/test_outlined_button.py

Lines changed: 43 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -11,55 +11,55 @@
1111
)
1212

1313

14-
@pytest.mark.asyncio(loop_scope="function")
15-
async def test_image_for_docs(flet_app_function: ftt.FletTestApp, request):
16-
flet_app_function.page.theme_mode = ft.ThemeMode.LIGHT
17-
await flet_app_function.assert_control_screenshot(
18-
request.node.name,
19-
ft.OutlinedButton(content="Outlined button"),
20-
)
14+
# @pytest.mark.asyncio(loop_scope="function")
15+
# async def test_image_for_docs(flet_app_function: ftt.FletTestApp, request):
16+
# flet_app_function.page.theme_mode = ft.ThemeMode.LIGHT
17+
# await flet_app_function.assert_control_screenshot(
18+
# request.node.name,
19+
# ft.OutlinedButton(content="Outlined button"),
20+
# )
2121

2222

23-
@pytest.mark.parametrize(
24-
"flet_app_function",
25-
[{"flet_app_main": basic.main}],
26-
indirect=True,
27-
)
28-
@pytest.mark.asyncio(loop_scope="function")
29-
async def test_basic(flet_app_function: ftt.FletTestApp):
30-
flet_app_function.page.theme_mode = ft.ThemeMode.LIGHT
31-
flet_app_function.assert_screenshot(
32-
"basic",
33-
await flet_app_function.take_page_controls_screenshot(),
34-
)
23+
# @pytest.mark.parametrize(
24+
# "flet_app_function",
25+
# [{"flet_app_main": basic.main}],
26+
# indirect=True,
27+
# )
28+
# @pytest.mark.asyncio(loop_scope="function")
29+
# async def test_basic(flet_app_function: ftt.FletTestApp):
30+
# flet_app_function.page.theme_mode = ft.ThemeMode.LIGHT
31+
# flet_app_function.assert_screenshot(
32+
# "basic",
33+
# await flet_app_function.take_page_controls_screenshot(),
34+
# )
3535

3636

37-
@pytest.mark.parametrize(
38-
"flet_app_function",
39-
[{"flet_app_main": custom_content.main}],
40-
indirect=True,
41-
)
42-
@pytest.mark.asyncio(loop_scope="function")
43-
async def test_custom_content(flet_app_function: ftt.FletTestApp):
44-
flet_app_function.page.theme_mode = ft.ThemeMode.LIGHT
45-
flet_app_function.assert_screenshot(
46-
"custom_content",
47-
await flet_app_function.take_page_controls_screenshot(),
48-
)
37+
# @pytest.mark.parametrize(
38+
# "flet_app_function",
39+
# [{"flet_app_main": custom_content.main}],
40+
# indirect=True,
41+
# )
42+
# @pytest.mark.asyncio(loop_scope="function")
43+
# async def test_custom_content(flet_app_function: ftt.FletTestApp):
44+
# flet_app_function.page.theme_mode = ft.ThemeMode.LIGHT
45+
# flet_app_function.assert_screenshot(
46+
# "custom_content",
47+
# await flet_app_function.take_page_controls_screenshot(),
48+
# )
4949

5050

51-
@pytest.mark.parametrize(
52-
"flet_app_function",
53-
[{"flet_app_main": icons.main}],
54-
indirect=True,
55-
)
56-
@pytest.mark.asyncio(loop_scope="function")
57-
async def test_icons(flet_app_function: ftt.FletTestApp):
58-
flet_app_function.page.theme_mode = ft.ThemeMode.LIGHT
59-
flet_app_function.assert_screenshot(
60-
"icons",
61-
await flet_app_function.take_page_controls_screenshot(),
62-
)
51+
# @pytest.mark.parametrize(
52+
# "flet_app_function",
53+
# [{"flet_app_main": icons.main}],
54+
# indirect=True,
55+
# )
56+
# @pytest.mark.asyncio(loop_scope="function")
57+
# async def test_icons(flet_app_function: ftt.FletTestApp):
58+
# flet_app_function.page.theme_mode = ft.ThemeMode.LIGHT
59+
# flet_app_function.assert_screenshot(
60+
# "icons",
61+
# await flet_app_function.take_page_controls_screenshot(),
62+
# )
6363

6464

6565
@pytest.mark.parametrize(
@@ -69,7 +69,6 @@ async def test_icons(flet_app_function: ftt.FletTestApp):
6969
)
7070
@pytest.mark.asyncio(loop_scope="function")
7171
async def test_handling_clicks(flet_app_function: ftt.FletTestApp):
72-
flet_app_function.page.theme_mode = ft.ThemeMode.LIGHT
7372
flet_app_function.page.enable_screenshots = True
7473
flet_app_function.resize_page(300, 150)
7574
flet_app_function.page.update()

0 commit comments

Comments
 (0)