FileMenu.axaml.cs 693 B

1234567891011121314151617181920212223242526272829
  1. using System.Runtime.InteropServices;
  2. using Avalonia.Media;
  3. using PicView.Avalonia.CustomControls;
  4. namespace PicView.Avalonia.Views.UC.Menus;
  5. public partial class FileMenu : AnimatedMenu
  6. {
  7. public FileMenu()
  8. {
  9. InitializeComponent();
  10. Loaded += (_, _) =>
  11. {
  12. if (Settings.Theme.GlassTheme)
  13. {
  14. }
  15. else if (!Settings.Theme.Dark)
  16. {
  17. TopBorder.Background = Brushes.White;
  18. }
  19. if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
  20. {
  21. OpenWithButton.IsEnabled = false;
  22. PrintButton.IsEnabled = false;
  23. }
  24. };
  25. }
  26. }