support ctrl+- and + (#882)
This commit is contained in:
@@ -3883,10 +3883,6 @@
|
||||
<value>Reset View</value>
|
||||
<comment>Screen reader prompt for the reset zoom button.</comment>
|
||||
</data>
|
||||
<data name="zoomInButton.[using:CalculatorApp.Common]KeyboardShortcutManager.VirtualKeyControlChord" xml:space="preserve">
|
||||
<value>Add</value>
|
||||
<comment>{Locked}This is the shortcut for the zoom in button.</comment>
|
||||
</data>
|
||||
<data name="zoomInButton.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
|
||||
<value>Zoom In</value>
|
||||
<comment>This is the tool tip automation name for the Calculator zoom in button.</comment>
|
||||
@@ -3895,10 +3891,6 @@
|
||||
<value>Zoom In</value>
|
||||
<comment>Screen reader prompt for the zoom in button.</comment>
|
||||
</data>
|
||||
<data name="zoomOutButton.[using:CalculatorApp.Common]KeyboardShortcutManager.VirtualKeyControlChord" xml:space="preserve">
|
||||
<value>Subtract</value>
|
||||
<comment>{Locked}This is the shortcut for the zoom out button.</comment>
|
||||
</data>
|
||||
<data name="zoomOutButton.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
|
||||
<value>Zoom Out</value>
|
||||
<comment>This is the tool tip automation name for the Calculator zoom out button.</comment>
|
||||
|
@@ -423,8 +423,8 @@
|
||||
Style="{ThemeResource GraphControlCommandPanel}"
|
||||
RequestedTheme="Light">
|
||||
<StackPanel Orientation="Vertical">
|
||||
|
||||
<RepeatButton x:Uid="zoomInButton"
|
||||
<RepeatButton x:Name="ZoomInButton"
|
||||
x:Uid="zoomInButton"
|
||||
MinHeight="40"
|
||||
HorizontalAlignment="Stretch"
|
||||
Style="{ThemeResource ThemedGraphRepeatButtonStyle}"
|
||||
@@ -435,9 +435,13 @@
|
||||
<FontIcon FontFamily="{StaticResource SymbolThemeFontFamily}"
|
||||
FontSize="14"
|
||||
Glyph=""/>
|
||||
<RepeatButton.KeyboardAccelerators>
|
||||
<KeyboardAccelerator Key="Add" Modifiers="Control"/>
|
||||
</RepeatButton.KeyboardAccelerators>
|
||||
</RepeatButton>
|
||||
|
||||
<RepeatButton x:Uid="zoomOutButton"
|
||||
<RepeatButton x:Name="ZoomOutButton"
|
||||
x:Uid="zoomOutButton"
|
||||
MinHeight="40"
|
||||
HorizontalAlignment="Stretch"
|
||||
Style="{ThemeResource ThemedGraphRepeatButtonStyle}"
|
||||
@@ -447,6 +451,9 @@
|
||||
<FontIcon FontFamily="{StaticResource SymbolThemeFontFamily}"
|
||||
FontSize="14"
|
||||
Glyph=""/>
|
||||
<RepeatButton.KeyboardAccelerators>
|
||||
<KeyboardAccelerator Key="Subtract" Modifiers="Control"/>
|
||||
</RepeatButton.KeyboardAccelerators>
|
||||
</RepeatButton>
|
||||
|
||||
<Button x:Uid="zoomResetButton"
|
||||
|
@@ -51,7 +51,7 @@ constexpr auto sc_ViewModelPropertyName = L"ViewModel";
|
||||
|
||||
DEPENDENCY_PROPERTY_INITIALIZATION(GraphingCalculator, IsSmallState);
|
||||
|
||||
GraphingCalculator::GraphingCalculator()
|
||||
GraphingCalculator::GraphingCalculator()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
@@ -66,6 +66,17 @@ GraphingCalculator::GraphingCalculator()
|
||||
|
||||
// And when the actual trace value changes
|
||||
GraphingControl->TracingValueChangedEvent += ref new TracingValueChangedEventHandler(this, &GraphingCalculator::OnTracePointChanged);
|
||||
|
||||
// OemMinus and OemAdd aren't declared in the VirtualKey enum, we can't add this accelerator XAML-side
|
||||
auto virtualKey = ref new KeyboardAccelerator();
|
||||
virtualKey->Key = (VirtualKey)187; //OemMinus key
|
||||
virtualKey->Modifiers = VirtualKeyModifiers::Control;
|
||||
ZoomOutButton->KeyboardAccelerators->Append(virtualKey);
|
||||
|
||||
virtualKey = ref new KeyboardAccelerator();
|
||||
virtualKey->Key = (VirtualKey)189; //OemAdd key
|
||||
virtualKey->Modifiers = VirtualKeyModifiers::Control;
|
||||
ZoomInButton->KeyboardAccelerators->Append(virtualKey);
|
||||
}
|
||||
|
||||
void GraphingCalculator::OnShowTracePopupChanged(bool newValue)
|
||||
|
Reference in New Issue
Block a user