Gui loading background
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
<ResourceDictionary xmlns="https://github.com/avaloniaui"
|
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
|
||||||
<LinearGradientBrush x:Key="ContentSeparatorBrush">
|
<LinearGradientBrush x:Key="ContentSeparatorBrush">
|
||||||
<GradientStop Color="#0093a1a1" Offset="0" />
|
<GradientStop Color="#0093a1a1" Offset="0" />
|
||||||
<GradientStop Color="#93a1a1" Offset="0.5" />
|
<GradientStop Color="#93a1a1" Offset="0.5" />
|
||||||
@@ -15,36 +14,29 @@
|
|||||||
|
|
||||||
|
|
||||||
<SolidColorBrush Color="{DynamicResource AppBackgroundColor}" x:Key="AppBackgroundBrush" />
|
<SolidColorBrush Color="{DynamicResource AppBackgroundColor}" x:Key="AppBackgroundBrush" />
|
||||||
|
<SolidColorBrush Color="{DynamicResource AppLoadingBackgroundColor}" x:Key="AppLoadingBackgroundBrush" />
|
||||||
<SolidColorBrush Color="{DynamicResource ContainerBackgroundColor}" x:Key="ContainerBackgroundBrush" />
|
<SolidColorBrush Color="{DynamicResource ContainerBackgroundColor}" x:Key="ContainerBackgroundBrush" />
|
||||||
<SolidColorBrush Color="{DynamicResource TransparentContainerBackgroundColor}"
|
<SolidColorBrush Color="{DynamicResource TransparentContainerBackgroundColor}" x:Key="TransparentContainerBackgroundBrush" />
|
||||||
x:Key="TransparentContainerBackgroundBrush" />
|
|
||||||
|
|
||||||
<SolidColorBrush Color="{DynamicResource ItemBackgroundColor}" x:Key="ItemBackgroundBrush" />
|
<SolidColorBrush Color="{DynamicResource ItemBackgroundColor}" x:Key="ItemBackgroundBrush" />
|
||||||
<SolidColorBrush Color="{DynamicResource AlternativeItemBackgroundColor}"
|
<SolidColorBrush Color="{DynamicResource AlternativeItemBackgroundColor}" x:Key="AlternativeItemBackgroundBrush" />
|
||||||
x:Key="AlternativeItemBackgroundBrush" />
|
|
||||||
<SolidColorBrush Color="{DynamicResource SelectedItemBackgroundColor}" x:Key="SelectedItemBackgroundBrush" />
|
<SolidColorBrush Color="{DynamicResource SelectedItemBackgroundColor}" x:Key="SelectedItemBackgroundBrush" />
|
||||||
<SolidColorBrush Color="{DynamicResource MarkedItemBackgroundColor}" x:Key="MarkedItemBackgroundBrush" />
|
<SolidColorBrush Color="{DynamicResource MarkedItemBackgroundColor}" x:Key="MarkedItemBackgroundBrush" />
|
||||||
<SolidColorBrush Color="{DynamicResource MarkedSelectedItemBackgroundColor}"
|
<SolidColorBrush Color="{DynamicResource MarkedSelectedItemBackgroundColor}" x:Key="MarkedSelectedItemBackgroundBrush" />
|
||||||
x:Key="MarkedSelectedItemBackgroundBrush" />
|
<SolidColorBrush Color="{DynamicResource MarkedAlternativeItemBackgroundColor}" x:Key="MarkedAlternativeItemBackgroundBrush" />
|
||||||
<SolidColorBrush Color="{DynamicResource MarkedAlternativeItemBackgroundColor}"
|
|
||||||
x:Key="MarkedAlternativeItemBackgroundBrush" />
|
|
||||||
|
|
||||||
<SolidColorBrush Color="{DynamicResource ForegroundColor}" x:Key="ForegroundBrush" />
|
<SolidColorBrush Color="{DynamicResource ForegroundColor}" x:Key="ForegroundBrush" />
|
||||||
<SolidColorBrush Color="{DynamicResource AccentColor}" x:Key="AccentBrush" />
|
<SolidColorBrush Color="{DynamicResource AccentColor}" x:Key="AccentBrush" />
|
||||||
<SolidColorBrush Color="{DynamicResource AccentComplementColor}" x:Key="AccentComplementBrush" />
|
<SolidColorBrush Color="{DynamicResource AccentComplementColor}" x:Key="AccentComplementBrush" />
|
||||||
<SolidColorBrush Color="{DynamicResource LightForegroundColor}" x:Key="LightForegroundBrush" />
|
<SolidColorBrush Color="{DynamicResource LightForegroundColor}" x:Key="LightForegroundBrush" />
|
||||||
<SolidColorBrush Color="{DynamicResource AlternativeItemForegroundColor}"
|
<SolidColorBrush Color="{DynamicResource AlternativeItemForegroundColor}" x:Key="AlternativeItemForegroundBrush" />
|
||||||
x:Key="AlternativeItemForegroundBrush" />
|
|
||||||
<SolidColorBrush Color="{DynamicResource SelectedItemForegroundColor}" x:Key="SelectedItemForegroundBrush" />
|
<SolidColorBrush Color="{DynamicResource SelectedItemForegroundColor}" x:Key="SelectedItemForegroundBrush" />
|
||||||
<SolidColorBrush Color="{DynamicResource MarkedItemForegroundColor}" x:Key="MarkedItemForegroundBrush" />
|
<SolidColorBrush Color="{DynamicResource MarkedItemForegroundColor}" x:Key="MarkedItemForegroundBrush" />
|
||||||
<SolidColorBrush Color="{DynamicResource MarkedAlternativeItemForegroundColor}"
|
<SolidColorBrush Color="{DynamicResource MarkedAlternativeItemForegroundColor}" x:Key="MarkedAlternativeItemForegroundBrush" />
|
||||||
x:Key="MarkedAlternativeItemForegroundBrush" />
|
<SolidColorBrush Color="{DynamicResource MarkedSelectedItemForegroundColor}" x:Key="MarkedSelectedItemForegroundBrush" />
|
||||||
<SolidColorBrush Color="{DynamicResource MarkedSelectedItemForegroundColor}"
|
|
||||||
x:Key="MarkedSelectedItemForegroundBrush" />
|
|
||||||
|
|
||||||
<SolidColorBrush Color="{DynamicResource ErrorColor}" x:Key="ErrorBrush" />
|
<SolidColorBrush Color="{DynamicResource ErrorColor}" x:Key="ErrorBrush" />
|
||||||
|
|
||||||
|
|
||||||
<SolidColorBrush Color="{DynamicResource SelectedItemBackgroundColor}"
|
<SolidColorBrush Color="{DynamicResource SelectedItemBackgroundColor}" x:Key="SystemControlHighlightListAccentLowBrush" />
|
||||||
x:Key="SystemControlHighlightListAccentLowBrush" />
|
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<ResourceDictionary xmlns="https://github.com/avaloniaui"
|
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
|
||||||
|
|
||||||
<Color x:Key="AppBackgroundColor">#E7073642</Color>
|
<Color x:Key="AppBackgroundColor">#E7073642</Color>
|
||||||
|
<Color x:Key="AppLoadingBackgroundColor">#80073642</Color>
|
||||||
<Color x:Key="ContainerBackgroundColor">#083e4c</Color>
|
<Color x:Key="ContainerBackgroundColor">#083e4c</Color>
|
||||||
<Color x:Key="TransparentContainerBackgroundColor">#D0083e4c</Color>
|
<Color x:Key="TransparentContainerBackgroundColor">#D0083e4c</Color>
|
||||||
<Color x:Key="BarelyTransparentBackgroundColor">#80083e4c</Color>
|
<Color x:Key="BarelyTransparentBackgroundColor">#80083e4c</Color>
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
using Avalonia.Controls;
|
||||||
using DeclarativeProperty;
|
using DeclarativeProperty;
|
||||||
|
|
||||||
namespace FileTime.GuiApp.App.ViewModels;
|
namespace FileTime.GuiApp.App.ViewModels;
|
||||||
@@ -8,4 +9,5 @@ public interface IMainWindowViewModelBase
|
|||||||
bool Loading { get; }
|
bool Loading { get; }
|
||||||
IObservable<string?> MainFont { get; }
|
IObservable<string?> MainFont { get; }
|
||||||
DeclarativeProperty<string> FatalError { get; }
|
DeclarativeProperty<string> FatalError { get; }
|
||||||
|
IReadOnlyList<WindowTransparencyLevel> TransparencyLevelHint { get; }
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
using System.Reactive.Subjects;
|
using System.Reactive.Subjects;
|
||||||
|
using Avalonia.Controls;
|
||||||
using DeclarativeProperty;
|
using DeclarativeProperty;
|
||||||
|
|
||||||
namespace FileTime.GuiApp.App.ViewModels;
|
namespace FileTime.GuiApp.App.ViewModels;
|
||||||
@@ -9,4 +10,5 @@ public class MainWindowLoadingViewModel : IMainWindowViewModelBase
|
|||||||
public IObservable<string?> MainFont { get; } = new BehaviorSubject<string?>("");
|
public IObservable<string?> MainFont { get; } = new BehaviorSubject<string?>("");
|
||||||
public DeclarativeProperty<string> Title { get; } = new("Loading...");
|
public DeclarativeProperty<string> Title { get; } = new("Loading...");
|
||||||
public DeclarativeProperty<string> FatalError { get; } = new();
|
public DeclarativeProperty<string> FatalError { get; } = new();
|
||||||
|
public IReadOnlyList<WindowTransparencyLevel> TransparencyLevelHint { get; } = new[] {WindowTransparencyLevel.AcrylicBlur};
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
using System.Reactive.Linq;
|
using System.Reactive.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using Avalonia.Controls;
|
||||||
using Avalonia.Input;
|
using Avalonia.Input;
|
||||||
using DeclarativeProperty;
|
using DeclarativeProperty;
|
||||||
using FileTime.App.CommandPalette.Services;
|
using FileTime.App.CommandPalette.Services;
|
||||||
@@ -37,12 +38,13 @@ namespace FileTime.GuiApp.App.ViewModels;
|
|||||||
[Inject(typeof(IClipboardService), PropertyAccessModifier = AccessModifier.Public)]
|
[Inject(typeof(IClipboardService), PropertyAccessModifier = AccessModifier.Public)]
|
||||||
[Inject(typeof(IModalService), PropertyName = "_modalService")]
|
[Inject(typeof(IModalService), PropertyName = "_modalService")]
|
||||||
[Inject(typeof(ITimelineViewModel), PropertyAccessModifier = AccessModifier.Public)]
|
[Inject(typeof(ITimelineViewModel), PropertyAccessModifier = AccessModifier.Public)]
|
||||||
[Inject(typeof(IPossibleCommandsViewModel), PropertyName = "PossibleCommands",PropertyAccessModifier = AccessModifier.Public)]
|
[Inject(typeof(IPossibleCommandsViewModel), PropertyName = "PossibleCommands", PropertyAccessModifier = AccessModifier.Public)]
|
||||||
public partial class MainWindowViewModel : IMainWindowViewModel
|
public partial class MainWindowViewModel : IMainWindowViewModel
|
||||||
{
|
{
|
||||||
public bool Loading => false;
|
public bool Loading => false;
|
||||||
public IObservable<string?> MainFont => _fontService.MainFont.Select(x => x ?? "");
|
public IObservable<string?> MainFont => _fontService.MainFont.Select(x => x ?? "");
|
||||||
public DeclarativeProperty<string> FatalError { get; } = new();
|
public DeclarativeProperty<string> FatalError { get; } = new();
|
||||||
|
public IReadOnlyList<WindowTransparencyLevel> TransparencyLevelHint { get; } = new[] {WindowTransparencyLevel.Blur};
|
||||||
public IGuiAppState AppState => _appState;
|
public IGuiAppState AppState => _appState;
|
||||||
public DeclarativeProperty<string> Title { get; } = new();
|
public DeclarativeProperty<string> Title { get; } = new();
|
||||||
public Action? FocusDefaultElement { get; set; }
|
public Action? FocusDefaultElement { get; set; }
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
Opened="OnWindowOpened"
|
Opened="OnWindowOpened"
|
||||||
RequestedThemeVariant="Dark"
|
RequestedThemeVariant="Dark"
|
||||||
Title="FileTime"
|
Title="FileTime"
|
||||||
TransparencyLevelHint="Blur"
|
TransparencyLevelHint="{Binding TransparencyLevelHint}"
|
||||||
d:DataContext="vm:MainWindowDesignViewModel"
|
d:DataContext="vm:MainWindowDesignViewModel"
|
||||||
d:DesignHeight="450"
|
d:DesignHeight="450"
|
||||||
d:DesignWidth="800"
|
d:DesignWidth="800"
|
||||||
@@ -21,6 +21,7 @@
|
|||||||
x:DataType="vm:IMainWindowViewModelBase"
|
x:DataType="vm:IMainWindowViewModelBase"
|
||||||
xmlns="https://github.com/avaloniaui"
|
xmlns="https://github.com/avaloniaui"
|
||||||
xmlns:appCoreModels="using:FileTime.App.Core.Models"
|
xmlns:appCoreModels="using:FileTime.App.Core.Models"
|
||||||
|
xmlns:converters="clr-namespace:FileTime.GuiApp.App.Converters"
|
||||||
xmlns:corevm="using:FileTime.App.Core.ViewModels"
|
xmlns:corevm="using:FileTime.App.Core.ViewModels"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:i="clr-namespace:Avalonia.Xaml.Interactivity;assembly=Avalonia.Xaml.Interactivity"
|
xmlns:i="clr-namespace:Avalonia.Xaml.Interactivity;assembly=Avalonia.Xaml.Interactivity"
|
||||||
@@ -47,8 +48,11 @@
|
|||||||
<StyleInclude Source="avares://FileTime.GuiApp.App/Resources/Styles.axaml" />
|
<StyleInclude Source="avares://FileTime.GuiApp.App/Resources/Styles.axaml" />
|
||||||
</Window.Styles>
|
</Window.Styles>
|
||||||
|
|
||||||
<Grid Background="{DynamicResource AppBackgroundBrush}">
|
<Grid>
|
||||||
<Grid IsVisible="{Binding Loading, Converter={x:Static BoolConverters.Not}, FallbackValue=False}" x:DataType="vm:IMainWindowViewModel">
|
<Grid
|
||||||
|
Background="{DynamicResource AppBackgroundBrush}"
|
||||||
|
IsVisible="{Binding Loading, Converter={x:Static BoolConverters.Not}, FallbackValue=False}"
|
||||||
|
x:DataType="vm:IMainWindowViewModel">
|
||||||
|
|
||||||
<Grid ColumnDefinitions="250,*" RowDefinitions="Auto,*">
|
<Grid ColumnDefinitions="250,*" RowDefinitions="Auto,*">
|
||||||
|
|
||||||
@@ -925,7 +929,7 @@
|
|||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Grid IsVisible="{Binding Loading}">
|
<Grid Background="{DynamicResource AppLoadingBackgroundBrush}" IsVisible="{Binding Loading}">
|
||||||
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
|
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||||
<Image
|
<Image
|
||||||
Height="128"
|
Height="128"
|
||||||
|
|||||||
Reference in New Issue
Block a user