kprinssu / anne-keyboard-windows

A Universal Windows Platform App for controlling Anne Pro Bluetooth enabled keyboards.
MIT License
139 stars 10 forks source link

Use a ColorPicker instead of RGB sliders and set default colour to white #1

Closed Kitinni closed 8 years ago

Kitinni commented 8 years ago

Hey!

I wanted to have a colour picker with a Gradient instead of the RGB sliders and I wanted to contribute, so I had a look around and found this on NuGet for Universal Windows Apps ( https://www.nuget.org/packages/ColorPicker/ )

I decided to create a pull request replacing the sliders, I had the slider updating the color picker and vice versa at first but that would sometimes cause them to jump around while selecting colours.

There's one small issues with this currently, the gradient starts showing Red, but when you select it's Orange, changing the hue at the bottom at all fixes this Unfortunately I couldn't find much other info on colour pickers / wheels in Universal Windows 10 apps. But luckily the Developer is planning to open source this, so we will be able to style it later (The colour box might be superfluous now as the colour picker already shows the current and previously selected colours, though that might not be as clear)

Here is a screenshot of the result: colorpicker

I don't have the Keyboard yet to actually use this, but I tested to make sure the SelectedColour value is set correctly and the profiles can be updated with these colours. I also set the default colour to white as the color picker starts on that, and it will be more noticable when clicking keys to set the colour initially

(Beware that the variables currently in the project are spelled colour with the u, while the NuGet package uses Color, I shortened the name to Cpicker to prevent some confusion )

I haven't done any pull requests for C# / Xaml apps before so I hope the code style is ok for you!

Regards, Kitinni

kprinssu commented 8 years ago

The colour picker looks great, the only downside it looks a bit clunky. Can you possibly resize it and get rid of the redundant colour box underneath the keyboard?

Kitinni commented 8 years ago

I agree with the clunkiness and superfluous colourbox but I unfortunately cannot remove or change element size at the moment as I don't have a source for this and can't find any better compatible color pickers as alternative But as stated in my pr the developer tweeted he plans to open source it so then it can be styled further. Source: ( https://mobile.twitter.com/TareqAteik/status/758651294395564032 ) I'll keep an eye on his feed / ask him later and improve this PR when released, just wanted to get this out there to keep in mind for functionality and to encourage people with other ideas to jump in if I'm missing a good alternative

kprinssu commented 8 years ago

I'll currently will leave this PR open for the time being. Let me know when the developer open sources the colour picker.