mirror of
https://github.com/SourMesen/Mesen2.git
synced 2025-04-02 10:21:44 -04:00
Notes: -Uses a copy of VirtualizingStackPanel (to include fixes done after preview6) + fix another issue in lists -Fixes memory leaks when closing windows (by setting DataContext to null, etc.)
88 lines
3.4 KiB
XML
88 lines
3.4 KiB
XML
<Styles
|
|
xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:sys="clr-namespace:System;assembly=netstandard"
|
|
xmlns:c="using:Mesen.Controls"
|
|
>
|
|
<Styles.Resources>
|
|
<!-- used by DataBox -->
|
|
<Color x:Key="DataGridRowSelectedUnfocusedBackgroundColor">#0078D7</Color>
|
|
<Color x:Key="DataGridRowSelectedHoveredUnfocusedBackgroundColor">#0078D7</Color>
|
|
<Color x:Key="DataGridRowSelectedBackgroundColor">#0078D7</Color>
|
|
|
|
<x:Double x:Key="DataGridRowSelectedUnfocusedBackgroundOpacity">1.0</x:Double>
|
|
<x:Double x:Key="DataGridRowSelectedHoveredUnfocusedBackgroundOpacity">1.0</x:Double>
|
|
<x:Double x:Key="DataGridRowSelectedBackgroundOpacity">1.0</x:Double>
|
|
<x:Double x:Key="DataGridRowSelectedHoveredBackgroundOpacity">1.0</x:Double>
|
|
|
|
<Thickness x:Key="DataGridTextColumnCellTextBlockMargin">4,2,4,0</Thickness>
|
|
</Styles.Resources>
|
|
|
|
<!-- Data box -->
|
|
<Style Selector="DataBoxColumnHeader">
|
|
<Setter Property="MinHeight" Value="16" />
|
|
<Setter Property="Padding" Value="3 0 0 0" />
|
|
</Style>
|
|
<Style Selector="DataBoxRow">
|
|
<Setter Property="FocusAdorner">
|
|
<FocusAdornerTemplate>
|
|
</FocusAdornerTemplate>
|
|
</Setter>
|
|
</Style>
|
|
<Style Selector="DataBoxRow TextBlock">
|
|
<Setter Property="Foreground" Value="{DynamicResource ThemeForegroundBrush}" />
|
|
</Style>
|
|
<Style Selector="DataBoxRow:selected TextBlock">
|
|
<Setter Property="Foreground" Value="White" />
|
|
</Style>
|
|
<Style Selector="DataBoxCell">
|
|
<Setter Property="MinHeight" Value="16" />
|
|
<Setter Property="Height" Value="16" />
|
|
</Style>
|
|
<Style Selector="DataBoxCell CheckBox">
|
|
<Setter Property="MinHeight" Value="16" />
|
|
<Setter Property="MinWidth" Value="16" />
|
|
<Setter Property="Padding" Value="2 0 0 0" />
|
|
</Style>
|
|
<Style Selector="DataBoxCell CheckBox /template/ Grid">
|
|
<Setter Property="Height" Value="16" />
|
|
<Setter Property="MaxHeight" Value="16" />
|
|
</Style>
|
|
<Style Selector="DataBoxCell CheckBox /template/ Grid > Grid">
|
|
<Setter Property="Height" Value="16" />
|
|
<Setter Property="MaxHeight" Value="16" />
|
|
</Style>
|
|
<Style Selector="DataBoxRow:selected CheckBox Border">
|
|
<Setter Property="BorderBrush" Value="White" />
|
|
</Style>
|
|
<Style Selector="DataBoxRow:selected CheckBox Path">
|
|
<Setter Property="Stroke" Value="White" />
|
|
<Setter Property="Fill" Value="White" />
|
|
</Style>
|
|
<Style Selector="DataBoxColumnHeader Path">
|
|
<Setter Property="Margin" Value="0 0 -10 0" />
|
|
</Style>
|
|
<Style Selector="DataBoxRowsPresenter">
|
|
<Setter Property="ScrollViewer.AllowAutoHide" Value="False" />
|
|
|
|
<!-- Temporary - Fixes crash with AllowAutoHide after upgrading to the nightly Avalonia build -->
|
|
<Setter Property="Template">
|
|
<ControlTemplate>
|
|
<Border Name="border"
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
CornerRadius="{TemplateBinding CornerRadius}">
|
|
<ScrollViewer Name="PART_ScrollViewer"
|
|
HorizontalScrollBarVisibility="{TemplateBinding (ScrollViewer.HorizontalScrollBarVisibility)}"
|
|
VerticalScrollBarVisibility="{TemplateBinding (ScrollViewer.VerticalScrollBarVisibility)}"
|
|
AllowAutoHide="False">
|
|
<ItemsPresenter Name="PART_ItemsPresenter"
|
|
ItemsPanel="{TemplateBinding ItemsPanel}"
|
|
Margin="{TemplateBinding Padding}"/>
|
|
</ScrollViewer>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter>
|
|
</Style>
|
|
</Styles>
|