Browse Source

fix typos

pull/9402/head
AtomCrafty 3 years ago
parent
commit
7e6f5403aa
  1. 5
      src/Avalonia.Diagnostics/Diagnostics/Conventions.cs
  2. 4
      src/Avalonia.Diagnostics/Diagnostics/DevToolsOptions.cs
  3. 2
      src/Avalonia.Diagnostics/Diagnostics/Screenshots/FilePickerHandler.cs
  4. 12
      src/Avalonia.Diagnostics/Diagnostics/ViewModels/MainViewModel.cs
  5. 10
      src/Avalonia.Diagnostics/Diagnostics/Views/ControlDetailsView.xaml
  6. 4
      src/Avalonia.Diagnostics/Diagnostics/Views/MainView.xaml

5
src/Avalonia.Diagnostics/Diagnostics/Convetions.cs → src/Avalonia.Diagnostics/Diagnostics/Conventions.cs

@ -1,11 +1,8 @@
using System; using System;
using System.Reflection;
using Avalonia.Controls;
using Avalonia.VisualTree;
namespace Avalonia.Diagnostics namespace Avalonia.Diagnostics
{ {
static class Convetions internal static class Conventions
{ {
public static string DefaultScreenshotsRoot => public static string DefaultScreenshotsRoot =>
System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyPictures, Environment.SpecialFolderOption.Create), System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyPictures, Environment.SpecialFolderOption.Create),

4
src/Avalonia.Diagnostics/Diagnostics/DevToolsOptions.cs

@ -36,11 +36,11 @@ namespace Avalonia.Diagnostics
public bool ShowImplementedInterfaces { get; set; } = true; public bool ShowImplementedInterfaces { get; set; } = true;
/// <summary> /// <summary>
/// Allow to customizze SreenshotHandler /// Allow to customize SreenshotHandler
/// </summary> /// </summary>
/// <remarks>Default handler is <see cref="Screenshots.FilePickerHandler"/></remarks> /// <remarks>Default handler is <see cref="Screenshots.FilePickerHandler"/></remarks>
public IScreenshotHandler ScreenshotHandler { get; set; } public IScreenshotHandler ScreenshotHandler { get; set; }
= Convetions.DefaultScreenshotHandler; = Conventions.DefaultScreenshotHandler;
/// <summary> /// <summary>
/// Gets or sets whether DevTools should use the dark mode theme /// Gets or sets whether DevTools should use the dark mode theme

2
src/Avalonia.Diagnostics/Diagnostics/Screenshots/FilePickerHandler.cs

@ -40,7 +40,7 @@ namespace Avalonia.Diagnostics.Screenshots
/// The default root folder is [Environment.SpecialFolder.MyPictures]/Screenshots. /// The default root folder is [Environment.SpecialFolder.MyPictures]/Screenshots.
/// </summary> /// </summary>
public string ScreenshotsRoot { get; } public string ScreenshotsRoot { get; }
= Convetions.DefaultScreenshotsRoot; = Conventions.DefaultScreenshotsRoot;
/// <summary> /// <summary>
/// SaveFilePicker Title /// SaveFilePicker Title

12
src/Avalonia.Diagnostics/Diagnostics/ViewModels/MainViewModel.cs

@ -96,7 +96,9 @@ namespace Avalonia.Diagnostics.ViewModels
changed = false; changed = false;
} }
if (changed) if (changed)
RaiseAndSetIfChanged(ref _shouldVisualizeDirtyRects, value); {
RaiseAndSetIfChanged(ref _shouldVisualizeDirtyRects, value);
}
} }
} }
@ -331,7 +333,7 @@ namespace Avalonia.Diagnostics.ViewModels
private set => RaiseAndSetIfChanged(ref _showImplementedInterfaces , value); private set => RaiseAndSetIfChanged(ref _showImplementedInterfaces , value);
} }
public void ToggleShowImplementedInterfaces(object parametr) public void ToggleShowImplementedInterfaces(object parameter)
{ {
ShowImplementedInterfaces = !ShowImplementedInterfaces; ShowImplementedInterfaces = !ShowImplementedInterfaces;
if (Content is TreePageViewModel viewModel) if (Content is TreePageViewModel viewModel)
@ -340,15 +342,15 @@ namespace Avalonia.Diagnostics.ViewModels
} }
} }
public bool ShowDettailsPropertyType public bool ShowDetailsPropertyType
{ {
get => _showPropertyType; get => _showPropertyType;
private set => RaiseAndSetIfChanged(ref _showPropertyType , value); private set => RaiseAndSetIfChanged(ref _showPropertyType , value);
} }
public void ToggleShowDettailsPropertyType(object paramter) public void ToggleShowDetailsPropertyType(object parameter)
{ {
ShowDettailsPropertyType = !ShowDettailsPropertyType; ShowDetailsPropertyType = !ShowDetailsPropertyType;
} }
} }
} }

10
src/Avalonia.Diagnostics/Diagnostics/Views/ControlDetailsView.xaml

@ -19,7 +19,7 @@
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<!-- <!--
When selecting the Application node, we need this trick to hide Layout Visualizer When selecting the Application node, we need this trick to hide Layout Visualizer
because when using the GridSplitter it sets the Witdth property of ColumnDefinition because when using the GridSplitter it sets the Width property of ColumnDefinition
(see https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Controls/GridSplitter.cs#L528) (see https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Controls/GridSplitter.cs#L528)
and if we hide the contents of the column, the space is not reclaimed and if we hide the contents of the column, the space is not reclaimed
(see discussion https://github.com/AvaloniaUI/Avalonia/discussions/6773). (see discussion https://github.com/AvaloniaUI/Avalonia/discussions/6773).
@ -62,15 +62,15 @@
<DataGridTextColumn Header="Value" Binding="{Binding Value}" /> <DataGridTextColumn Header="Value" Binding="{Binding Value}" />
<DataGridTextColumn Header="Type" Binding="{Binding Type}" <DataGridTextColumn Header="Type" Binding="{Binding Type}"
IsReadOnly="True" IsReadOnly="True"
IsVisible="{Binding !$parent[UserControl;2].DataContext.ShowDettailsPropertyType}" IsVisible="{Binding !$parent[UserControl;2].DataContext.ShowDetailsPropertyType}"
/> />
<DataGridTextColumn Header="Assinged Type" Binding="{Binding AssignedType, Converter={StaticResource GetTypeName}}" <DataGridTextColumn Header="Assigned Type" Binding="{Binding AssignedType, Converter={StaticResource GetTypeName}}"
IsReadOnly="True" IsReadOnly="True"
IsVisible="{Binding $parent[UserControl;2].DataContext.ShowDettailsPropertyType}" IsVisible="{Binding $parent[UserControl;2].DataContext.ShowDetailsPropertyType}"
/> />
<DataGridTextColumn Header="Property Type" Binding="{Binding PropertyType, Converter={StaticResource GetTypeName}}" <DataGridTextColumn Header="Property Type" Binding="{Binding PropertyType, Converter={StaticResource GetTypeName}}"
IsReadOnly="True" IsReadOnly="True"
IsVisible="{Binding $parent[UserControl;2].DataContext.ShowDettailsPropertyType}" IsVisible="{Binding $parent[UserControl;2].DataContext.ShowDetailsPropertyType}"
/> />
<DataGridTextColumn Header="Priority" Binding="{Binding Priority}" IsReadOnly="True" /> <DataGridTextColumn Header="Priority" Binding="{Binding Priority}" IsReadOnly="True" />
</DataGrid.Columns> </DataGrid.Columns>

4
src/Avalonia.Diagnostics/Diagnostics/Views/MainView.xaml

@ -53,10 +53,10 @@
IsEnabled="False" /> IsEnabled="False" />
</MenuItem.Icon> </MenuItem.Icon>
</MenuItem> </MenuItem>
<MenuItem Header="Split Property Type" Command="{Binding ToggleShowDettailsPropertyType}"> <MenuItem Header="Split Property Type" Command="{Binding ToggleShowDetailsPropertyType}">
<MenuItem.Icon> <MenuItem.Icon>
<CheckBox BorderThickness="0" <CheckBox BorderThickness="0"
IsChecked="{Binding ShowDettailsPropertyType}" IsChecked="{Binding ShowDetailsPropertyType}"
IsEnabled="False"/> IsEnabled="False"/>
</MenuItem.Icon> </MenuItem.Icon>

Loading…
Cancel
Save