new update control WIP
This commit is contained in:
parent
ef487334fb
commit
bb4c535244
2
.idea/.idea.SPTInstaller/.idea/avalonia.xml
generated
2
.idea/.idea.SPTInstaller/.idea/avalonia.xml
generated
@ -8,10 +8,12 @@
|
||||
<entry key="SPTInstaller/CustomControls/CacheInfo.axaml" value="SPTInstaller/SPTInstaller.csproj" />
|
||||
<entry key="SPTInstaller/CustomControls/DetailedPreCheckItem.axaml" value="SPTInstaller/SPTInstaller.csproj" />
|
||||
<entry key="SPTInstaller/CustomControls/Dialogs/WhyCacheThoughDialog.axaml" value="SPTInstaller/SPTInstaller.csproj" />
|
||||
<entry key="SPTInstaller/CustomControls/MainInstallerButton.axaml" value="SPTInstaller/SPTInstaller.csproj" />
|
||||
<entry key="SPTInstaller/CustomControls/PreCheckDetails.axaml" value="SPTInstaller/SPTInstaller.csproj" />
|
||||
<entry key="SPTInstaller/CustomControls/PreCheckItem.axaml" value="SPTInstaller/SPTInstaller.csproj" />
|
||||
<entry key="SPTInstaller/CustomControls/ProgressableTaskItem.axaml" value="SPTInstaller/SPTInstaller.csproj" />
|
||||
<entry key="SPTInstaller/CustomControls/SPTInstallButton.axaml" value="SPTInstaller/SPTInstaller.csproj" />
|
||||
<entry key="SPTInstaller/CustomControls/UpdateButton.axaml" value="SPTInstaller/SPTInstaller.csproj" />
|
||||
<entry key="SPTInstaller/CustomControls/UpdateInfoCard.axaml" value="SPTInstaller/SPTInstaller.csproj" />
|
||||
<entry key="SPTInstaller/Views/DetailedPreChecksView.axaml" value="SPTInstaller/SPTInstaller.csproj" />
|
||||
<entry key="SPTInstaller/Views/MainWindow.axaml" value="SPTInstaller/SPTInstaller.csproj" />
|
||||
|
@ -21,6 +21,7 @@
|
||||
<Color x:Key="AKI_White">#FFFFFF</Color>
|
||||
<Color x:Key="AKI_Gray">#282828</Color>
|
||||
<Color x:Key="AKI_DarkGrayBlue">#323947</Color>
|
||||
<Color x:Key="AKI_LightGrayBlue">#444259</Color>
|
||||
|
||||
<!-- Brushes -->
|
||||
<SolidColorBrush x:Key="AKI_Foreground_Light" Color="{StaticResource AKI_White}"/>
|
||||
@ -28,6 +29,7 @@
|
||||
<SolidColorBrush x:Key="AKI_Background_Dark" Color="{StaticResource AKI_DarkGray}"/>
|
||||
<SolidColorBrush x:Key="AKI_Brush_Yellow" Color="{StaticResource AKI_Yellow}"/>
|
||||
<SolidColorBrush x:Key="AKI_Brush_DarkGrayBlue" Color="{StaticResource AKI_DarkGrayBlue}"/>
|
||||
<SolidColorBrush x:Key="AKI_Brush_LightGrayBlue" Color="{StaticResource AKI_LightGrayBlue}"/>
|
||||
<SolidColorBrush x:Key="AKI_Brush_Lighter" Color="Gainsboro"/>
|
||||
|
||||
<!-- Path Geometry -->
|
||||
|
@ -123,16 +123,13 @@
|
||||
<!-- SourceRef: https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Themes.Fluent/Controls/Button.xaml -->
|
||||
<Style Selector="Button">
|
||||
<Setter Property="Background" Value="{StaticResource AKI_Brush_DarkGrayBlue}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource AKI_Background_Dark}"/>
|
||||
</Style>
|
||||
|
||||
<Style Selector="Button:pointerover">
|
||||
<Setter Property="FontWeight" Value="SemiBold"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource AKI_White}"/>
|
||||
</Style>
|
||||
|
||||
<Style Selector="Button:pointerover /template/ ContentPresenter">
|
||||
<Setter Property="Background" Value="{StaticResource AKI_Background_Light}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource AKI_Brush_Yellow}"/>
|
||||
<Setter Property="Background" Value="{StaticResource AKI_LightGrayBlue}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource AKI_LightGrayBlue}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource AKI_White}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
</Style>
|
||||
|
||||
@ -159,6 +156,7 @@
|
||||
<Style Selector="Button.yellow:pointerover /template/ ContentPresenter">
|
||||
<Setter Property="Background" Value="Gold"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource AKI_Brush_DarkGrayBlue}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource AKI_Background_Dark}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
</Style>
|
||||
|
||||
|
@ -38,8 +38,7 @@
|
||||
</Style>
|
||||
|
||||
<Style Selector="Button.selected">
|
||||
<Setter Property="Background" Value="{StaticResource AKI_Brush_DarkGrayBlue}" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource AKI_Yellow}"/>
|
||||
<Setter Property="Background" Value="{StaticResource AKI_Brush_LightGrayBlue}" />
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
</Style>
|
||||
</UserControl.Styles>
|
||||
|
27
SPTInstaller/CustomControls/UpdateButton.axaml
Normal file
27
SPTInstaller/CustomControls/UpdateButton.axaml
Normal file
@ -0,0 +1,27 @@
|
||||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="SPTInstaller.CustomControls.UpdateButton">
|
||||
<UserControl.Styles>
|
||||
<StyleInclude Source="../Assets/Styles.axaml"/>
|
||||
</UserControl.Styles>
|
||||
|
||||
<Panel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" IsVisible="False" IsEnabled="False">
|
||||
<Button Content="Update Installer to v2.56" CornerRadius="20 0 0 20" Classes="yellow"/>
|
||||
|
||||
<Button Content="Not now" CornerRadius="0 20 20 0" />
|
||||
</StackPanel>
|
||||
|
||||
<Panel IsVisible="True" IsEnabled="True">
|
||||
<ProgressBar CornerRadius="20" VerticalAlignment="Stretch"
|
||||
Value="10" IsIndeterminate="True"
|
||||
/>
|
||||
<Label Content="Downloading v2.56" VerticalAlignment="Center" HorizontalAlignment="Center"
|
||||
Foreground="Black" FontWeight="SemiBold"/>
|
||||
</Panel>
|
||||
</Panel>
|
||||
</UserControl>
|
24
SPTInstaller/CustomControls/UpdateButton.axaml.cs
Normal file
24
SPTInstaller/CustomControls/UpdateButton.axaml.cs
Normal file
@ -0,0 +1,24 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace SPTInstaller.CustomControls;
|
||||
|
||||
public partial class UpdateButton : UserControl
|
||||
{
|
||||
public UpdateButton()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// InfoText="{Binding UpdateInfo.UpdateInfoText}"
|
||||
// ShowUpdateCard="{Binding UpdateInfo.ShowCard}"
|
||||
// NotNowCommand="{Binding DismissUpdateCommand}"
|
||||
// UpdateInstallerCommand="{Binding UpdateInstallerCommand}"
|
||||
// Updating="{Binding UpdateInfo.Updating}"
|
||||
// DownloadProgress="{Binding UpdateInfo.DownloadProgress}"
|
||||
// IndeterminateProgress="{Binding UpdateInfo.CheckingForUpdates}"
|
||||
// UpdateAvailable="{Binding UpdateInfo.UpdateAvailable}"
|
||||
}
|
@ -9,8 +9,8 @@
|
||||
<PackageIcon>icon.ico</PackageIcon>
|
||||
<ApplicationIcon>Assets\icon.ico</ApplicationIcon>
|
||||
<Configurations>Debug;Release;TEST</Configurations>
|
||||
<AssemblyVersion>2.53</AssemblyVersion>
|
||||
<FileVersion>2.53</FileVersion>
|
||||
<AssemblyVersion>2.54</AssemblyVersion>
|
||||
<FileVersion>2.54</FileVersion>
|
||||
<Company>SPT-AKI</Company>
|
||||
</PropertyGroup>
|
||||
|
||||
|
@ -75,6 +75,7 @@
|
||||
|
||||
<!-- Start install button -->
|
||||
<Button Grid.Column="2" Grid.Row="3" Padding="20 10"
|
||||
IsVisible="False"
|
||||
FontSize="15" FontWeight="SemiBold"
|
||||
Classes="yellow"
|
||||
IsEnabled="{Binding AllowInstall}"
|
||||
@ -87,16 +88,19 @@
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
<cc:UpdateInfoCard Grid.Row="1" Grid.RowSpan="5" Grid.ColumnSpan="5" Padding="10"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Center"
|
||||
InfoText="{Binding UpdateInfo.UpdateInfoText}"
|
||||
ShowUpdateCard="{Binding UpdateInfo.ShowCard}"
|
||||
NotNowCommand="{Binding DismissUpdateCommand}"
|
||||
UpdateInstallerCommand="{Binding UpdateInstallerCommand}"
|
||||
Updating="{Binding UpdateInfo.Updating}"
|
||||
DownloadProgress="{Binding UpdateInfo.DownloadProgress}"
|
||||
IndeterminateProgress="{Binding UpdateInfo.CheckingForUpdates}"
|
||||
UpdateAvailable="{Binding UpdateInfo.UpdateAvailable}"
|
||||
/>
|
||||
<!-- Update installer button -->
|
||||
<cc:UpdateButton Grid.Column="2" Grid.Row="3" Padding="20 10"/>
|
||||
|
||||
<!-- <cc:UpdateInfoCard Grid.Row="1" Grid.RowSpan="5" Grid.ColumnSpan="5" Padding="10" -->
|
||||
<!-- VerticalAlignment="Center" HorizontalAlignment="Center" -->
|
||||
<!-- InfoText="{Binding UpdateInfo.UpdateInfoText}" -->
|
||||
<!-- ShowUpdateCard="{Binding UpdateInfo.ShowCard}" -->
|
||||
<!-- NotNowCommand="{Binding DismissUpdateCommand}" -->
|
||||
<!-- UpdateInstallerCommand="{Binding UpdateInstallerCommand}" -->
|
||||
<!-- Updating="{Binding UpdateInfo.Updating}" -->
|
||||
<!-- DownloadProgress="{Binding UpdateInfo.DownloadProgress}" -->
|
||||
<!-- IndeterminateProgress="{Binding UpdateInfo.CheckingForUpdates}" -->
|
||||
<!-- UpdateAvailable="{Binding UpdateInfo.UpdateAvailable}" -->
|
||||
<!-- /> -->
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
Loading…
x
Reference in New Issue
Block a user