MCPcopy Create free account
hub / github.com/TranslucentTB/TranslucentTB / OnColorPropertyChanged

Method OnColorPropertyChanged

Xaml/Controls/ColorPicker.cpp:698–714  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

696 }
697
698 void ColorPicker::OnColorPropertyChanged(const wux::DependencyObject &sender, const wux::DependencyProperty &)
699 {
700 if (const auto that = sender.try_as<ColorPicker>())
701 {
702 // TODO: Coerce the value if Alpha is disabled, is this handled in the base ColorPicker?
703 if (that->m_SavedHsvColor && that->Color() != that->m_SavedHsvColorRgbEquivalent)
704 {
705 // The color was updated from an unknown source
706 // The RGB and HSV colors are no longer in sync so the HSV color must be cleared
707 that->m_SavedHsvColor.reset();
708 that->m_SavedHsvColorRgbEquivalent.reset();
709 }
710
711 that->UpdateColorControlValues();
712 that->UpdateChannelSliderBackgrounds();
713 }
714 }
715
716 void ColorPicker::OnDispatcherQueueTimerTick(const IInspectable &, const IInspectable &)
717 {

Callers

nothing calls this directly

Calls 3

ColorMethod · 0.80

Tested by

no test coverage detected