Readded shadow to WJ background. Some styling

This commit is contained in:
Justin Swanson
2019-11-01 19:32:45 -05:00
parent f77359ee7d
commit dc5ad70145
2 changed files with 247 additions and 247 deletions

View File

@ -83,9 +83,6 @@ namespace Wabbajack
private readonly ObservableAsPropertyHelper<string> _Description;
public string Description => _Description.Value;
private readonly ObservableAsPropertyHelper<bool> _ShowTextShadow;
public bool ShowTextShadow => _ShowTextShadow.Value;
// Command properties
public IReactiveCommand BeginCommand { get; }
public IReactiveCommand ShowReportCommand { get; }
@ -224,15 +221,6 @@ namespace Wabbajack
resultSelector: (modList, mod, installing) => installing ? mod : modList)
.ToProperty(this, nameof(this.Description));
this._ShowTextShadow = this.WhenAny(x => x.Image)
.Select(image =>
{
if (image == null) return false;
if (image == this.WabbajackLogo) return false;
return true;
})
.ToProperty(this, nameof(ShowTextShadow));
// Define commands
this.ShowReportCommand = ReactiveCommand.Create(ShowReport);
this.OpenReadmeCommand = ReactiveCommand.Create(

View File

@ -16,7 +16,7 @@
<Color x:Key="TextBackgroundHoverFill">#DF000000</Color>
<Style x:Key="BackgroundBlurStyle" TargetType="Border">
<Setter Property="Background" Value="{StaticResource TextBackgroundFillBrush}" />
<Setter Property="Visibility" Value="Hidden" />
<Setter Property="Visibility" Value="Visible" />
<Style.Triggers>
<DataTrigger Binding="{Binding IsMouseOver, ElementName=Slideshow}" Value="True">
<DataTrigger.EnterActions>
@ -40,8 +40,8 @@
</BeginStoryboard>
</DataTrigger.ExitActions>
</DataTrigger>
<DataTrigger Binding="{Binding ShowTextShadow}" Value="True">
<Setter Property="Visibility" Value="Visible" />
<DataTrigger Binding="{Binding Image}" Value="{x:Null}">
<Setter Property="Visibility" Value="Hidden" />
</DataTrigger>
</Style.Triggers>
</Style>
@ -54,7 +54,7 @@
<Setter Property="Margin" Value="4" />
</Style>
</UserControl.Resources>
<Grid Margin="5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="40" />
<RowDefinition Height="5" />
@ -62,10 +62,13 @@
<RowDefinition Height="*" MinHeight="150" />
</Grid.RowDefinitions>
<!-- Slideshow -->
<Grid
<Border
x:Name="Slideshow"
Grid.Row="2"
Margin="0,0,0,5">
Margin="5,0,5,5"
BorderBrush="#171717"
BorderThickness="1,0,1,1">
<Grid ClipToBounds="True">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="5*" />
<ColumnDefinition Width="3*" />
@ -306,11 +309,13 @@
</TextBlock>
</Grid>
</Grid>
</Border>
<!-- Top progress bar -->
<!-- Comes after slideshow control, so that any effects/overlap goes on top -->
<Rectangle
Grid.Row="2"
Height="25"
Margin="6,0"
VerticalAlignment="Top"
IsHitTestVisible="False">
<Rectangle.Fill>
@ -473,7 +478,11 @@
</mahapps:MetroProgressBar.Foreground>
</mahapps:MetroProgressBar>
<!-- Bottom Area -->
<Grid Grid.Row="3" Visibility="{Binding InstallingMode, Converter={StaticResource bool2VisibilityConverter}, ConverterParameter=False}">
<Grid
Grid.Row="3"
Margin="5,0,5,5"
ClipToBounds="True"
Visibility="{Binding InstallingMode, Converter={StaticResource bool2VisibilityConverter}, ConverterParameter=False}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="4" />
@ -649,7 +658,10 @@
VerticalAlignment="Top"
Fill="{StaticResource DarkBackgroundBrush}" />
</Grid>
<Grid Grid.Row="3" Visibility="{Binding InstallingMode, Converter={StaticResource bool2VisibilityConverter}}">
<Grid
Grid.Row="3"
Margin="5,0,5,5"
Visibility="{Binding InstallingMode, Converter={StaticResource bool2VisibilityConverter}}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="4" />