mirror of
https://github.com/par274/sharpemu.git
synced 2026-08-28 12:20:43 +08:00
[GUI] Add grid settings to GUI and implement grid snapping (#729)
This commit is contained in:
@@ -9,8 +9,25 @@ Cover-art library item states and motion.
|
||||
<Style Selector="ListBox.tileGrid">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="Padding" Value="4,0,28,0" />
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Hidden" />
|
||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled" />
|
||||
<Setter Property="ItemsPanel">
|
||||
<ItemsPanelTemplate>
|
||||
<VirtualizingStackPanel Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style Selector="ListBox.tileGrid.gridLayout">
|
||||
<Setter Property="Padding" Value="4,0,14,0" />
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
|
||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
|
||||
<Setter Property="ItemsPanel">
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel />
|
||||
</ItemsPanelTemplate>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style Selector="ListBox.tileGrid ListBoxItem">
|
||||
<Setter Property="Width" Value="160" />
|
||||
@@ -35,6 +52,25 @@ Cover-art library item states and motion.
|
||||
</Transitions>
|
||||
</Setter>
|
||||
</Style>
|
||||
<!-- The title rides along in the item template so both layouts share one
|
||||
template. The rail hides it because the selected game already names
|
||||
itself in the details below the covers. -->
|
||||
<Style Selector="TextBlock.libraryTileName">
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
<Setter Property="FontSize" Value="12" />
|
||||
<Setter Property="FontWeight" Value="SemiBold" />
|
||||
<Setter Property="LineHeight" Value="16" />
|
||||
<Setter Property="Foreground" Value="{StaticResource TextBrush}" />
|
||||
</Style>
|
||||
<Style Selector="ListBox.tileGrid.gridLayout TextBlock.libraryTileName">
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
</Style>
|
||||
<Style Selector="ListBox.tileGrid.gridLayout ListBoxItem">
|
||||
<Setter Property="Height" Value="200" />
|
||||
<Setter Property="Margin" Value="0,6,12,10" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Top" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="ListBox.tileGrid ListBoxItem:pointerover,
|
||||
ListBox.tileGrid ListBoxItem:selected">
|
||||
<Setter Property="Opacity" Value="1" />
|
||||
|
||||
Reference in New Issue
Block a user