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

The CalendarDatePicker does not seem to display calendar icon correctly #18364

Open
simonfanz opened this issue Mar 3, 2025 · 3 comments
Open
Labels

Comments

@simonfanz
Copy link

Describe the bug

I would expect an icon where the dot and current day of month displays:

Image

Which appears like this in the documentation:

Image

Using Avalonia UI 11.2.3 on Windows 10 22H2

To Reproduce

I think this occurs out of the box, but please advise if a more detailed repro is needed.

Expected behavior

No response

Avalonia version

11.2.3

OS

Windows

Additional context

No response

@simonfanz simonfanz added the bug label Mar 3, 2025
@timunie
Copy link
Contributor

timunie commented Mar 4, 2025

I think this issue was reported before but can't find it rn.

Could you copy the ControlTemplate and set BorderThickness to 0.6 for example? Guess it's a rounding issue. https://github.com/AvaloniaUI/Avalonia/blob/master/src%2FAvalonia.Themes.Fluent%2FControls%2FCalendarDatePicker.xaml#L36-L40

If that helps, feel free to provide a PR.

Note

I guess 0.5 is there to look like a hair line. But if Border disappears on some devices, that doesn't help imo.

@robloo
Copy link
Contributor

robloo commented Mar 5, 2025

I made this change before the 11.0 release so it's been out in the wild a long time now. Looking at the screenshot I can see even the 1px lines are too light. What screen resolution and display scaling are you using?

Note I have a Windows 10 device that was actually used to make this change and it worked just fine there.

I guess 0.5 is there to look like a hair line. But if Border disappears on some devices, that doesn't help imo.

Yes, a 1px border was too prominent and from a design standpoint didn't look like an icon.

Rounding issues with fractional pixel sizes were addressed some time ago. I do not recall the exact PR but this type of thing was discussed and addressed.

@simonfanz
Copy link
Author

Thanks for responses.

@timunie what's the easiest way to copy that controltemplate? Sorry I've not done much WPF\Xaml stuff, esp not in last few years. Is there a way to override through styling to confirm if this is the issue?

@robloo Using 100% scaling on all screens, but it's not showing on both a 1680x1050 and 1920x1080 screen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants