Adjusted heat and progress bar looks slightly

This commit is contained in:
Justin Swanson 2019-11-29 16:09:22 -06:00
parent 92bb46dc43
commit ebcb80f18f
11 changed files with 175 additions and 109 deletions

View File

@ -1,4 +1,4 @@
<ResourceDictionary
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
@ -18,12 +18,13 @@
<!-- Colors -->
<Color x:Key="WindowBackgroundColor">#121212</Color>
<Color x:Key="DarkBackgroundColor">#292929</Color>
<Color x:Key="LightBackgroundColor">#414141</Color>
<Color x:Key="BackgroundColor">#3D3D3D</Color>
<Color x:Key="DarkBackgroundColor">#222222</Color>
<Color x:Key="LightBackgroundColor">#424242</Color>
<Color x:Key="BackgroundColor">#323232</Color>
<Color x:Key="DisabledBackgroundColor">#424242</Color>
<Color x:Key="PressedBackgroundColor">#394140</Color>
<Color x:Key="LightDisabledBackgroundColor">#666666</Color>
<Color x:Key="HeatedBorderColor">#362675</Color>
<Color x:Key="ForegroundColor">#EFEFEF</Color>
@ -35,7 +36,9 @@
<Color x:Key="Green">#52b545</Color>
<Color x:Key="Primary">#BB86FC</Color>
<Color x:Key="PrimaryTransparent">#00BB86FC</Color>
<Color x:Key="PrimaryVariant">#3700B3</Color>
<Color x:Key="DarkPrimaryVariant">#1b0059</Color>
<Color x:Key="Secondary">#03DAC6</Color>
<Color x:Key="DarkSecondary">#0e8f83</Color>
<Color x:Key="DarkerSecondary">#095952</Color>
@ -99,9 +102,12 @@
<SolidColorBrush x:Key="ForegroundBrush" Color="{StaticResource ForegroundColor}" />
<SolidColorBrush x:Key="MouseOverForegroundBrush" Color="{StaticResource DarkBackgroundColor}" />
<SolidColorBrush x:Key="WindowBackgroundBrush" Color="{StaticResource WindowBackgroundColor}" />
<SolidColorBrush x:Key="BorderInterestBrush" Color="{StaticResource HeatedBorderColor}" />
<SolidColorBrush x:Key="HeatedBorderBrush" Color="{StaticResource HeatedBorderColor}" />
<SolidColorBrush x:Key="PrimaryBrush" Color="{StaticResource Primary}" />
<SolidColorBrush x:Key="PrimaryVariantBrush" Color="{StaticResource PrimaryVariant}" />
<SolidColorBrush x:Key="DarkPrimaryVariantBrush" Color="{StaticResource DarkPrimaryVariant}" />
<SolidColorBrush x:Key="SecondaryBrush" Color="{StaticResource Secondary}" />
<SolidColorBrush x:Key="DarkSecondaryBrush" Color="{StaticResource DarkSecondary}" />
<SolidColorBrush x:Key="DarkerSecondaryBrush" Color="{StaticResource DarkerSecondary}" />

View File

@ -1,19 +0,0 @@
<UserControl
x:Class="Wabbajack.BorderFadeDownView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Wabbajack"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
d:DesignHeight="450"
d:DesignWidth="5"
mc:Ignorable="d">
<Rectangle>
<Rectangle.Fill>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<GradientStop Offset="0" Color="#191919" />
<GradientStop Offset="0.4" Color="#00191919" />
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
</UserControl>

View File

@ -1,15 +0,0 @@
using System.Windows.Controls;
namespace Wabbajack
{
/// <summary>
/// Interaction logic for BorderFadeDownView.xaml
/// </summary>
public partial class BorderFadeDownView : UserControl
{
public BorderFadeDownView()
{
InitializeComponent();
}
}
}

View File

@ -0,0 +1,29 @@
<UserControl
x:Class="Wabbajack.HeatedBackgroundView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Wabbajack"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
<Grid>
<Rectangle>
<Rectangle.Fill>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<GradientStop Offset="0" Color="#191919" />
<GradientStop Offset="0.4" Color="#00191919" />
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
<Rectangle Opacity="{Binding PercentCompleted, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}">
<Rectangle.Fill>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<GradientStop Offset="0.2" Color="{StaticResource PrimaryVariant}" />
<GradientStop Offset="1" Color="{StaticResource WindowBackgroundColor}" />
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
</Grid>
</UserControl>

View File

@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace Wabbajack
{
/// <summary>
/// Interaction logic for HeatedBackgroundView.xaml
/// </summary>
public partial class HeatedBackgroundView : UserControl
{
public double PercentCompleted
{
get => (double)GetValue(PercentCompletedProperty);
set => SetValue(PercentCompletedProperty, value);
}
public static readonly DependencyProperty PercentCompletedProperty = DependencyProperty.Register(nameof(PercentCompleted), typeof(double), typeof(HeatedBackgroundView),
new FrameworkPropertyMetadata(default(double)));
public HeatedBackgroundView()
{
InitializeComponent();
}
}
}

View File

@ -4,21 +4,27 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Wabbajack"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:mahapps="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
d:DesignHeight="250"
d:DesignWidth="800"
BorderThickness="0"
mc:Ignorable="d">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="4" />
<ColumnDefinition Width="5" />
<ColumnDefinition Width="500" />
</Grid.ColumnDefinitions>
<Rectangle
Grid.Column="0"
Fill="{StaticResource HeatedBorderBrush}"
Opacity="{Binding ProgressPercent, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" />
<ListBox
Grid.Column="0"
Margin="0,0,2,0"
local:AutoScrollBehavior.ScrollOnNewItem="True"
BorderBrush="Transparent"
BorderThickness="1"
ItemsSource="{Binding Log}"
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
<ListBox.ItemTemplate>
@ -27,9 +33,15 @@
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<Rectangle
Grid.Column="2"
Fill="{StaticResource HeatedBorderBrush}"
Opacity="{Binding ProgressPercent, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" />
<ListBox
Grid.Column="2"
HorizontalAlignment="Stretch"
BorderBrush="Transparent"
BorderThickness="1"
ItemsSource="{Binding StatusList}">
<ListBox.ItemTemplate>
<DataTemplate>

View File

@ -1,4 +1,5 @@
using System.Windows.Controls;
using System.Windows;
using System.Windows.Controls;
namespace Wabbajack
{
@ -7,6 +8,14 @@ namespace Wabbajack
/// </summary>
public partial class LogCpuView : UserControl
{
public double ProgressPercent
{
get => (double)GetValue(ProgressPercentProperty);
set => SetValue(ProgressPercentProperty, value);
}
public static readonly DependencyProperty ProgressPercentProperty = DependencyProperty.Register(nameof(ProgressPercent), typeof(double), typeof(LogCpuView),
new FrameworkPropertyMetadata(default(double)));
public LogCpuView()
{
InitializeComponent();

View File

@ -8,6 +8,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
d:DesignHeight="450"
d:DesignWidth="800"
BorderThickness="0"
mc:Ignorable="d">
<Grid>
<Grid.RowDefinitions>
@ -46,22 +47,6 @@
<BlurEffect Radius="25" />
</mahapps:MetroProgressBar.Effect>
</mahapps:MetroProgressBar>
<mahapps:MetroProgressBar
x:Name="BottomProgressBarBrightGlow"
Grid.Row="1"
Grid.RowSpan="2"
Height="6"
Margin="-4"
VerticalAlignment="Top"
Background="Transparent"
BorderBrush="Transparent"
Foreground="{StaticResource PrimaryBrush}"
Maximum="1"
Value="{Binding ProgressPercent, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}">
<mahapps:MetroProgressBar.Effect>
<BlurEffect Radius="20" />
</mahapps:MetroProgressBar.Effect>
</mahapps:MetroProgressBar>
<Grid x:Name="TopBarGrid" Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
@ -69,22 +54,36 @@
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<mahapps:MetroProgressBar
Grid.Column="0"
Grid.ColumnSpan="4"
Background="{StaticResource WindowBackgroundBrush}"
BorderThickness="0"
Foreground="Transparent"
Maximum="1"
Value="{Binding ProgressPercent, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" />
<mahapps:MetroProgressBar
x:Name="LargeProgressBar"
Grid.Column="0"
Grid.ColumnSpan="4"
Background="Transparent"
BorderThickness="0"
Foreground="{StaticResource PrimaryVariantBrush}"
Maximum="1"
Opacity="{Binding ProgressOpacityPercent, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
Value="{Binding ProgressPercent, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" />
Value="{Binding ProgressPercent, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}">
<mahapps:MetroProgressBar.Foreground>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
<GradientStop Offset="0" Color="{StaticResource DarkPrimaryVariant}" />
<GradientStop Offset="0.5" Color="{StaticResource PrimaryVariant}" />
</LinearGradientBrush>
</mahapps:MetroProgressBar.Foreground>
</mahapps:MetroProgressBar>
<mahapps:MetroProgressBar
x:Name="LargeProgressBarTopGlow"
Grid.Column="0"
Grid.ColumnSpan="4"
Background="Transparent"
BorderThickness="0"
Maximum="1"
Value="{Binding ProgressPercent, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}">
<mahapps:MetroProgressBar.Foreground>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<GradientStop Offset="0" Color="#33000000" />
<GradientStop Offset="0.3" Color="#00000000" />
</LinearGradientBrush>
</mahapps:MetroProgressBar.Foreground>
</mahapps:MetroProgressBar>
<TextBlock
Grid.Column="0"
Width="130"
@ -104,6 +103,36 @@
Text="{Binding Title, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" />
<ContentControl Grid.Column="2" />
</Grid>
<mahapps:MetroProgressBar
x:Name="BottomProgressBarBrightGlow1"
Grid.Row="1"
Grid.RowSpan="2"
Height="5"
VerticalAlignment="Top"
Background="Transparent"
BorderBrush="Transparent"
Foreground="{StaticResource SecondaryBrush}"
Maximum="1"
Value="{Binding ProgressPercent, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}">
<mahapps:MetroProgressBar.Effect>
<BlurEffect Radius="8" />
</mahapps:MetroProgressBar.Effect>
</mahapps:MetroProgressBar>
<mahapps:MetroProgressBar
x:Name="BottomProgressBarBrightGlow2"
Grid.Row="1"
Grid.RowSpan="2"
Height="5"
VerticalAlignment="Top"
Background="Transparent"
BorderBrush="Transparent"
Foreground="{StaticResource SecondaryBrush}"
Maximum="1"
Value="{Binding ProgressPercent, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}">
<mahapps:MetroProgressBar.Effect>
<BlurEffect Radius="15" />
</mahapps:MetroProgressBar.Effect>
</mahapps:MetroProgressBar>
<mahapps:MetroProgressBar
x:Name="BottomProgressBar"
Grid.Row="1"
@ -112,7 +141,7 @@
VerticalAlignment="Top"
Background="Transparent"
BorderBrush="Transparent"
Foreground="{StaticResource PrimaryBrush}"
Foreground="{StaticResource SecondaryBrush}"
Maximum="1"
Value="{Binding ProgressPercent, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" />
<mahapps:MetroProgressBar

View File

@ -1,4 +1,4 @@
<UserControl
<UserControl
x:Class="Wabbajack.CompilerView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
@ -25,22 +25,12 @@
<ColumnDefinition Width="5*" />
<ColumnDefinition Width="5" />
</Grid.ColumnDefinitions>
<local:BorderFadeDownView
Grid.Row="1"
Grid.RowSpan="2"
Grid.Column="0" />
<local:BorderFadeDownView
Grid.Row="1"
Grid.RowSpan="2"
Grid.Column="4" />
<Rectangle
x:Name="BorderHeatFill"
<local:HeatedBackgroundView
Grid.Row="0"
Grid.RowSpan="3"
Grid.Column="0"
Grid.ColumnSpan="5"
Fill="#7d3700B3"
Opacity="{Binding PercentCompleted}" />
PercentCompleted="{Binding PercentCompleted}" />
<local:DetailImageView
Title="{Binding CurrentModlistSettings.ModListName}"
Grid.Row="1"
@ -163,13 +153,13 @@
VerticalAlignment="Top"
Fill="{StaticResource DarkBackgroundBrush}"
SnapsToDevicePixels="True" />
<Rectangle
<Border
x:Name="BottomBarBackground"
Grid.Row="2"
Grid.Column="0"
Grid.ColumnSpan="5"
Margin="5"
Fill="#121212" />
Background="{StaticResource WindowBackgroundBrush}" />
<Grid
Grid.Row="2"
Grid.Column="0"

View File

@ -37,17 +37,15 @@
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
<Rectangle
x:Name="BorderHeatFill"
Grid.Row="0"
Grid.RowSpan="3"
Fill="#7d3700B3"
Opacity="{Binding PercentCompleted}" />
<local:HeatedBackgroundView
Grid.Row="1"
Grid.RowSpan="2"
PercentCompleted="{Binding PercentCompleted}" />
<Grid
x:Name="Slideshow"
Grid.Row="1"
Margin="5,0,5,5">
<Border BorderBrush="#171717" BorderThickness="1,0,1,1">
<Border BorderBrush="{StaticResource BorderInterestBrush}" BorderThickness="1,0,1,1">
<local:DetailImageView
Title="{Binding TitleText, Mode=OneWay}"
Author="{Binding AuthorText, Mode=OneWay}"
@ -354,21 +352,12 @@
</Grid>
</ScrollViewer>
</Grid>
<Rectangle
x:Name="ControlTopThinSeparator"
Grid.Column="0"
Grid.ColumnSpan="3"
Height="1"
Margin="25,0"
VerticalAlignment="Top"
Fill="{StaticResource DarkBackgroundBrush}"
SnapsToDevicePixels="True" />
</Grid>
<Grid
Grid.Row="2"
Margin="5,0,5,5"
Visibility="{Binding InstallingMode, Converter={StaticResource bool2VisibilityConverter}, FallbackValue=Hidden}">
<local:LogCpuView />
<local:LogCpuView ProgressPercent="{Binding PercentCompleted, Mode=OneWay}" />
</Grid>
</Grid>
</UserControl>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
@ -169,6 +169,9 @@
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="Converters\EqualsToBoolConverter.cs" />
<Compile Include="Views\Common\HeatedBackgroundView.xaml.cs">
<DependentUpon>HeatedBackgroundView.xaml</DependentUpon>
</Compile>
<Compile Include="Views\LinksView.xaml.cs">
<DependentUpon>LinksView.xaml</DependentUpon>
</Compile>
@ -183,9 +186,6 @@
<Compile Include="View Models\Compilers\MO2CompilerVM.cs" />
<Compile Include="View Models\Compilers\ModlistSettingsEditorVM.cs" />
<Compile Include="View Models\Compilers\VortexCompilerVM.cs" />
<Compile Include="Views\Common\BorderFadeDownView.xaml.cs">
<DependentUpon>BorderFadeDownView.xaml</DependentUpon>
</Compile>
<Compile Include="Converters\InverseBooleanConverter.cs" />
<Compile Include="Converters\BoolToVisibilityHiddenConverter.cs" />
<Compile Include="Views\Common\RadioButtonView.xaml.cs">
@ -239,6 +239,10 @@
<Compile Include="Views\Compilers\VortexCompilerConfigView.xaml.cs">
<DependentUpon>VortexCompilerConfigView.xaml</DependentUpon>
</Compile>
<Page Include="Views\Common\HeatedBackgroundView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\LinksView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@ -251,10 +255,6 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\Common\BorderFadeDownView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\Common\RadioButtonView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>