mirror of
https://github.com/Microsoft/calculator.git
synced 2025-07-31 12:00:01 -07:00
Redesign graph buttons + replace ActiveTracing button by a ToggleButton (#864)
* redesign graph buttons * fix high-contrast and focus
This commit is contained in:
parent
f593c621aa
commit
f282605bc6
4 changed files with 269 additions and 265 deletions
|
@ -18,11 +18,12 @@ public
|
|||
public
|
||||
delegate void TracingValueChangedEventHandler(Windows::Foundation::Point value);
|
||||
|
||||
[Windows::UI::Xaml::Markup::ContentPropertyAttribute(Name = L"Equations")] public ref class Grapher sealed : public Windows::UI::Xaml::Controls::Control
|
||||
[Windows::UI::Xaml::Markup::ContentPropertyAttribute(Name = L"Equations")] public ref class Grapher sealed : public Windows::UI::Xaml::Controls::Control, public Windows::UI::Xaml::Data::INotifyPropertyChanged
|
||||
{
|
||||
public:
|
||||
event TracingValueChangedEventHandler ^ TracingValueChangedEvent;
|
||||
event TracingChangedEventHandler ^ TracingChangedEvent;
|
||||
virtual event Windows::UI::Xaml::Data::PropertyChangedEventHandler ^ PropertyChanged;
|
||||
|
||||
public:
|
||||
Grapher();
|
||||
|
@ -93,17 +94,22 @@ public
|
|||
#pragma endregion
|
||||
|
||||
// Pass active tracing turned on or off down to the renderer
|
||||
|
||||
property bool ActiveTracing
|
||||
{
|
||||
bool get()
|
||||
{
|
||||
return m_renderMain->ActiveTracing;
|
||||
return m_renderMain != nullptr && m_renderMain->ActiveTracing;
|
||||
}
|
||||
|
||||
void set(bool value)
|
||||
{
|
||||
m_renderMain->ActiveTracing = value;
|
||||
UpdateTracingChanged();
|
||||
if (m_renderMain != nullptr && m_renderMain->ActiveTracing != value)
|
||||
{
|
||||
m_renderMain->ActiveTracing = value;
|
||||
UpdateTracingChanged();
|
||||
PropertyChanged(this, ref new Windows::UI::Xaml::Data::PropertyChangedEventArgs(L"ActiveTracing"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue