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

ExpandableTextArea: compute height based on given font size #813

Open
AlmasB opened this issue May 24, 2020 · 1 comment
Open

ExpandableTextArea: compute height based on given font size #813

AlmasB opened this issue May 24, 2020 · 1 comment
Labels
codefest23-24 difficulty:medium API design elements, need time to think through help wanted Contributions welcome / high PR acceptance rate lang:kotlin-only Solution should be in Kotlin type:refactor Clean up / upgrade code

Comments

@AlmasB
Copy link
Owner

AlmasB commented May 24, 2020

In the fxgl-tools module, com.almasb.fxgl.tools.dialogues.ExpandableTextArea, we compute the height:

        var newHeight = text.layoutBounds.height + 20.0
        newHeight = if (abs(prevHeight - newHeight) > 15) newHeight else prevHeight

Ideally, this should probably be based on font size.

A solution needs to demonstrate examples (screenshots / video) with this UI control using different font sizes: small (12?), medium (18?), large (30?).

@AlmasB AlmasB added type:refactor Clean up / upgrade code help wanted Contributions welcome / high PR acceptance rate difficulty:medium API design elements, need time to think through labels May 24, 2020
@AlmasB AlmasB added the lang:kotlin-only Solution should be in Kotlin label Feb 5, 2021
@AlmasB
Copy link
Owner Author

AlmasB commented Feb 17, 2021

Here's a nice example by Dirk:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
codefest23-24 difficulty:medium API design elements, need time to think through help wanted Contributions welcome / high PR acceptance rate lang:kotlin-only Solution should be in Kotlin type:refactor Clean up / upgrade code
Projects
None yet
Development

No branches or pull requests

1 participant