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

Title customization #10

Open
Vortec4800 opened this issue Jun 12, 2022 · 2 comments
Open

Title customization #10

Vortec4800 opened this issue Jun 12, 2022 · 2 comments

Comments

@Vortec4800
Copy link

I really like this library, except for the text. Right now the font is a bit large and limited to 1 or 2 lines depending on the label, and I wish it had a bit more flexibility. A way to change the font size, or the line limit, or both. Is this something you would be interested in allowing as a configuration option?

@honkmaster
Copy link
Owner

Hi Cory. For sure, a little more customization would be nice. However, my first idea was a HUD that resembles the system one as close as possible. Maybe, we could introduce a "styles" enum, e.g. .system and .custom with corresponding options.

@TwizzyIndy
Copy link

@honkmaster Hey. I've made some changes after seeing this thread. I've put an labelStyle enum for .system and .custom for customization. TTProgressHUDConfig will look like this. If you wish to accept these changes, I would love to create a pull request for this.

    @State var hudConfig = TTProgressHUDConfig(
        title: "This is title",
        caption: "This is caption",
        labelStyle: .custom,
        titleFont: .custom("Optima", size: 30.0),
        titleLineLimit: 3,
        captionFont: .custom("Optima", size: 14.0),
        captionLineLimit: 2,
        allowsTapToHide: true
    )

Screen Shot 2022-08-22 at 5 49 08 PM

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

No branches or pull requests

3 participants