Skip to content

Commit 17c2d09

Browse files
authored
Merge pull request #2299 from Nexus-Mods/fix-collection-scrolling-bug
Fixed scrolling in collection download view
2 parents f48b4c1 + 1d84e92 commit 17c2d09

File tree

2 files changed

+28
-34
lines changed

2 files changed

+28
-34
lines changed

src/NexusMods.App.UI/Pages/CollectionDownload/CollectionDownloadView.axaml

+20-19
Original file line numberDiff line numberDiff line change
@@ -48,28 +48,29 @@
4848
</MenuFlyout>
4949
</reactiveUi:ReactiveUserControl.Resources>
5050

51-
<StackPanel x:Name="Body">
52-
51+
<DockPanel x:Name="Body">
52+
5353
<!-- first row (header) -->
54-
<Border x:Name="HeaderBorderBackground">
54+
<Border x:Name="HeaderBorderBackground" DockPanel.Dock="Top">
5555
<Border x:Name="HeaderBorder">
56-
56+
5757
<StackPanel x:Name="Header">
58-
58+
5959
<!-- first header row (image and metadata) -->
6060
<Border x:Name="MainContentBorder">
61-
<Grid x:Name="MainContent" ColumnDefinitions="Auto, *" >
62-
61+
<Grid x:Name="MainContent" ColumnDefinitions="Auto, *">
62+
6363
<!-- left column (image) -->
6464
<Border Grid.Column="0" x:Name="CollectionImageBorder">
6565
<Image x:Name="CollectionImage" />
6666
</Border>
6767

6868
<!-- right column (metadata) -->
69-
<Grid Grid.Column="1" x:Name="CollectionDetails" RowDefinitions="Auto,Auto,Auto,*" ColumnDefinitions="Auto">
69+
<Grid Grid.Column="1" x:Name="CollectionDetails" RowDefinitions="Auto,Auto,Auto,*"
70+
ColumnDefinitions="Auto">
7071
<TextBlock Grid.Row="0" x:Name="Title">COLLECTION DOWNLOAD</TextBlock>
71-
<TextBlock Grid.Row="1" x:Name="Heading" />
72-
<Border Grid.Row="2" x:Name="TagsPanelBorder">
72+
<TextBlock Grid.Row="1" x:Name="Heading" />
73+
<Border Grid.Row="2" x:Name="TagsPanelBorder">
7374
<StackPanel x:Name="TagsPanel">
7475
<TextBlock x:Name="Revision" />
7576
<StackPanel x:Name="AuthorStackPanel">
@@ -80,7 +81,7 @@
8081
</StackPanel>
8182
</StackPanel>
8283
</Border>
83-
<TextBlock Grid.Row="3" x:Name="Summary" />
84+
<TextBlock Grid.Row="3" x:Name="Summary" />
8485
</Grid>
8586

8687
</Grid>
@@ -106,7 +107,8 @@
106107
<TextBlock x:Name="TotalSize" />
107108
</StackPanel>
108109
<StackPanel x:Name="OverallRatingPanel">
109-
<icons:UnifiedIcon x:Name="OverallRatingIcon" Value="{x:Static icons:IconValues.CheckCircle}" />
110+
<icons:UnifiedIcon x:Name="OverallRatingIcon"
111+
Value="{x:Static icons:IconValues.CheckCircle}" />
110112
<TextBlock x:Name="OverallRating" />
111113
</StackPanel>
112114
</StackPanel>
@@ -116,12 +118,13 @@
116118
</Border>
117119

118120
<!-- second row (buttons) -->
119-
<Border x:Name="ListHeaderRowBorder">
121+
<Border x:Name="ListHeaderRowBorder" DockPanel.Dock="Top">
120122
<panels:FlexPanel x:Name="ListHeaderRow">
121-
<TextBlock x:Name="CollectionStatusText"/>
123+
<TextBlock x:Name="CollectionStatusText" />
122124
<controls:StandardButton x:Name="InstallButton" Text="Install" />
123-
<controls:StandardButton x:Name="DownloadAllButton" Text="Download All"/>
124-
<controls:StandardButton x:Name="FlyoutMenuButton" Flyout="{StaticResource CollectionMenuFlyout}" Text="..."/>
125+
<controls:StandardButton x:Name="DownloadAllButton" Text="Download All" />
126+
<controls:StandardButton x:Name="FlyoutMenuButton" Flyout="{StaticResource CollectionMenuFlyout}"
127+
Text="..." />
125128
</panels:FlexPanel>
126129
</Border>
127130

@@ -136,7 +139,6 @@
136139
</Border>
137140
</StackPanel>
138141
</TabItem.Header>
139-
140142
<TreeDataGrid x:Name="RequiredDownloadsTree" />
141143
</TabItem>
142144
<TabItem x:Name="OptionalTab">
@@ -151,7 +153,6 @@
151153
<TreeDataGrid x:Name="OptionalDownloadsTree" />
152154
</TabItem>
153155
</TabControl>
154-
155-
</StackPanel>
156+
</DockPanel>
156157

157158
</reactiveUi:ReactiveUserControl>

src/Themes/NexusMods.Themes.NexusFluentDark/Styles/UserControls/CollectionDownloadPage/CollectionDownloadPageStyles.axaml

+8-15
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
xmlns:panels="clr-namespace:Avalonia.Labs.Panels;assembly=Avalonia.Labs.Panels"
44
xmlns:collections="clr-namespace:NexusMods.App.UI.Pages.CollectionDownload;assembly=NexusMods.App.UI"
55
xmlns:icons="clr-namespace:NexusMods.Icons;assembly=NexusMods.Icons">
6+
67
<Design.PreviewWith>
7-
<Border Width="500" Height="500">
8+
<Border Width="800" Height="500">
89
<Border.Resources>
910
<collections:CollectionDownloadDesignViewModel x:Key="CollectionDownloadPageDesignViewModel" />
1011
</Border.Resources>
@@ -21,27 +22,19 @@
2122
</LinearGradientBrush>
2223
</Style.Resources>
2324

24-
<Style Selector="^ StackPanel#Body">
25-
<Setter Property="Orientation" Value="Vertical" />
26-
25+
<Style Selector="^ DockPanel#Body">
2726
<Style Selector="^ Border#HeaderBorderBackground">
28-
2927
<Style Selector="^ Border#HeaderBorder">
30-
<!-- <Setter Property="MaxWidth" Value="628" /> -->
3128
<Setter Property="HorizontalAlignment" Value="Stretch" />
3229
<Setter Property="Padding" Value="24,24,24,16" />
3330
<Setter Property="Background" Value="{StaticResource HeaderImageLinearGradientBrush}" />
34-
35-
36-
<Style Selector="^ StackPanel#Header">
37-
<!-- -->
38-
<!-- <Setter Property="HorizontalAlignment" Value="Left"/> -->
39-
40-
<!-- NOTE(insomnious): Some weird stuff happening here with max width and backgrounds. Layout wise
31+
32+
<!-- NOTE(insomnious): Some weird stuff happening here with max width and backgrounds. Layout wise
4133
it's working, as things are aligned correctly, but the background is not being applied correctly.
4234
After chatting with @Al12rs, we are leaving this for now as we can't fully test this (yet) and we
4335
don't want to add extra layout code for no reason -->
44-
36+
37+
<Style Selector="^ StackPanel#Header">
4538
<Style Selector="^ Border#MainContentBorder">
4639
<!-- <Setter Property="Background" Value="DarkGoldenrod" /> -->
4740
<Setter Property="Padding" Value="0, 0, 0, 24" />
@@ -133,7 +126,7 @@
133126
Value="{StaticResource NeutralTranslucentSubduedBrush}" />
134127
<Setter Property="TextWrapping" Value="Wrap" />
135128
<Setter Property="TextTrimming" Value="CharacterEllipsis" />
136-
</Style>
129+
</Style>
137130

138131
</Style>
139132

0 commit comments

Comments
 (0)