Description
Duplicate Check
- I have searched the opened issues and there are no duplicates
Describe the bug
In flet <0.27 it was possible to reduce the size of the Dropdown "button" by setting dense=True
and adjusting content_padding
. With the new implementation in 0.27.0 this does not work properly anymore, even though neither options are marked deprecated in the changelog.
It seems that the padding is now only changed on the left edge, but on top and bottom there seems to be a treshold where the padding can not be reduced further.
Increasing the content_padding
still works vertically as it used to.
Also, content_padding
does not seem to have any effect any more on the right edge in relation to the down-arrow.
Code sample
Code
import flet as ft
OPTIONS = [
"Option 1",
"Option 2",
"Option 3",
"Option 4",
"Option 5",
]
def main(page: ft.Page):
dropdown = ft.Dropdown(
label="Label",
dense=True,
content_padding=ft.padding.all(8),
width=float("inf"),
)
for status in OPTIONS:
dropdown.options.append(ft.dropdown.Option(status))
page.add(
dropdown
)
ft.app(main)
To reproduce
- Create
Dropdown
withdense=True
and reducecontent_padding
(e.g.content_padding=ft.padding.all(8)
).
The Dropdown vertical size remains the same
Expected behavior
The Dropdown button padding changes as it did with the old Dropdown implementation
Screenshots / Videos
Captures
Flet 0.26.0:
with content_padding=ft.padding.all(8)
:
with content_padding=ft.padding.all(0)
:
with content_padding=ft.padding.all(30)
:
Flet 0.27.0:
with content_padding=ft.padding.all(8)
:
Operating System
Linux
Operating system details
Rocky Linux 9.3
Flet version
0.27.1
Regression
Yes, it used to work in a previous Flet version (please specify the version in additional details)
Suggestions
No response
Logs
No response
Additional details
Regression from 0.26