Merge branch 'master' into features/themes
This commit is contained in:
Коммит
eb9e1e568b
|
@ -5,9 +5,9 @@
|
|||
<StyleInclude Source="avares://Avalonia.Themes.Default/DefaultTheme.xaml"/>
|
||||
<StyleInclude Source="avares://Avalonia.Themes.Default/Accents/BaseLight.xaml"/>
|
||||
<StyleInclude Source="resm:AvaloniaEdit.AvaloniaEdit.xaml?assembly=AvaloniaEdit" />
|
||||
<StyleInclude Source="resm:ICSharpCode.TreeView.Themes.TreeView.xaml?assembly=SharpTreeView" />
|
||||
<StyleInclude Source="resm:ICSharpCode.ILSpy.Controls.DockedPane.xaml" />
|
||||
<StyleInclude Source="resm:ICSharpCode.ILSpy.Controls.SearchBox.xaml" />
|
||||
<StyleInclude Source="avares://SharpTreeView/Themes/TreeView.xaml" />
|
||||
<StyleInclude Source="/Controls/DockedPane.xaml" />
|
||||
<StyleInclude Source="/Controls/SearchBox.xaml" />
|
||||
|
||||
<Style Selector="Window.DialogWindow" >
|
||||
<Setter Property="ShowInTaskbar" Value="False"/>
|
||||
|
|
|
@ -34,8 +34,8 @@ namespace ICSharpCode.ILSpy
|
|||
|
||||
public static class NavigationCommands
|
||||
{
|
||||
public static RoutedCommand BrowseBack { get; } = new RoutedCommand(nameof(BrowseBack), new KeyGesture { Modifiers = InputModifiers.Control, Key = Key.BrowserBack });
|
||||
public static RoutedCommand BrowseForward { get; } = new RoutedCommand(nameof(BrowseForward), new KeyGesture { Modifiers = InputModifiers.Control, Key = Key.BrowserForward });
|
||||
public static RoutedCommand BrowseBack { get; } = new NavigationCommand(nameof(BrowseBack), new KeyGesture { Modifiers = InputModifiers.Control, Key = Key.BrowserBack });
|
||||
public static RoutedCommand BrowseForward { get; } = new NavigationCommand(nameof(BrowseForward), new KeyGesture { Modifiers = InputModifiers.Control, Key = Key.BrowserForward });
|
||||
public static RoutedCommand Search { get; } = new RoutedCommand(nameof(Search), new KeyGesture { Modifiers = InputModifiers.Control | InputModifiers.Shift, Key = Key.F });
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
using System;
|
||||
using System.Windows.Input;
|
||||
using Avalonia.Input;
|
||||
using Avalonia.Interactivity;
|
||||
using AvaloniaEdit;
|
||||
|
||||
namespace ICSharpCode.ILSpy
|
||||
{
|
||||
/// <summary>
|
||||
/// Navigation command. CanExecuteChanged will get called when focused is changed.
|
||||
/// </summary>
|
||||
internal class NavigationCommand: RoutedCommand, ICommand
|
||||
{
|
||||
static EventHandler interactiveEventHandler;
|
||||
|
||||
static NavigationCommand()
|
||||
{
|
||||
InputElement.GotFocusEvent.AddClassHandler(typeof(InputElement), HandlePointerEvent);
|
||||
}
|
||||
|
||||
public NavigationCommand(string name, KeyGesture keyGesture) : base(name, keyGesture)
|
||||
{
|
||||
}
|
||||
|
||||
private static void HandlePointerEvent(object sender, RoutedEventArgs args)
|
||||
{
|
||||
interactiveEventHandler?.Invoke(sender, args);
|
||||
}
|
||||
|
||||
event EventHandler ICommand.CanExecuteChanged
|
||||
{
|
||||
add { interactiveEventHandler += value; }
|
||||
remove { interactiveEventHandler -= value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -2,14 +2,15 @@
|
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:ae="clr-namespace:AvaloniaEdit;assembly=AvaloniaEdit"
|
||||
Title="Message"
|
||||
Width="274" Height="400">
|
||||
Width="274" Height="400"
|
||||
x:Class="ICSharpCode.ILSpy.Controls.CustomDialog">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="40"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ae:TextEditor Name="content" Grid.Row="0" Margin="4"/>
|
||||
<TextBlock Name="content" Grid.Row="0" Margin="4" TextWrapping="Wrap"/>
|
||||
<ListBox Name="buttons" Grid.Row="1" BorderThickness="0" Padding="2">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace ICSharpCode.ILSpy.Controls
|
|||
{
|
||||
public sealed class CustomDialog : DialogWindow
|
||||
{
|
||||
TextEditor label;
|
||||
TextBlock label;
|
||||
ListBox buttons;
|
||||
int acceptButton;
|
||||
int cancelButton;
|
||||
|
@ -78,7 +78,7 @@ namespace ICSharpCode.ILSpy.Controls
|
|||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
this.buttons = this.FindControl<ListBox>("buttons");
|
||||
this.label = this.FindControl<TextEditor>("content");
|
||||
this.label = this.FindControl<TextBlock>("content");
|
||||
|
||||
this.ShowInTaskbar = false;
|
||||
this.WindowStartupLocation = WindowStartupLocation.CenterOwner;
|
||||
|
|
|
@ -29,51 +29,9 @@
|
|||
</StackPanel>
|
||||
</DataTemplate>
|
||||
-->
|
||||
<Styles.Resources>
|
||||
<SolidColorBrush x:Key="paneBorder">#828790</SolidColorBrush>
|
||||
</Styles.Resources>
|
||||
|
||||
<Style Selector="Button.CloseButtonStyle">
|
||||
<Setter Property="Background">
|
||||
<Setter.Value>
|
||||
<LinearGradientBrush EndPoint="0%,100%" StartPoint="0%,0%">
|
||||
<GradientStop Offset="0">
|
||||
<GradientStop.Color>
|
||||
<controls:ControlColor Color="243" />
|
||||
</GradientStop.Color>
|
||||
</GradientStop>
|
||||
|
||||
<GradientStop Offset="0.5">
|
||||
<GradientStop.Color>
|
||||
<controls:ControlColor Color="235" />
|
||||
</GradientStop.Color>
|
||||
</GradientStop>
|
||||
|
||||
<GradientStop Offset="0.5">
|
||||
<GradientStop.Color>
|
||||
<controls:ControlColor Color="221" />
|
||||
</GradientStop.Color>
|
||||
</GradientStop>
|
||||
|
||||
<GradientStop Offset="1">
|
||||
<GradientStop.Color>
|
||||
<controls:ControlColor Color="205" />
|
||||
</GradientStop.Color>
|
||||
</GradientStop>
|
||||
</LinearGradientBrush>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="BorderBrush">
|
||||
<Setter.Value>
|
||||
<SolidColorBrush>
|
||||
<SolidColorBrush.Color>
|
||||
<controls:ControlColor Color="150" />
|
||||
</SolidColorBrush.Color>
|
||||
</SolidColorBrush>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="Foreground" Value="{x:Static avalonia:SystemColors.ControlTextBrush}"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="Padding" Value="4"/>
|
||||
|
@ -81,7 +39,7 @@
|
|||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Grid>
|
||||
<Border x:Name="buttonBorder" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2" />
|
||||
<Border x:Name="buttonBorder" Background="{DynamicResource ThemeBackgroundBrush}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2" />
|
||||
<ContentPresenter Name="PART_ContentPresenter" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
|
@ -89,42 +47,12 @@
|
|||
</Setter>
|
||||
|
||||
</Style>
|
||||
<Style Selector="Button.CloseButtonStyle:pointerover /template/ Grid.Border#buttonBorder">
|
||||
<Setter Property="Background">
|
||||
<Setter.Value>
|
||||
<LinearGradientBrush EndPoint="0%,100%" StartPoint="0%,0%">
|
||||
<GradientStop Offset="0">
|
||||
<GradientStop.Color>
|
||||
<controls:ControlColor Color="250" Highlight="0.3"/>
|
||||
</GradientStop.Color>
|
||||
</GradientStop>
|
||||
<GradientStop Offset="1">
|
||||
<GradientStop.Color>
|
||||
<controls:ControlColor Color="224" Highlight="0.4"/>
|
||||
</GradientStop.Color>
|
||||
</GradientStop>
|
||||
</LinearGradientBrush>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style Selector="Button.CloseButtonStyle:pointerover">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ThemeControlHighlightMidBrush}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="Button.CloseButtonStyle:pressed /template/ Grid.Border#buttonBorder">
|
||||
<Setter Property="Background">
|
||||
<Setter.Value>
|
||||
<LinearGradientBrush EndPoint="0%,100%" StartPoint="0%,0%">
|
||||
<GradientStop Offset="0">
|
||||
<GradientStop.Color>
|
||||
<controls:ControlColor Color="224"/>
|
||||
</GradientStop.Color>
|
||||
</GradientStop>
|
||||
<GradientStop Offset="1">
|
||||
<GradientStop.Color>
|
||||
<controls:ControlColor Color="224" Highlight="0.4"/>
|
||||
</GradientStop.Color>
|
||||
</GradientStop>
|
||||
</LinearGradientBrush>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style Selector="Button.CloseButtonStyle:pressed">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ThemeControlHighlightHighBrush}" />
|
||||
</Style>
|
||||
|
||||
<!-- DockedPane -->
|
||||
|
@ -132,19 +60,18 @@
|
|||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Border BorderThickness="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness}" BorderBrush="{StaticResource paneBorder}">
|
||||
<Border BorderThickness="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness}" BorderBrush="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderBrush}">
|
||||
<DockPanel>
|
||||
<Border BorderThickness="0,0,0,0" BorderBrush="{StaticResource paneBorder}"
|
||||
Background="{x:Static avalonia:SystemColors.InactiveCaptionBrush}" DockPanel.Dock="Top">
|
||||
<Border BorderThickness="0,0,0,0"
|
||||
Background="{DynamicResource ThemeAccentBrush}" DockPanel.Dock="Top">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{TemplateBinding Title}" Margin="3,0"
|
||||
Foreground="{x:Static avalonia:SystemColors.InactiveCaptionTextBrush}" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{TemplateBinding Title}" Margin="3,0" VerticalAlignment="Center"/>
|
||||
<Button x:Name="PART_Close" Grid.Column="2" VerticalAlignment="Center" MinWidth="20" MinHeight="20" Width="20" Height="20" DockPanel.Dock="Right" Classes="CloseButtonStyle" ToolTip.Tip="Close" Margin="1">
|
||||
<Path x:Name="Path" Width="16" Height="16" Stretch="Fill" StrokeThickness="0.5" Stroke="#FF333333" Fill="#FF969696" Data="F1 M 0,1.3333L 1.33333,0L 4,2.6666L 6.6666,0 8,1.3333L 5.3333,4L 8,6.6666L 6.6666,8L 4,5.3333L 1.3333,8L 0,6.6666L 2.6666,4L 0,1.3333 Z " HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
|
||||
<Path x:Name="Path" Width="16" Height="16" Stretch="Fill" StrokeThickness="0.5" Stroke="{DynamicResource ThemeForegroundBrush}" Fill="{DynamicResource ThemeForegroundBrush}" Data="F1 M 0,1.3333L 1.33333,0L 4,2.6666L 6.6666,0 8,1.3333L 5.3333,4L 8,6.6666L 6.6666,8L 4,5.3333L 1.3333,8L 0,6.6666L 2.6666,4L 0,1.3333 Z " HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
@ -162,6 +89,5 @@
|
|||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource paneBorder}" />
|
||||
</Style>
|
||||
</Styles>
|
|
@ -1,6 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
x:Class="ICSharpCode.ILSpy.Controls.ResourceObjectTable">
|
||||
<Grid Margin="5,0,0,0">
|
||||
<!--
|
||||
<Grid.Resources>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
x:Class="ICSharpCode.ILSpy.Controls.ResourceStringTable"
|
||||
>
|
||||
<Grid Margin="5,0,0,0">
|
||||
<!--
|
||||
|
|
|
@ -28,6 +28,7 @@ using Avalonia.Media.Imaging;
|
|||
using System.ComponentModel;
|
||||
using Avalonia.Markup.Xaml.Converters;
|
||||
using Avalonia.Controls.Primitives;
|
||||
using Avalonia.Data.Converters;
|
||||
|
||||
namespace ICSharpCode.ILSpy.Controls
|
||||
{
|
||||
|
@ -41,6 +42,8 @@ namespace ICSharpCode.ILSpy.Controls
|
|||
|
||||
public static StyledProperty<IBrush> WatermarkColorProperty = AvaloniaProperty.Register<SearchBox, IBrush>(nameof(WatermarkColor));
|
||||
|
||||
public static readonly IValueConverter GridLengthConvert = new FuncValueConverter<double, GridLength>(n => new GridLength(n));
|
||||
|
||||
public static readonly StyledProperty<TimeSpan> UpdateDelayProperty =
|
||||
AvaloniaProperty.Register<SearchBox, TimeSpan>(nameof(UpdateDelay), TimeSpan.FromMilliseconds(200));
|
||||
|
||||
|
@ -48,7 +51,7 @@ namespace ICSharpCode.ILSpy.Controls
|
|||
|
||||
public SearchBox()
|
||||
{
|
||||
PseudoClass(TextProperty, t=>!string.IsNullOrEmpty(t), ":hastext");
|
||||
PseudoClass<SearchBox, string>(TextProperty, t=>!string.IsNullOrEmpty(t), ":hastext");
|
||||
}
|
||||
|
||||
#region Public Properties
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
xmlns:sys="clr-namespace:System;assembly=mscorlib">
|
||||
|
||||
<Style Selector="local|SearchBox">
|
||||
<Setter Property="Background" Value="White" />
|
||||
<Setter Property="BorderBrush" Value="{x:Static avalonia:SystemColors.ControlDarkBrush}" />
|
||||
<Setter Property="Foreground" Value="{x:Static avalonia:SystemColors.ControlTextBrush}" />
|
||||
<Setter Property="Background" Value="{DynamicResource ThemeBackgroundBrush}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ThemeBorderMidBrush}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource ThemeForegroundBrush}" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
|
@ -19,7 +19,7 @@
|
|||
<Grid x:Name="LayoutGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ActualHeight}" />
|
||||
<ColumnDefinition Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Bounds.Height, Converter={x:Static local:SearchBox.GridLengthConvert}}}" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ScrollViewer Grid.Column="0" HorizontalScrollBarVisibility="{TemplateBinding (ScrollViewer.HorizontalScrollBarVisibility)}"
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
Classes="DialogWindow"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
Width="300"
|
||||
Height="150">
|
||||
Height="150"
|
||||
x:Class="ICSharpCode.ILSpy.CreateListDialog">
|
||||
<Grid Margin="12,8">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:ICSharpCode.ILSpy"
|
||||
x:Class="ICSharpCode.ILSpy.DebugSteps"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="300" d:DesignWidth="300">
|
||||
<DockPanel>
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
<PackageReference Include="System.IO.Compression" Version="4.3.0" />
|
||||
<PackageReference Include="NuGet.Client" Version="4.2.0" />
|
||||
<PackageReference Include="Microsoft.DiaSymReader" Version="1.3.0" />
|
||||
<PackageReference Include="Avalonia" Version="0.7.1-build989-beta" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -42,28 +43,24 @@
|
|||
<ItemGroup>
|
||||
<Compile Update="**\*.xaml.cs">
|
||||
</Compile>
|
||||
<EmbeddedResource Include="**\*.xaml">
|
||||
<AvaloniaResource Include="**\*.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="**\*.xshd;**\*.resx;Assets\*;**\*.paml" Exclude="bin\**;obj\**;**\*.xproj;packages\**;@(EmbeddedResource)" />
|
||||
</AvaloniaResource>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="Images\*.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<EmbeddedResource Include="Images\ILSpy.png;Images\PrivateInternal.png;Images\Search.png;;Images\ClearSearch.png;">
|
||||
</EmbeddedResource>
|
||||
<AvaloniaResource Include="Images\ILSpy.png;Images\PrivateInternal.png;Images\Search.png;Images\ClearSearch.png;">
|
||||
</AvaloniaResource>
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="README.txt" />
|
||||
<EmbeddedResource Include="..\doc\*.txt" />
|
||||
<EmbeddedResource Include="**\*.xshd;**\*.resx;Assets\*;**\*.paml" Exclude="bin\**;obj\**;**\*.xproj;packages\**;@(EmbeddedResource)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
MinWidth="250"
|
||||
MinHeight="200"
|
||||
UseLayoutRounding="True"
|
||||
Icon="resm:ICSharpCode.ILSpy.Images.ILSpy.png?assembly=ILSpy.Core"
|
||||
Icon="/Images/ILSpy.png"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" d:DesignHeight="500" d:DesignWidth="500"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
|
||||
x:Class="ICSharpCode.ILSpy.MainWindow"
|
||||
|
@ -49,7 +49,7 @@
|
|||
<Separator />
|
||||
<CheckBox IsChecked="{Binding FilterSettings.ShowInternalApi}"
|
||||
ToolTip.Tip="Show internal types and members">
|
||||
<Image Width="16" Height="16" Source="resm:ICSharpCode.ILSpy.Images.PrivateInternal.png?assembly=ILSpy.Core" />
|
||||
<Image Width="16" Height="16" Source="/Images/PrivateInternal.png" />
|
||||
</CheckBox>
|
||||
<Separator />
|
||||
<DropDown Name="languageComboBox" Width="100"
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
MinHeight="250"
|
||||
Height="350"
|
||||
Width="480"
|
||||
x:Class="ICSharpCode.ILSpy.OpenListDialog"
|
||||
>
|
||||
<Grid Margin="12,8">
|
||||
<Grid.RowDefinitions>
|
||||
|
|
|
@ -22,7 +22,6 @@ using Mono.Cecil;
|
|||
using Avalonia.Input;
|
||||
using System;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.Input;
|
||||
using ICSharpCode.TreeView;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using ICSharpCode.ILSpy.Controls;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<UserControl
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
x:Class="ICSharpCode.ILSpy.Options.DecompilerSettingsPanel">
|
||||
<StackPanel Margin="10">
|
||||
<CheckBox IsChecked="{Binding UseDebugSymbols}">Use variable names from debug symbols, if available</CheckBox>
|
||||
<CheckBox IsChecked="{Binding ShowDebugInfo}">Show info from debug symbols, if available</CheckBox>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:ICSharpCode.ILSpy.Options">
|
||||
xmlns:local="clr-namespace:ICSharpCode.ILSpy.Options"
|
||||
x:Class="ICSharpCode.ILSpy.Options.DisplaySettingsPanel">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
|
@ -48,7 +49,7 @@
|
|||
<DropDownItem>23</DropDownItem>
|
||||
<DropDownItem>24</DropDownItem>
|
||||
</DropDown>
|
||||
<Border Grid.Row="1" Grid.ColumnSpan="4" BorderBrush="Black" BorderThickness="1" Background="White" Margin="3,5">
|
||||
<Border Grid.Row="1" Grid.ColumnSpan="4" BorderBrush="{DynamicResource ThemeControlHighlightHighBrush}" BorderThickness="1" Margin="3,5">
|
||||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="AaBbCcXxYyZz" FontFamily="{Binding SelectedFont}" FontSize="{Binding SelectedFontSize}" />
|
||||
</Border>
|
||||
</Grid>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
x:Class="ICSharpCode.ILSpy.Options.MiscSettingsPanel"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="300" d:DesignWidth="300">
|
||||
<StackPanel Margin="10">
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
Classes="DialogWindow"
|
||||
CanResize="True"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
Title="Options" Height="400" Width="500">
|
||||
Title="Options" Height="400" Width="500"
|
||||
x:Class="ICSharpCode.ILSpy.Options.OptionsDialog">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<UserControl x:Class="AvaloniaILSpy.SearchPane" xmlns="https://github.com/avaloniaui"
|
||||
<UserControl x:Class="ICSharpCode.ILSpy.Search.SearchPane" xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:ICSharpCode.ILSpy.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
|
@ -10,19 +10,19 @@
|
|||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Border BorderThickness="0,0,0,1" BorderBrush="{x:Static avalonia:SystemColors.ControlLightBrush}" Background="{x:Static avalonia:SystemColors.ControlBrush}">
|
||||
<Border BorderThickness="0,0,0,1" BorderBrush="{DynamicResource ThemeBorderLowBrush}" Background="{DynamicResource ThemeBackgroundBrush}}">
|
||||
<Grid Height="23">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<local:SearchBox x:Name="searchBox" DockPanel.Dock="Top" Grid.Column="0" Grid.Row="0" Margin="1"
|
||||
SearchIcon="resm:ICSharpCode.ILSpy.Images.Search.png?assembly=ILSpy.Core" ClearSearchIcon="resm:ICSharpCode.ILSpy.Images.ClearSearch.png?assembly=ILSpy.Core"
|
||||
SearchIcon="/Images/Search.png" ClearSearchIcon="/Images/ClearSearch.png"
|
||||
Text="{Binding SearchTerm, ElementName=searchPane}" ToolTip.Tip="Search" UpdateDelay="0:0:0.1"
|
||||
WatermarkColor="Gray" Watermark="Search for t:TypeName, m:Member or c:Constant; use exact match (=term), 'should not contain' (-term) or 'must contain' (+term); use /reg(ular)?Ex(pressions)?/ or both - t:/Type(Name)?/..." />
|
||||
<StackPanel Grid.Column="1" Grid.Row="0" Orientation="Horizontal">
|
||||
<TextBlock Margin="0,-1">_Search for:</TextBlock>
|
||||
<DropDown Width="100" Name="searchModeComboBox" Margin="1">
|
||||
<TextBlock VerticalAlignment="Center">Search for:</TextBlock>
|
||||
<DropDown Width="150" Name="searchModeComboBox" Margin="1">
|
||||
<DropDown.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:avalonia="clr-namespace:Avalonia;assembly=SharpTreeView"
|
||||
xmlns:ae="clr-namespace:AvaloniaEdit;assembly=AvaloniaEdit">
|
||||
xmlns:ae="clr-namespace:AvaloniaEdit;assembly=AvaloniaEdit"
|
||||
x:Class="ICSharpCode.ILSpy.TextView.DecompilerTextView">
|
||||
<Grid>
|
||||
<Border BorderThickness="1,1,0,1" BorderBrush="#FF828790">
|
||||
<Grid>
|
||||
|
|
|
@ -148,9 +148,6 @@ namespace ICSharpCode.ILSpy.TextView
|
|||
progressBar = this.FindControl<ProgressBar>("progressBar");
|
||||
cancelButton = this.FindControl<Button>("cancelButton");
|
||||
cancelButton.Click += cancelButton_Click;
|
||||
|
||||
textEditor.Foreground = SystemColors.InfoTextBrush;
|
||||
textEditor.Background = SystemColors.InfoBrush;
|
||||
}
|
||||
|
||||
void RemoveEditCommand(RoutedCommand command)
|
||||
|
|
|
@ -41,21 +41,7 @@ namespace ICSharpCode.ILSpy
|
|||
Logger.Sink = new ProxyLogSink(Logger.Sink);
|
||||
#endif
|
||||
|
||||
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
|
||||
{
|
||||
result.UseAvaloniaNative(null, opts =>
|
||||
{
|
||||
opts.UseDeferredRendering = false;
|
||||
opts.UseGpu = true;
|
||||
}).UseSkia();
|
||||
}
|
||||
else
|
||||
{
|
||||
result.UsePlatformDetect();
|
||||
}
|
||||
|
||||
return result;
|
||||
return result.UsePlatformDetect();
|
||||
}
|
||||
|
||||
class ProxyLogSink : ILogSink
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Layout;
|
||||
using Avalonia.Media;
|
||||
using System.Diagnostics;
|
||||
|
||||
|
@ -22,7 +23,6 @@ namespace ICSharpCode.TreeView
|
|||
get { return TemplatedParent as SharpTreeNodeView; }
|
||||
}
|
||||
|
||||
|
||||
public override void Render(DrawingContext dc)
|
||||
{
|
||||
if (NodeView.Node == null) {
|
||||
|
@ -31,20 +31,21 @@ namespace ICSharpCode.TreeView
|
|||
Debug.WriteLine($"LinesRenderer.OnRender() called with DataContext={NodeView.DataContext}");
|
||||
return;
|
||||
}
|
||||
|
||||
var indent = NodeView.CalculateIndent();
|
||||
var p = new Point(indent + 4.5, 0);
|
||||
|
||||
if (!NodeView.Node.IsRoot || NodeView.ParentTreeView.ShowRootExpander) {
|
||||
dc.DrawLine(pen, new Point(p.X, Height / 2), new Point(p.X + 10, Height / 2));
|
||||
dc.DrawLine(pen, new Point(p.X, Bounds.Height / 2), new Point(p.X + 10, Bounds.Height / 2));
|
||||
}
|
||||
|
||||
if (NodeView.Node.IsRoot) return;
|
||||
|
||||
if (NodeView.Node.IsLast) {
|
||||
dc.DrawLine(pen, p, new Point(p.X, Height / 2));
|
||||
dc.DrawLine(pen, p, new Point(p.X, Bounds.Height / 2));
|
||||
}
|
||||
else {
|
||||
dc.DrawLine(pen, p, new Point(p.X, Height));
|
||||
dc.DrawLine(pen, p, new Point(p.X, Bounds.Height));
|
||||
}
|
||||
|
||||
var current = NodeView.Node;
|
||||
|
@ -53,7 +54,7 @@ namespace ICSharpCode.TreeView
|
|||
current = current.Parent;
|
||||
if (p.X < 0) break;
|
||||
if (!current.IsLast) {
|
||||
dc.DrawLine(pen, p, new Point(p.X, Height));
|
||||
dc.DrawLine(pen, p, new Point(p.X, Bounds.Height));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -257,9 +257,6 @@ namespace ICSharpCode.TreeView
|
|||
if (doNotScrollOnExpanding)
|
||||
return;
|
||||
|
||||
// TODO: make sure node is materialized
|
||||
return;
|
||||
|
||||
SharpTreeNode lastVisibleChild = node;
|
||||
while (true) {
|
||||
SharpTreeNode tmp = lastVisibleChild.Children.LastOrDefault(c => c.IsVisible);
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<DebugSymbols>true</DebugSymbols>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Themes\TreeView.xaml" />
|
||||
<AvaloniaResource Include="Themes\TreeView.xaml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Consts.cs" />
|
||||
|
@ -48,5 +48,6 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\AvaloniaEdit\src\AvaloniaEdit\AvaloniaEdit.csproj" />
|
||||
<PackageReference Include="Avalonia" Version="0.7.1-build989-beta" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -189,7 +189,7 @@
|
|||
<Style Selector="local|SharpTreeViewItem[IsSelected=true] /template/ local|SharpTreeNodeView#nodeView" >
|
||||
<Setter
|
||||
Property="TextBackground"
|
||||
Value="{DynamicResource ThemeAccentBrush4}}" />
|
||||
Value="{DynamicResource ThemeAccentBrush4}" />
|
||||
<Setter
|
||||
Property="Foreground"
|
||||
Value="{x:Static avalonia:SystemColors.HighlightTextBrush}" />
|
||||
|
|
Загрузка…
Ссылка в новой задаче