diff --git a/src/GuiApp/Avalonia/FileTime.GuiApp.Font/Services/FontService.cs b/src/GuiApp/Avalonia/FileTime.GuiApp.Font/Services/FontService.cs index 6b18c5f..0c35124 100644 --- a/src/GuiApp/Avalonia/FileTime.GuiApp.Font/Services/FontService.cs +++ b/src/GuiApp/Avalonia/FileTime.GuiApp.Font/Services/FontService.cs @@ -28,7 +28,7 @@ public class FontService : IFontService public string? GetMainFont() { - var installedFonts = FontManager.Current.GetInstalledFontFamilyNames().ToList(); + var installedFonts = FontManager.Current.SystemFonts.Select(f => f.Name).ToList(); return _fontConfiguration.CurrentValue.Main.Find(installedFonts.Contains); } } \ No newline at end of file diff --git a/src/GuiApp/Avalonia/FileTime.GuiApp/Resources/Styles.axaml b/src/GuiApp/Avalonia/FileTime.GuiApp/Resources/Styles.axaml index 54a4d7f..76dbd1b 100644 --- a/src/GuiApp/Avalonia/FileTime.GuiApp/Resources/Styles.axaml +++ b/src/GuiApp/Avalonia/FileTime.GuiApp/Resources/Styles.axaml @@ -36,7 +36,7 @@ - + diff --git a/src/GuiApp/Avalonia/FileTime.GuiApp/Services/SystemClipboardService.cs b/src/GuiApp/Avalonia/FileTime.GuiApp/Services/SystemClipboardService.cs index 9a07788..4fa8790 100644 --- a/src/GuiApp/Avalonia/FileTime.GuiApp/Services/SystemClipboardService.cs +++ b/src/GuiApp/Avalonia/FileTime.GuiApp/Services/SystemClipboardService.cs @@ -1,3 +1,5 @@ +using Avalonia; +using Avalonia.Input.Platform; using FileTime.App.Core.Services; namespace FileTime.GuiApp.Services; @@ -6,7 +8,8 @@ public class SystemClipboardService : ISystemClipboardService { public async Task CopyToClipboardAsync(string text) { - if (global::Avalonia.Application.Current?.Clipboard is { } clipboard) + var clipboard = AvaloniaLocator.Current.GetService(); + if (clipboard is not null) { await clipboard.SetTextAsync(text); } diff --git a/src/GuiApp/Avalonia/FileTime.GuiApp/Services/WindowsContextMenuProvider.cs b/src/GuiApp/Avalonia/FileTime.GuiApp/Services/WindowsContextMenuProvider.cs index a8c259e..6ae001f 100644 --- a/src/GuiApp/Avalonia/FileTime.GuiApp/Services/WindowsContextMenuProvider.cs +++ b/src/GuiApp/Avalonia/FileTime.GuiApp/Services/WindowsContextMenuProvider.cs @@ -88,12 +88,16 @@ public class WindowsContextMenuProvider : IContextMenuProvider } else if (shellKey.GetValue("ExtendedSubCommandsKey") is string extendedCommands) { - var rootMenu = new MenuItem() {Header = text, Icon = image}; var rootMenuItems = new List(); ProcessRegistryKey(Registry.ClassesRoot.OpenSubKey(extendedCommands), rootMenuItems, folderPath); - rootMenu.Items = rootMenuItems.ToArray(); + var rootMenu = new MenuItem {Header = text, Icon = image}; + foreach (var item in rootMenuItems) + { + rootMenu.Items.Add(item); + } + menuItems.Add(rootMenu); } } diff --git a/src/GuiApp/Avalonia/FileTime.GuiApp/Views/FrequencyNavigation.axaml b/src/GuiApp/Avalonia/FileTime.GuiApp/Views/FrequencyNavigation.axaml index 5021322..962746e 100644 --- a/src/GuiApp/Avalonia/FileTime.GuiApp/Views/FrequencyNavigation.axaml +++ b/src/GuiApp/Avalonia/FileTime.GuiApp/Views/FrequencyNavigation.axaml @@ -22,7 +22,7 @@ diff --git a/src/GuiApp/Avalonia/FileTime.GuiApp/Views/ItemView.axaml b/src/GuiApp/Avalonia/FileTime.GuiApp/Views/ItemView.axaml index ff91d41..20ff9f6 100644 --- a/src/GuiApp/Avalonia/FileTime.GuiApp/Views/ItemView.axaml +++ b/src/GuiApp/Avalonia/FileTime.GuiApp/Views/ItemView.axaml @@ -1,97 +1,153 @@ - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - - - - - + + + + + + + - - - - - + + + + + - - - + + + - - - - - - + + + + + + \ No newline at end of file diff --git a/src/GuiApp/Avalonia/FileTime.GuiApp/Views/MainWindow.axaml b/src/GuiApp/Avalonia/FileTime.GuiApp/Views/MainWindow.axaml index d156d64..ed7b0e4 100644 --- a/src/GuiApp/Avalonia/FileTime.GuiApp/Views/MainWindow.axaml +++ b/src/GuiApp/Avalonia/FileTime.GuiApp/Views/MainWindow.axaml @@ -88,7 +88,7 @@ + ItemsSource="{Binding AppState.RootDriveInfos.Collection}"> + ItemsSource="{Binding AppState.Places}"> - + @@ -295,7 +295,7 @@ Background="{DynamicResource ContainerBackgroundColor}" CornerRadius="10"> - + + ItemsSource="{Binding AppState.Tabs}"> @@ -363,7 +363,7 @@ AutoScrollToSelectedItem="True" Classes="ContentListView" IsTabStop="True" - Items="{Binding AppState.SelectedTab^.ParentsChildrenCollection.Collection}" + ItemsSource="{Binding AppState.SelectedTab^.ParentsChildrenCollection.Collection}" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Visible"> @@ -408,7 +408,7 @@ AutoScrollToSelectedItem="True" Classes="ContentListView" IsTabStop="True" - Items="{Binding AppState.SelectedTab^.CurrentItemsCollection.Collection}" + ItemsSource="{Binding AppState.SelectedTab^.CurrentItemsCollection.Collection}" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Visible" SelectedItem="{Binding AppState.SelectedTab^.CurrentSelectedItem^}"> @@ -451,7 +451,7 @@ AutoScrollToSelectedItem="True" Classes="ContentListView" IsVisible="{Binding AppState.SelectedTab^.SelectedsChildrenCollection.Collection.Count, Converter={StaticResource NotEqualsConverter}, ConverterParameter=0}" - Items="{Binding AppState.SelectedTab^.SelectedsChildrenCollection.Collection}"> + ItemsSource="{Binding AppState.SelectedTab^.SelectedsChildrenCollection.Collection}"> @@ -483,7 +483,7 @@ + ItemsSource="{Binding AppState.SelectedTab^.CurrentSelectedItem^.BaseItem.Exceptions^}"> + ItemsSource="{Binding AppState.PopupTexts}">