-
Notifications
You must be signed in to change notification settings - Fork 481
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
Some display issues in Flet 0.25.1 version #4517
Comments
Height of textfields are also not working if nothing in it |
@Muddassir-Farooq-official Yeah, it doesn't work, but you can set text_size and content_padding properties to maintain the same height. |
Can you share example code |
@Muddassir-Farooq-official This is sufficient in most cases. import flet as ft
def main(page: ft.Page):
page.vertical_alignment = ft.MainAxisAlignment.CENTER
page.horizontal_alignment = ft.CrossAxisAlignment.CENTER
input_a = ft.TextField(width=600, hint_text='hello')
input_b = ft.TextField(width=600, label='python', text_size=24, content_padding=40)
input_c = ft.TextField(width=600, value='flet', text_size=32, content_padding=ft.Padding(40, 80, 40, 80))
page.add(input_a, input_b, input_c)
if __name__ == '__main__':
ft.app(main) |
But I don't want text to be look like this starting from center it should start from top corner of field |
We made it as such. Issue #4273, PR #4403
We have an open issue concerning this: #4378. Concerning the Height of the textfield, see this: Example
import flet as ft
def main(page: ft.Page):
page.theme_mode = ft.ThemeMode.LIGHT
def handle_slider_change(e: ft.ControlEvent):
field_1.height = e.control.value
field_2.height = e.control.value
page.update()
page.add(
ft.Slider(
value=70,
min=70,
max=300,
divisions=20,
on_change=handle_slider_change,
),
ft.Row(
controls=[
field_1 := ft.TextField(
label="fit_parent_size",
fit_parent_size=True,
height=70,
),
field_2 := ft.TextField(
label="fit_parent_size + collapsed + content_padding",
fit_parent_size=True,
height=70,
collapsed=True, # helps aligns the text in the field to the top vertically
content_padding=15,
),
]
),
)
ft.app(target=main) |
@ndonkoHenri OK, there are also the second item, the first half of the third item, the fourth item, and a function request. |
Several issues have been fixed. Give the the latest pre-release a try: |
@ndonkoHenri OK, it's fine in version 0.25.2, but the default padding style for the button is still different from version 0.24, it looks a little strange. 🤔I have to spend more time modifying the style to migrate my application to version 0.25. Additionally, I hope the markdown component can support parsing br tags. |
@lasifea please share code to repro that. |
@ndonkoHenri It just in the example code above, the default padding style for the FilledButton, FilledDonalButton, and ElevatedButton components have been changed. |
Duplicate Check
Describe the bug
Additionally, I hope the markdown component can support parsing brtags. (From machine translation, please understand if the expression is inaccurate.)
Code sample
Code
To reproduce
Expected behavior
Screenshots / Videos
Captures
[Upload media here]
Operating System
Windows
Operating system details
Windows10
Flet version
0.25.1
Regression
Yes, it used to work in a previous Flet version (please specify the version in additional details)
Suggestions
No response
Logs
Logs
[Paste your logs here]
Additional details
No response
The text was updated successfully, but these errors were encountered: