-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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: SpinnerBox percentage symbol. #3777
base: main
Are you sure you want to change the base?
Conversation
I will suggest the most obvious thing, but maybe just change the |
Adjusting the label would have been sufficient, but Luc's done the work at this point, so it's a harder call. On the one hand, it's the most readable for users, and we do have precedent (e.g. user interface size in preferences), as Qt provides such a widget already. On the other hand, this introduces more things that can go wrong. For example, the layout is different on iOS, where I found I had to change the 1px top to 3.5px instead to get it to align with rest of the text. I don't have strong feelings. Anyone else want to weigh in? |
Ok Luc, without other feedback, I will approve this. Before I can merge, please make it use a 3.5px top on iOS. |
That should hopefully do it. I don't own an apple device so can't test it. I am hopeful as my solution is also used here:
|
Adds the trailing % as referenced in #3679
Displays a percentage directly following the percentage values in the deck config.
Supports i18n:
![image](https://private-user-images.githubusercontent.com/63685643/406935556-34b1f5e2-c220-4710-afc8-e17941859edc.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg3OTY4NDUsIm5iZiI6MTczODc5NjU0NSwicGF0aCI6Ii82MzY4NTY0My80MDY5MzU1NTYtMzRiMWY1ZTItYzIyMC00NzEwLWFmYzgtZTE3OTQxODU5ZWRjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA1VDIzMDIyNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTgwM2Q1YjI4M2FhNmYyOWNmZjRkYTA1M2JjMGRkMDAzZjc0ZWM0MTIxMGE4M2M2YTA0OWZmYTNhMzg2NWQyY2EmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.8w7O4lMjsX0BA-2aafuxYHSbPcN51uArjoWLkuvSBvk)
![image](https://private-user-images.githubusercontent.com/63685643/406929283-2761f277-86e5-41d4-b621-59edb6618d53.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg3OTY4NDUsIm5iZiI6MTczODc5NjU0NSwicGF0aCI6Ii82MzY4NTY0My80MDY5MjkyODMtMjc2MWYyNzctODZlNS00MWQ0LWI2MjEtNTllZGI2NjE4ZDUzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA1VDIzMDIyNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWIzN2FlN2VlN2FiZWUwODY4ZjIwODcxNThjMTNlNDkyMzQ5NWJiYmVkYTUzNzU4OGJjZDM0Mzg2ZDcwOGY4NDAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.R2EF2a7AaTPZHdklogGa9dlB5ajqPZuXisjhD155arc)
deck-config-percent-input = %{ $pct }
deck-config-percent-input = { $pct } %
Known issue: The percentage sign flies off the right hand side of the box if the user fills the input to the extent where it gets horizontal scroll.
Sorry if doing it using invisible characters is a little hacky, I couldn't think of a better way.