Frequency navigation
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"Serilog": {
|
||||
"MinimumLevel": {
|
||||
"Default": "Debug",
|
||||
"Default": "Verbose",
|
||||
"Override": {
|
||||
"Microsoft": "Information",
|
||||
"System": "Warning"
|
||||
|
||||
@@ -18,6 +18,8 @@ public class ToastMessageSink : ILogEventSink
|
||||
if (logEvent.Level >= LogEventLevel.Error)
|
||||
{
|
||||
var message = logEvent.RenderMessage();
|
||||
if (logEvent.Exception is not null)
|
||||
message += $" {logEvent.Exception.Message}";
|
||||
dialogService.ShowToastMessage(message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,6 +40,21 @@
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style Selector="ListBox.CommandPalette">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||
</Style>
|
||||
<Style Selector="ListBox.CommandPalette > ListBoxItem">
|
||||
<Setter Property="Margin" Value="0" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||
</Style>
|
||||
<Style Selector="ListBox.CommandPalette > ListBoxItem[IsSelected=true] TextBlock">
|
||||
<Setter Property="Foreground" Value="{DynamicResource SelectedItemForegroundBrush}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="Grid.SidebarContainerPresenter">
|
||||
<Setter Property="Background" Value="#01000000" />
|
||||
</Style>
|
||||
|
||||
@@ -9,21 +9,28 @@
|
||||
d:DesignWidth="800"
|
||||
x:CompileBindings="True"
|
||||
x:DataType="viewModels:IFrequencyNavigationViewModel"
|
||||
Background="{DynamicResource ContainerBackgroundColor}"
|
||||
mc:Ignorable="d">
|
||||
<UserControl.Styles>
|
||||
<StyleInclude Source="avares://FileTime.GuiApp/Resources/Styles.axaml" />
|
||||
</UserControl.Styles>
|
||||
<Grid RowDefinitions="Auto,*">
|
||||
<TextBox
|
||||
Focusable="True"
|
||||
KeyDown="Search_OnKeyDown"
|
||||
Text="{Binding SearchText, Mode=TwoWay}" />
|
||||
<ItemsRepeater
|
||||
<ListBox
|
||||
Grid.Row="1"
|
||||
Items="{Binding FilteredMatches}">
|
||||
<ItemsRepeater.ItemTemplate>
|
||||
Classes="CommandPalette"
|
||||
Items="{Binding FilteredMatches}"
|
||||
SelectedItem="{Binding SelectedItem}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate x:DataType="x:String">
|
||||
<Grid Margin="5">
|
||||
<TextBlock Text="{Binding}" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsRepeater.ItemTemplate>
|
||||
</ItemsRepeater>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -26,5 +26,9 @@ public partial class FrequencyNavigation : UserControl
|
||||
{
|
||||
viewModel.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
viewModel.HandleKeyDown(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -719,12 +719,13 @@
|
||||
|
||||
<Border
|
||||
DataContext="{Binding FrequencyNavigationService.CurrentModal}"
|
||||
Margin="100"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Background="{DynamicResource BarelyTransparentBackgroundColor}"
|
||||
IsVisible="{Binding ShowWindow^, FallbackValue=False}">
|
||||
<local:FrequencyNavigation />
|
||||
<Grid Margin="100">
|
||||
<local:FrequencyNavigation />
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user