CPU view display styling tweaks

This commit is contained in:
Justin Swanson 2019-12-22 01:55:52 -06:00
parent ed27978a31
commit 0e0d495364
3 changed files with 23 additions and 18 deletions

View File

@ -41,7 +41,8 @@
<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="DarkPrimaryVariant">#270080</Color>
<Color x:Key="DarkerPrimaryVariant">#1b0059</Color>
<Color x:Key="Secondary">#03DAC6</Color>
<Color x:Key="DarkSecondary">#0e8f83</Color>
<Color x:Key="DarkerSecondary">#095952</Color>
@ -117,6 +118,7 @@
<SolidColorBrush x:Key="PrimaryBrush" Color="{StaticResource Primary}" />
<SolidColorBrush x:Key="PrimaryVariantBrush" Color="{StaticResource PrimaryVariant}" />
<SolidColorBrush x:Key="DarkPrimaryVariantBrush" Color="{StaticResource DarkPrimaryVariant}" />
<SolidColorBrush x:Key="DarkerPrimaryVariantBrush" Color="{StaticResource DarkerPrimaryVariant}" />
<SolidColorBrush x:Key="SecondaryBrush" Color="{StaticResource Secondary}" />
<SolidColorBrush x:Key="DarkSecondaryBrush" Color="{StaticResource DarkSecondary}" />
<SolidColorBrush x:Key="DarkerSecondaryBrush" Color="{StaticResource DarkerSecondary}" />

View File

@ -12,32 +12,35 @@
<Grid>
<Rectangle Fill="{StaticResource HeatedBorderBrush}" Opacity="{Binding ProgressPercent, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" />
<ListBox
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Stretch"
BorderBrush="Transparent"
BorderThickness="1"
ItemsSource="{Binding StatusList}">
ItemsSource="{Binding StatusList}"
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid HorizontalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="500" />
</Grid.ColumnDefinitions>
<Grid Background="{StaticResource WindowBackgroundBrush}">
<mahapps:MetroProgressBar
Grid.Column="0"
Background="{StaticResource WindowBackgroundBrush}"
BorderThickness="0"
Foreground="Transparent"
Maximum="1"
Value="{Binding Status.ProgressPercent, Mode=OneWay}" />
<mahapps:MetroProgressBar
Grid.Column="0"
Background="Transparent"
BorderThickness="0"
Foreground="{StaticResource PrimaryVariantBrush}"
Foreground="{StaticResource DarkPrimaryVariantBrush}"
Maximum="1"
Opacity="{Binding Status.ProgressPercent, Mode=OneWay}"
Value="{Binding Status.ProgressPercent, Mode=OneWay}" />
<TextBlock Grid.Column="0" Text="{Binding Status.Msg}" />
<Grid Height="1" VerticalAlignment="Bottom">
<mahapps:MetroProgressBar
Background="Transparent"
BorderThickness="0"
Foreground="{StaticResource DarkSecondaryBrush}"
Maximum="1"
Value="{Binding Status.ProgressPercent, Mode=OneWay}" />
</Grid>
<TextBlock
Margin="0,0,0,2"
Text="{Binding Status.Msg}"
TextTrimming="CharacterEllipsis"
TextWrapping="NoWrap"
ToolTip="{Binding Status.Msg}" />
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>

View File

@ -72,7 +72,7 @@
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" Color="{StaticResource DarkerPrimaryVariant}" />
<GradientStop Offset="0.5" Color="{StaticResource PrimaryVariant}" />
</LinearGradientBrush>
</mahapps:MetroProgressBar.Foreground>