Merge pull request #2172 from wabbajack-tools/total_size_requirement_display

add total size requirement to gallery
This commit is contained in:
Luca 2022-11-05 20:38:05 +01:00 committed by GitHub
commit ab20dcb0bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 41 additions and 0 deletions

View File

@ -75,6 +75,9 @@ namespace Wabbajack
[Reactive]
public string InstallSizeText { get; private set; }
[Reactive]
public string TotalSizeRequirementText { get; private set; }
[Reactive]
public string VersionText { get; private set; }
@ -113,6 +116,9 @@ namespace Wabbajack
DownloadSizeText = "Download size : " + UIUtils.FormatBytes(Metadata.DownloadMetadata.SizeOfArchives);
InstallSizeText = "Installation size : " + UIUtils.FormatBytes(Metadata.DownloadMetadata.SizeOfInstalledFiles);
TotalSizeRequirementText = "Total size requirement: " + UIUtils.FormatBytes(
Metadata.DownloadMetadata.SizeOfArchives + Metadata.DownloadMetadata.SizeOfInstalledFiles
);
VersionText = "Modlist version : " + Metadata.Version;
IsBroken = metadata.ValidationSummary.HasFailures || metadata.ForceDown;
//https://www.wabbajack.org/#/modlists/info?machineURL=eldersouls

View File

@ -249,6 +249,41 @@
</Style>
</Label.Style>
</Label>
<Label
Margin="10,287,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Content="{Binding TotalSizeRequirementText}"
Opacity="0">
<Label.Style>
<Style TargetType="Label">
<Style.Triggers>
<DataTrigger Binding="{Binding IsMouseOver, ElementName=ModListTile}" Value="True">
<DataTrigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
Storyboard.TargetProperty="Opacity"
To="1"
Duration="0:0:0.08" />
</Storyboard>
</BeginStoryboard>
</DataTrigger.EnterActions>
<DataTrigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
Storyboard.TargetProperty="Opacity"
To="0"
Duration="0:0:0.08" />
</Storyboard>
</BeginStoryboard>
</DataTrigger.ExitActions>
</DataTrigger>
</Style.Triggers>
</Style>
</Label.Style>
</Label>
</Grid>
</Border>
<local:UnderMaintenanceOverlay Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"