-
Notifications
You must be signed in to change notification settings - Fork 584
Description
Duplicate Check
- I have searched the opened issues and there are no duplicates
Describe the bug
Parameters such as padding and shape in FilledButtonTheme do not take effect
The parameters such as padding and shape are set in the ButtonStyle within FilledButton.
In the description of the instruction document:padding Overrides the default value of FilledButton.padding in all descendant FilledButton controls, however, FilledButton does not have a padding attribute(The padding property is in ButtonStyle), which may cause the padding parameter in FilledButtonTheme to not take effect.
I'm not sure if it's due to this reason.
And, once set SnackbarTheme, margin in Snackbar attribute doesn't work (already set behaviors = ft. SnackBarBehavior. FLOATING).
The expression in the instruction document is :inset_padding
Overrides the default value of SnackBar.inset_padding in all descendant SnackBar controls. However, SnackBar does not have the inset_padding property.
Code sample
Code
import flet as ft
filled_button_theme = ft.FilledButtonTheme(
text_style=ft.TextStyle(size=30, color=ft.Colors.GREY_900),
alignment=ft.alignment.center,
padding=ft.padding.symmetric(horizontal=30, vertical=10),
shape=ft.RoundedRectangleBorder(radius=10),
)
def main(page: ft.Page):
page.theme = ft.Theme(
filled_button_theme=filled_button_theme,
)
page.add(ft.FilledButton(text="test"))
ft.app(target=main)
To reproduce
$python test/main.py
I directly ran the script, no error reports were generated.
Expected behavior
No response
Screenshots / Videos
Captures
[Upload media here]
Operating System
Windows
Operating system details
windows 10
Flet version
v0.27.6
Regression
No, it isn't
Suggestions
In the description of the instruction document:padding Overrides the default value of FilledButton.padding in all descendant FilledButton controls, however, FilledButton does not have a padding attribute(The padding property is in ButtonStyle), which may cause the padding parameter in FilledButtonTheme to not take effect.
I'm not sure if it's due to this reason.
Logs
Logs
[Paste your logs here]
Additional details
No response