Fix scrollbar being overlapped by titlebar
Some checks failed
LANCommander SDK Release / prep (push) Failing after 15s
LANCommander Release / prep (push) Failing after 1m3s
LANCommander SDK Release / publish (push) Has been skipped
LANCommander Release / build_server_linux_arm64 (push) Has been skipped
LANCommander Release / build_server_linux_x64 (push) Has been skipped
LANCommander Release / build_server_osx_arm64 (push) Has been skipped
LANCommander Release / build_server_osx_x64 (push) Has been skipped
LANCommander Release / build_server_win_arm64 (push) Has been skipped
LANCommander Release / build_server_win_x64 (push) Has been skipped
LANCommander Release / build_launcher_avalonia_linux_x64 (push) Has been skipped
LANCommander Release / build_launcher_avalonia_osx_arm64 (push) Has been skipped
LANCommander Release / build_launcher_avalonia_osx_x64 (push) Has been skipped
LANCommander Release / build_launcher_avalonia_win_x64 (push) Has been skipped
LANCommander Release / build_release (push) Has been skipped

This commit is contained in:
Pat Hartl 2026-05-28 00:14:22 -05:00
parent a577d6f898
commit ab22e0aeb0
8 changed files with 19 additions and 5 deletions

View file

@ -25,6 +25,14 @@
<Setter Property="FontSize" Value="16" />
</Style>
<!-- Offset the vertical scrollbar so it doesn't overlap the floating titlebar -->
<Style Selector="ScrollViewer.TitlebarOffset /template/ ScrollBar#PART_VerticalScrollBar">
<Setter Property="Margin" Value="0,40,0,0" />
</Style>
<Style Selector="ListBox.TitlebarOffset /template/ ScrollViewer /template/ ScrollBar#PART_VerticalScrollBar">
<Setter Property="Margin" Value="0,40,0,0" />
</Style>
<!-- Icon control template (PathIcon ControlTheme is not inherited by subclasses in Avalonia 11) -->
<!-- Default: stroke-based rendering for Regular, Light, Thin, DuoTone, Bold variants -->
<Style Selector="Icon">

View file

@ -24,7 +24,8 @@
</Style>
</UserControl.Styles>
<ScrollViewer HorizontalScrollBarVisibility="Disabled"
<ScrollViewer Classes="TitlebarOffset"
HorizontalScrollBarVisibility="Disabled"
controls:ScrollPersistence.ViewModel="{Binding}">
<StackPanel Margin="10,48,10,24" Spacing="32" Grid.IsSharedSizeScope="True">

View file

@ -20,7 +20,8 @@
</Style>
</UserControl.Styles>
<ScrollViewer HorizontalScrollBarVisibility="Disabled"
<ScrollViewer Classes="TitlebarOffset"
HorizontalScrollBarVisibility="Disabled"
GotFocus="OnScrollViewerGotFocus">
<Grid RowDefinitions="Auto,*">

View file

@ -9,6 +9,7 @@
x:DataType="vm:GamesCollectionViewModel">
<ScrollViewer x:Name="FlatGridScrollViewer"
Classes="TitlebarOffset"
HorizontalScrollBarVisibility="Disabled"
VerticalScrollBarVisibility="Auto"
controls:ScrollPersistence.ViewModel="{Binding}"

View file

@ -14,6 +14,7 @@
so all group headers are always realized and A-Z index scrolling works.
Inner per-group repeaters remain virtualizing for cover/list items. -->
<ScrollViewer x:Name="GroupedScrollViewer"
Classes="TitlebarOffset"
Grid.Column="0"
HorizontalScrollBarVisibility="Disabled"
VerticalScrollBarVisibility="Auto"

View file

@ -46,7 +46,7 @@
</UserControl.Styles>
<ListBox x:Name="GamesListBox"
Classes="GamesList"
Classes="GamesList TitlebarOffset"
ItemsSource="{Binding Games}"
SelectedItem="{Binding SelectedGame}"
Padding="0,56,0,0"

View file

@ -7,7 +7,8 @@
x:Class="LANCommander.Launcher.Avalonia.Views.GamesShelfView"
x:DataType="vm:GamesCollectionViewModel">
<ScrollViewer HorizontalScrollBarVisibility="Auto"
<ScrollViewer Classes="TitlebarOffset"
HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Disabled"
controls:ScrollPersistence.ViewModel="{Binding}">
<ItemsRepeater ItemsSource="{Binding Games}" Margin="12,52,12,24" ClipToBounds="False"

View file

@ -54,7 +54,7 @@
BorderThickness="0,0,1,0"
Margin="0,48,0,0">
<ListBox x:Name="GameListBox"
Classes="CompactGamesList"
Classes="CompactGamesList TitlebarOffset"
ItemsSource="{Binding Games}"
SelectedItem="{Binding SelectedGame}"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
@ -88,6 +88,7 @@
<!-- ═══ RIGHT PANEL: Carousels + Grid ═══ -->
<ScrollViewer x:Name="RightPanelScrollViewer"
Classes="TitlebarOffset"
Grid.Column="1"
HorizontalScrollBarVisibility="Disabled"
VerticalScrollBarVisibility="Auto"