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

Small bug with TextField: bad behaviour with suffix/prefix properties. #4161

Closed
1 task done
ClearSafety opened this issue Oct 14, 2024 · 0 comments · Fixed by #4173
Closed
1 task done

Small bug with TextField: bad behaviour with suffix/prefix properties. #4161

ClearSafety opened this issue Oct 14, 2024 · 0 comments · Fixed by #4173
Assignees

Comments

@ClearSafety
Copy link

Duplicate Check

Describe the bug

When one uses the properties 'suffix' or 'prefix' of the TextField control, it increases slightly the height of the field and it makes its content descentralised. The same doesn't happen with the properties 'suffix_icon' or 'prefix_icon'.
The attached image shows the difference.

Code sample

Code
import flet as ft

def main(page: ft.Page):
       
    txtfield = ft.TextField(
        width=400,
        value='Default value',
        text_size=10,
        bgcolor=ft.colors.AMBER_100,
        text_vertical_align=ft.VerticalAlignment.CENTER,
        suffix_icon=ft.icons.ARROW_DROP_DOWN
        #suffix=ft.Icon(name=ft.icons.ARROW_DROP_DOWN),
    )

    page.add(txtfield)

ft.app(target=main)

To reproduce

Run the repro code.
To test the difference, comment 'suffix' property.

Expected behavior

No response

Screenshots / Videos

Captures

[Upload media here]

![textfield](https://github.com/user-attachments/assets/438b2206-285d-45c4-9724-dbf73e63d6dd)

Operating System

Windows

Operating system details

Windows 11 Pro

Flet version

0.24.1

Regression

No, it isn't

Suggestions

No response

Logs

Logs
[Paste your logs here]

Additional details

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants