Made text shadow not show for default WJ background

This commit is contained in:
Justin Swanson 2019-10-31 21:17:44 -05:00
parent b96ce29789
commit b0d83a6210
2 changed files with 15 additions and 2 deletions

View File

@ -86,6 +86,9 @@ namespace Wabbajack
private readonly ObservableAsPropertyHelper<string> _Summary;
public string Summary => _Summary.Value;
private readonly ObservableAsPropertyHelper<bool> _ShowTextShadow;
public bool ShowTextShadow => _ShowTextShadow.Value;
// Command properties
public IReactiveCommand BeginCommand { get; }
public IReactiveCommand ShowReportCommand { get; }
@ -226,6 +229,15 @@ namespace Wabbajack
resultSelector: (modList, mod, installing) => installing ? mod : modList)
.ToProperty(this, nameof(this.Summary));
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,6 +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" />
<Style.Triggers>
<DataTrigger Binding="{Binding IsMouseOver, ElementName=Slideshow}" Value="True" >
<DataTrigger.EnterActions>
@ -37,8 +38,8 @@
</BeginStoryboard>
</DataTrigger.ExitActions>
</DataTrigger>
<DataTrigger Binding="{Binding Image}" Value="{x:Null}" >
<Setter Property="Visibility" Value="Hidden" />
<DataTrigger Binding="{Binding ShowTextShadow}" Value="True" >
<Setter Property="Visibility" Value="Visible" />
</DataTrigger>
</Style.Triggers>
</Style>