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

Color Picker Alpha Slider doesn't show in light mode #4714

Closed
3 of 14 tasks
Avid29 opened this issue Aug 3, 2022 · 6 comments · Fixed by #4792
Closed
3 of 14 tasks

Color Picker Alpha Slider doesn't show in light mode #4714

Avid29 opened this issue Aug 3, 2022 · 6 comments · Fixed by #4792
Assignees
Labels
accessibility ♿ bug 🐛 An unexpected issue that highlights incorrect behavior Completed 🔥 controls 🎛️
Milestone

Comments

@Avid29
Copy link
Contributor

Avid29 commented Aug 3, 2022

Describe the bug

The checkers on the ColorPicker alpha channel don't show in light mode because a transparent white is still white over a white background.

Regression

No response

Reproducible in sample app?

  • This bug can be reproduced in the sample app.

Steps to reproduce

1. Go to ColorPicker sample
2. Select Light Theme
3. Observe the alpha checkers don't show

Expected behavior

The checkers should inverse colors for light mode.

Screenshots

image
image

Windows Build Number

  • Windows 10 1809 (Build 17763)
  • Windows 10 1903 (Build 18362)
  • Windows 10 1909 (Build 18363)
  • Windows 10 2004 (Build 19041)
  • Windows 10 20H2 (Build 19042)
  • Windows 10 21H1 (Build 19043)
  • Windows 11 21H2 (Build 22000)
  • Other (specify)

Other Windows Build number

No response

App minimum and target SDK version

  • Windows 10, version 1809 (Build 17763)
  • Windows 10, version 1903 (Build 18362)
  • Windows 10, version 1909 (Build 18363)
  • Windows 10, version 2004 (Build 19041)
  • Other (specify)

Other SDK version

No response

Visual Studio Version

No response

Visual Studio Build Number

No response

Device form factor

No response

Nuget packages

No response

Additional context

No response

Help us help you

Yes, but only if others can assist.

@Avid29 Avid29 added the bug 🐛 An unexpected issue that highlights incorrect behavior label Aug 3, 2022
@ghost ghost added the needs triage 🔍 label Aug 3, 2022
@ghost
Copy link

ghost commented Aug 3, 2022

Hello Avid29, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌

@michael-hawker
Copy link
Member

@Avid29 looks like you wanted to help out. 🦙❤ What assistance do you need?

@michael-hawker
Copy link
Member

I wonder if this was addressed at all in #4502? Maybe if so, we can pull it out of there?

@niels9001
Copy link

Thanks @Avid29 ! I was able to reproduce the bug, and it seems that this only happens when switching theme - but once the slider gets moved it sets the right color. Since it's a minor bug and some UI updates being worked on by @robloo (#4502) we'll keep the fix for 8.0 😊.

@niels9001 niels9001 modified the milestones: 7.1.3, 8.0 Aug 16, 2022
@robloo
Copy link
Contributor

robloo commented Aug 16, 2022

In this case the slider selection circle is supposed to go back to the default text color (which does contrast correctly with the window background). Something isn't working correctly I think because that functionality was implemented.

@robloo
Copy link
Contributor

robloo commented Aug 21, 2022

This issue disappears as soon as the color value is changed (see video at the end of the comment). This means the DefaultForeground is getting correctly set upon theme changes (XAML looks fine as well).

DefaultForeground="{ThemeResource TextControlForeground}"

The issue is the ColorPickerSlider background and foreground colors are calculated in code-behind. So these are not re-evaluated until the color changes. The fix for this is to watch for theme changes in ColorPickerSlider and then call ColorPickerSlider.UpdateColors() internally. The toolkit's ThemeListender might be best used here.

asdfasdf.mp4

@ghost ghost added the In-PR 🚀 label Aug 21, 2022
@ghost ghost removed the In-PR 🚀 label Oct 20, 2022
@michael-hawker michael-hawker changed the title Color Picker Alpha checkers don't show in light mode Color Picker Alpha Slider doesn't show in light mode Oct 21, 2022
@ghost ghost added the In-PR 🚀 label Oct 21, 2022
@michael-hawker michael-hawker modified the milestones: 8.0, 7.1.3 Oct 21, 2022
@ghost ghost added Completed 🔥 and removed In-PR 🚀 labels Oct 21, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Dec 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accessibility ♿ bug 🐛 An unexpected issue that highlights incorrect behavior Completed 🔥 controls 🎛️
Projects
Status: Done
4 participants