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

Label widget does not resize when the style is changed (except for the text style) #168

Closed
Dretch opened this issue Jun 11, 2022 · 2 comments
Labels
bug Something isn't working correctly

Comments

@Dretch
Copy link
Contributor

Dretch commented Jun 11, 2022

This seems like a bug to me, or at least surprising behaviour.

To reproduce:

  1. Run stack run inside the attached modified-monomer-starter-project: monomer-label-merge-bug.zip
  2. Click the "Increase count" button.
  3. Observe the issue:
    • Expected behaviour: the "Hello World" label immediately increases in height.
    • Actual behaviour: the label does not change height until the mouse moves over it.

The issue seems to be related to the Label merge function not checking the entire style value for changes -- it only checks the text style: https://github.com/fjvallarino/monomer/blob/main/src/Monomer/Widgets/Singles/Label.hs#L225

Cheers!

@fjvallarino
Copy link
Owner

Hi @Dretch!

This should be fixed in the PR I just submitted. I tested locally and it seems to work as expected.

@fjvallarino
Copy link
Owner

The PR has been merged to master; I'll close the PR now. Thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

2 participants