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

added letter_spacing attribute for TextStyle #2574

Merged
merged 3 commits into from
Feb 8, 2024
Merged

added letter_spacing attribute for TextStyle #2574

merged 3 commits into from
Feb 8, 2024

Conversation

ariefendi992
Copy link
Contributor

@ariefendi992 ariefendi992 commented Feb 8, 2024

Example code

import flet
from flet import Page, Text, TextStyle


def main(page: Page):
    page.window_always_on_top = True
    page.add(
        Text(
            "Hello, world!\nHello, Flet",
            style=TextStyle(letter_spacing=6),
        )
    )
    page.update()


flet.app(target=main)

@CLAassistant
Copy link

CLAassistant commented Feb 8, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@ndonkoHenri ndonkoHenri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution!
The two properties you added are TextStyle properties - so I suggest we add them to the TextStyle dataclass instead.

@ariefendi992 ariefendi992 changed the title Text.letter_spacing & Text.line_height property added letter_spacing attribute for TextStyle Feb 8, 2024
@ndonkoHenri
Copy link
Collaborator

Thanks, @ariefendi992 ! I am merging...
Can you please make a PR here, adding this new property to the TextStyle docs?

@ndonkoHenri ndonkoHenri merged commit a695855 into flet-dev:main Feb 8, 2024
1 of 2 checks passed
@ariefendi992
Copy link
Contributor Author

yes, i can.

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 this pull request may close these issues.

None yet

4 participants