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

Maintain consistent widget width #38

Closed
wants to merge 5 commits into from
Closed

Conversation

Batwam
Copy link

@Batwam Batwam commented Jan 19, 2023

Hello,

As mentioned on a previously cancelled PR, the widget changes width when the % drops below 10, making the panel icons around it move around. Rather than manually adding some spaces to the label value as I did before, I tried to implement a neater CSS based solution here to set a fixed width, combined with right alignment for the text and some padding to keep the text away from the adjacent icons.

Please have a look and let me know what you think. I'm not really an expert with setting dimensions with the various notations between numbers, em or pixel values but I figures that the em ratio would be the more appropriate to make sure it's proportional to the font size. 2.0em was leading to the width being too short with font scaling >1.1. I tested a width of 2.1em and had no issue even if I tripled the font size.

Btw, I also test with % only or icon only and they also look fine.

before:
image
image

after:
image
image

@Batwam Batwam changed the title fix % label box to maintain widget width Maintain consistent widget width Jan 19, 2023
@Batwam
Copy link
Author

Batwam commented Mar 8, 2023

Closing the PR as it is not being reviewed

@Batwam Batwam closed this Mar 8, 2023
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.

1 participant