Skip to content

Commit

Permalink
Fix for drop shadow and wrapping issues
Browse files Browse the repository at this point in the history
Removed Nexus Mods
Removed inline styles
  • Loading branch information
insomnious committed Feb 27, 2025
1 parent cb51bd3 commit 2e6e004
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@
<Border x:Name="BackgroundLayerBorder">
<StackPanel x:Name="BackgroundLayerStack">
<!-- nexus mods logo -->
<StackPanel x:Name="NexusModsStack">
<icons:UnifiedIcon Value="{x:Static icons:IconValues.NexusColor}" />
<TextBlock Text="Nexus Mods" />
</StackPanel>
<icons:UnifiedIcon Value="{x:Static icons:IconValues.NexusColor}"
ToolTip.Tip="Nexus Mods Collection"/>
<!-- revision -->
<StackPanel x:Name="RevisionsStack">
<TextBlock x:Name="RevisionText" />
Expand All @@ -50,11 +48,7 @@
<!-- right column -->
<DockPanel x:Name="DetailsDock">
<!-- stay at top -->
<TextBlock DockPanel.Dock="Top" x:Name="TitleText"
Theme="{StaticResource BodyLGBoldTheme}"
Margin="0,0,0,4"
TextWrapping="NoWrap"
TextTrimming="CharacterEllipsis" />
<TextBlock DockPanel.Dock="Top" x:Name="TitleText"/>
<!-- stay at bottom -->
<StackPanel DockPanel.Dock="Bottom" x:Name="ActionStack">
<navigation:NavigationControl x:Name="DownloadButton"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public CollectionCardView()
this.OneWayBind(ViewModel, vm => vm.RevisionNumber, view => view.RevisionText.Text, revision => $"Revision {revision}")
.DisposeWith(d);

this.OneWayBind(ViewModel, vm => vm.NumDownloads, view => view.ModsCountText.Text, count => $"{count} Mods ")
this.OneWayBind(ViewModel, vm => vm.NumDownloads, view => view.ModsCountText.Text, count => $"{count} Mods")
.DisposeWith(d);

this.OneWayBind(ViewModel, vm => vm.TotalSize, view => view.TotalSize.Text)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,41 +23,34 @@
<Style Selector="^ Border#CardCollectionBorder">
<Setter Property="BoxShadow" Value="{StaticResource DropShadowXS}" />
<Setter Property="CornerRadius" Value="{StaticResource Rounded}" />
<Setter Property="ClipToBounds" Value="True" />

<Style Selector="^ Border#BackgroundLayerBorder">
<Setter Property="Background" Value="{StaticResource CollectionCardLinearGradientBrush}" />
<Setter Property="CornerRadius" Value="4,4,0,0" />
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="Padding" Value="16,8" />

<Style Selector="^ StackPanel#BackgroundLayerStack">
<Setter Property="Orientation" Value="Horizontal" />
<Setter Property="HorizontalAlignment" Value="Right" />
<Setter Property="Spacing" Value="{StaticResource Spacing-2}" />
<Setter Property="Spacing" Value="{StaticResource Spacing-1}" />

<!-- default textblock style -->
<Style Selector="^ TextBlock">
<Setter Property="Theme" Value="{StaticResource BodySMNormalTheme}" />
<Setter Property="Foreground" Value="{StaticResource NeutralModerateBrush}" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="TextWrapping" Value="Wrap" />
</Style>

<Style Selector="^ StackPanel#NexusModsStack">
<Setter Property="Theme" Value="{StaticResource BodySMNormalTheme}" />
<Setter Property="Spacing" Value="{StaticResource Spacing-1}" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Orientation" Value="Horizontal" />
<Style Selector="^ > icons|UnifiedIcon">
<Setter Property="Size" Value="20" />
</Style>
<Style Selector="^ > TextBlock">
<Setter Property="Foreground" Value="{StaticResource PrimaryStrongBrush}" />
</Style>
<Style Selector="^ > icons|UnifiedIcon">
<Setter Property="Size" Value="20" />
</Style>

<Style Selector="^ StackPanel#RevisionsStack">
<Setter Property="Orientation" Value="Horizontal" />
<Setter Property="Spacing" Value="{StaticResource Spacing-1}" />

<Style Selector="^ StackPanel#RevisionUpdateStack">
<Setter Property="Orientation" Value="Horizontal" />
<Setter Property="Spacing" Value="{StaticResource Spacing-1}" />
Expand Down Expand Up @@ -100,8 +93,9 @@
<Style Selector="^ > TextBlock#TitleText">
<Setter Property="Theme" Value="{StaticResource BodyLGBoldTheme}" />
<Setter Property="Margin" Value="0,0,0,4" />
<Setter Property="TextWrapping" Value="NoWrap" />
<Setter Property="TextWrapping" Value="Wrap" />
<Setter Property="TextTrimming" Value="CharacterEllipsis" />
<Setter Property="MaxHeight" Value="48" />
</Style>

<Style Selector="^ > StackPanel#ActionStack">
Expand All @@ -118,6 +112,12 @@
<Setter Property="Theme" Value="{StaticResource BodySMNormalTheme}" />
<Setter Property="Foreground" Value="{StaticResource NeutralSubduedBrush}" />
</Style>

<Style Selector="^ TextBlock#AuthorName">
<Setter Property="MaxWidth" Value="117" />
<Setter Property="TextWrapping" Value="NoWrap" />
<Setter Property="TextTrimming" Value="CharacterEllipsis" />
</Style>

<Style Selector="^ Ellipse">
<Setter Property="Width" Value="4" />
Expand Down

0 comments on commit 2e6e004

Please sign in to comment.