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

Position of Hint and ClearButton in fields by FontSize=20 #3418

Open
EdTyu opened this issue Dec 11, 2023 · 1 comment
Open

Position of Hint and ClearButton in fields by FontSize=20 #3418

EdTyu opened this issue Dec 11, 2023 · 1 comment
Labels
bug evaluation required Items is pending review or evaluation by the team
Milestone

Comments

@EdTyu
Copy link

EdTyu commented Dec 11, 2023

Bug explanation

from Version 4.8.1 the position of the hint in combobox and clear button in input fields are wrong by FontSize=20
image

Version

4.8.1, 4.9.0

@EdTyu EdTyu added bug evaluation required Items is pending review or evaluation by the team labels Dec 11, 2023
@Keboo Keboo added this to the 5.0.0 milestone Dec 11, 2023
@nicolaihenriksen
Copy link
Contributor

nicolaihenriksen commented Dec 11, 2023

@EdTyu @Keboo I agree that this is a bug, however I think it may not be straightforward to fix without breaking something else.

The changes that went in version 4.8.1 introduced a quite large refactoring around the placement of the SmartHint. There are MANY factors that affect where the icons, hints, pre-/suffix text elements should be placed, many of these were not taken into account before version 4.8.1 (stuff like Control.Height, Control.Padding, Control.Margin, Control.VerticalContentAlignment, and others). Taking the font size into account as well is probably doable to some extent, but if anyone takes a stab at this, please keep the other properties in mind. The page shown here ("Fields line up") does not lend itself very well to testing those capabilities. A better page to use is "Smart Hint" where you can control a lot more stuff. And as you will notice, on there it actually states that only the default font size is currently (correctly) supported; so this could be considered as a known issue (although we probably should have had an open issue for it).

One "quick fix" for the icons that do not line up is to set VerticalContentAlignment=Center. Perhaps this should be the default in the styles.

As for the floated hint, the font size probably needs to be taken (better) into account when calculating the offset. However, here you can also work around it by setting a custom offset via HintAssist.FloatingOffset=<offset> to get the appearance you want.

image

@Keboo Keboo modified the milestones: 5.0.0, 5.1.0 Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug evaluation required Items is pending review or evaluation by the team
Projects
None yet
Development

No branches or pull requests

3 participants