Skip to content

Commit

Permalink
[FZ Editor] Edit dialog UX fixes (#10734)
Browse files Browse the repository at this point in the history
* Updates to UI

* Handle enter key

* Focus visual fix

* Fix

Co-authored-by: Niels Laute <niels9001@hotmail.com>
  • Loading branch information
niels9001 and Niels Laute committed Apr 20, 2021
1 parent 9b8970f commit 0e64071
Show file tree
Hide file tree
Showing 6 changed files with 261 additions and 139 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
</AdditionalFiles>
</ItemGroup>
<ItemGroup>
<PackageReference Include="ModernWpfUI" Version="0.9.3" />
<PackageReference Include="ModernWpfUI" Version="0.9.4" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
335 changes: 205 additions & 130 deletions src/modules/fancyzones/editor/FancyZonesEditor/MainWindow.xaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -421,5 +421,14 @@ private void Dialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs ar
{
_openedDialog = null;
}

private void EditDialogNumberBox_KeyDown(object sender, KeyEventArgs e)
{
// Making sure that pressing Enter when changing values in a NumberBox will not close the edit dialog.
if (e.Key == Key.Enter)
{
e.Handled = true;
}
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@
<value>Custom layout creator</value>
</data>
<data name="Distance_adjacent_zones" xml:space="preserve">
<value>Distance to highlight adjacent zones</value>
<value>Highlight distance</value>
<comment>Distance of when an adjacent zone should light up when the window is close to it</comment>
</data>
<data name="Edit_Layout" xml:space="preserve">
<value>Edit layout</value>
Expand Down Expand Up @@ -343,10 +344,20 @@
<value>Splitter:</value>
<comment>Title for concept: A segmenter visual for splitting one item into two. This would be the vertical line</comment>
</data>
<data name="QuickKey_Select" xml:space="preserve">
<value>Select a key to quickly apply the layout (Win + Ctrl + Alt + key)</value>
<data name="QuickKey_Description" xml:space="preserve">
<value>Press Win + Ctrl + Alt + selected key to apply this layout</value>
</data>
<data name="Quick_Key_None" xml:space="preserve">
<value>None</value>
</data>
<data name="Number_of_zones" xml:space="preserve">
<value>Number of zones</value>
</data>
<data name="Pixels" xml:space="preserve">
<value>px</value>
<comment>Abbreviation of pixels</comment>
</data>
<data name="QuickKey_Title" xml:space="preserve">
<value>Layout shortcut</value>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<Setter Property="VerticalContentAlignment" Value="Top" />
<Setter Property="FontFamily" Value="{DynamicResource ContentControlThemeFontFamily}" />
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
<Setter Property="MinWidth" Value="120" />
<Setter Property="MinWidth" Value="0" />
<Setter Property="FocusVisualStyle" Value="{DynamicResource {x:Static SystemParameters.FocusVisualStyleKey}}" />
<Setter Property="ui:FocusVisualHelper.UseSystemFocusVisuals" Value="{DynamicResource UseSystemFocusVisuals}" />
<Setter Property="ui:FocusVisualHelper.FocusVisualMargin" Value="0" />
Expand Down

0 comments on commit 0e64071

Please sign in to comment.