mirror of
https://github.com/SourMesen/Mesen2.git
synced 2025-04-02 10:21:44 -04:00
310 lines
16 KiB
XML
310 lines
16 KiB
XML
<Styles xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
|
|
|
<Design.PreviewWith>
|
|
<DataBox />
|
|
</Design.PreviewWith>
|
|
|
|
<Styles.Resources>
|
|
|
|
<Thickness x:Key="DataGridTextColumnCellTextBlockMargin">12,0,12,0</Thickness>
|
|
|
|
<x:Double x:Key="ListAccentLowOpacity">0.6</x:Double>
|
|
<x:Double x:Key="ListAccentMediumOpacity">0.8</x:Double>
|
|
|
|
<StreamGeometry x:Key="DataGridSortIconDescendingPath">M1875 1011l-787 787v-1798h-128v1798l-787 -787l-90 90l941 941l941 -941z</StreamGeometry>
|
|
<StreamGeometry x:Key="DataGridSortIconAscendingPath">M1965 947l-941 -941l-941 941l90 90l787 -787v1798h128v-1798l787 787z</StreamGeometry>
|
|
|
|
<SolidColorBrush x:Key="DataGridGridLinesBrush" Color="{StaticResource SystemBaseMediumLowColor}" Opacity="0.4" />
|
|
<SolidColorBrush x:Key="DataGridDropLocationIndicatorBackground" Color="#3F4346" />
|
|
<SolidColorBrush x:Key="DataGridDisabledVisualElementBackground" Color="#8CFFFFFF" />
|
|
<SolidColorBrush x:Key="DataGridFillerGridLinesBrush" Color="Transparent" />
|
|
<SolidColorBrush x:Key="DataGridCurrencyVisualPrimaryBrush" Color="Transparent" />
|
|
<StaticResource x:Key="DataGridColumnHeaderBackgroundColor" ResourceKey="SystemAltHighColor" />
|
|
<StaticResource x:Key="DataGridScrollBarsSeparatorBackground" ResourceKey="SystemChromeLowColor" />
|
|
<StaticResource x:Key="DataGridColumnHeaderHoveredBackgroundColor" ResourceKey="SystemListLowColor" />
|
|
<StaticResource x:Key="DataGridColumnHeaderPressedBackgroundColor" ResourceKey="SystemListMediumColor" />
|
|
<StaticResource x:Key="DataGridColumnHeaderDraggedBackgroundBrush" ResourceKey="SystemControlBackgroundChromeMediumLowBrush" />
|
|
<StaticResource x:Key="DataGridColumnHeaderPointerOverBrush" ResourceKey="SystemControlHighlightListLowBrush" />
|
|
<StaticResource x:Key="DataGridColumnHeaderPressedBrush" ResourceKey="SystemControlHighlightListMediumBrush" />
|
|
<StaticResource x:Key="DataGridDetailsPresenterBackgroundBrush" ResourceKey="SystemControlBackgroundChromeMediumLowBrush" />
|
|
<StaticResource x:Key="DataGridFillerColumnGridLinesBrush" ResourceKey="DataGridFillerGridLinesBrush" />
|
|
<StaticResource x:Key="DataGridRowSelectedBackgroundColor" ResourceKey="SystemAccentColor" />
|
|
<StaticResource x:Key="DataGridRowSelectedBackgroundOpacity" ResourceKey="ListAccentLowOpacity" />
|
|
<StaticResource x:Key="DataGridRowSelectedHoveredBackgroundColor" ResourceKey="SystemAccentColor" />
|
|
<StaticResource x:Key="DataGridRowSelectedHoveredBackgroundOpacity" ResourceKey="ListAccentMediumOpacity" />
|
|
<StaticResource x:Key="DataGridRowSelectedUnfocusedBackgroundColor" ResourceKey="SystemAccentColor" />
|
|
<StaticResource x:Key="DataGridRowSelectedUnfocusedBackgroundOpacity" ResourceKey="ListAccentLowOpacity" />
|
|
<StaticResource x:Key="DataGridRowSelectedHoveredUnfocusedBackgroundColor" ResourceKey="SystemAccentColor" />
|
|
<StaticResource x:Key="DataGridRowSelectedHoveredUnfocusedBackgroundOpacity" ResourceKey="ListAccentMediumOpacity" />
|
|
<StaticResource x:Key="DataGridRowHeaderForegroundBrush" ResourceKey="SystemControlForegroundBaseMediumBrush" />
|
|
<StaticResource x:Key="DataGridRowHeaderBackgroundBrush" ResourceKey="SystemControlBackgroundAltHighBrush" />
|
|
<StaticResource x:Key="DataGridRowGroupHeaderBackgroundBrush" ResourceKey="SystemControlBackgroundChromeMediumBrush" />
|
|
<StaticResource x:Key="DataGridRowGroupHeaderHoveredBackgroundBrush" ResourceKey="SystemControlBackgroundListLowBrush" />
|
|
<StaticResource x:Key="DataGridRowGroupHeaderPressedBackgroundBrush" ResourceKey="SystemControlBackgroundListMediumBrush" />
|
|
<StaticResource x:Key="DataGridRowGroupHeaderForegroundBrush" ResourceKey="SystemControlForegroundBaseHighBrush" />
|
|
<StaticResource x:Key="DataGridRowInvalidBrush" ResourceKey="SystemErrorTextColor" />
|
|
<StaticResource x:Key="DataGridCellBackgroundBrush" ResourceKey="SystemControlTransparentBrush" />
|
|
<StaticResource x:Key="DataGridCellFocusVisualPrimaryBrush" ResourceKey="SystemControlFocusVisualPrimaryBrush" />
|
|
<StaticResource x:Key="DataGridCellFocusVisualSecondaryBrush" ResourceKey="SystemControlFocusVisualSecondaryBrush" />
|
|
<StaticResource x:Key="DataGridCellInvalidBrush" ResourceKey="SystemErrorTextColor" />
|
|
|
|
</Styles.Resources>
|
|
|
|
<Style Selector="DataBox">
|
|
<Setter Property="GridLinesVisibility" Value="None" />
|
|
<Setter Property="HorizontalGridLinesBrush" Value="{DynamicResource DataGridGridLinesBrush}" />
|
|
<Setter Property="VerticalGridLinesBrush" Value="{DynamicResource DataGridGridLinesBrush}" />
|
|
<Setter Property="Background" Value="Transparent" />
|
|
<Setter Property="Focusable" Value="True" />
|
|
<Setter Property="Template">
|
|
<ControlTemplate>
|
|
<DockPanel>
|
|
<ScrollViewer Name="PART_HeadersPresenterScrollViewer"
|
|
HorizontalScrollBarVisibility="Hidden"
|
|
VerticalScrollBarVisibility="Disabled"
|
|
DockPanel.Dock="Top">
|
|
<DataBoxColumnHeadersPresenter Name="PART_HeadersPresenter" />
|
|
</ScrollViewer>
|
|
<Rectangle Name="PART_ColumnHeadersAndRowsSeparator" DockPanel.Dock="Top" />
|
|
<Panel>
|
|
<DataBoxRowsPresenter Name="PART_RowsPresenter" SelectionMode="{Binding SelectionMode, RelativeSource={RelativeSource TemplatedParent}}" />
|
|
</Panel>
|
|
</DockPanel>
|
|
</ControlTemplate>
|
|
</Setter>
|
|
</Style>
|
|
<Style Selector="DataBox /template/ Rectangle#PART_ColumnHeadersAndRowsSeparator">
|
|
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
<Setter Property="Height" Value="1" />
|
|
<Setter Property="Margin" Value="0" />
|
|
<Setter Property="Fill" Value="{DynamicResource DataGridGridLinesBrush}" />
|
|
<Setter Property="Opacity" Value="0.4" />
|
|
</Style>
|
|
|
|
<Style Selector="DataBoxRowsPresenter">
|
|
<Setter Property="TextBlock.Foreground" Value="{DynamicResource SystemControlForegroundBaseHighBrush}" />
|
|
<Setter Property="Background" Value="Transparent" />
|
|
<Setter Property="BorderBrush" Value="Transparent" />
|
|
<Setter Property="BorderThickness" Value="0" />
|
|
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
|
|
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
|
|
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
|
|
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
|
<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="{TemplateBinding (ScrollViewer.AllowAutoHide)}">
|
|
<ItemsPresenter Name="PART_ItemsPresenter"
|
|
ItemsPanel="{TemplateBinding ItemsPanel}"
|
|
Margin="{TemplateBinding Padding}" />
|
|
</ScrollViewer>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter>
|
|
<Setter Property="ItemsPanel">
|
|
<Setter.Value>
|
|
<ItemsPanelTemplate>
|
|
<DataBoxPanel />
|
|
</ItemsPanelTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style Selector="DataBoxPanel">
|
|
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
|
<Setter Property="VerticalAlignment" Value="Stretch" />
|
|
<Setter Property="Orientation" Value="Vertical" />
|
|
<Setter Property="Margin" Value="-1 0 0 0" />
|
|
</Style>
|
|
|
|
<Style Selector="DataBoxColumnHeadersPresenter">
|
|
<Setter Property="HorizontalAlignment" Value="Left" />
|
|
<Setter Property="VerticalAlignment" Value="Top" />
|
|
<Setter Property="Background" Value="Transparent" />
|
|
|
|
<!-- Right margin to fix issue when h-scrolling all the way to the right -->
|
|
<Setter Property="Margin" Value="-1 0 30 0" />
|
|
</Style>
|
|
|
|
<Style Selector="DataBoxColumnHeader Panel#PanelResize Rectangle">
|
|
<Setter Property="IsVisible" Value="False" />
|
|
</Style>
|
|
|
|
<Style Selector="DataBoxColumnHeader:nth-last-child(1) Panel#PanelResize Rectangle">
|
|
<Setter Property="IsVisible" Value="True" />
|
|
</Style>
|
|
|
|
<Style Selector="DataBoxColumnHeader Panel#PanelResizeRight">
|
|
<Setter Property="Cursor" Value="SizeWestEast" />
|
|
</Style>
|
|
|
|
<Style Selector="DataBoxColumnHeader:nth-child(1) Panel#PanelResizeRight">
|
|
<Setter Property="Cursor" Value="Arrow" />
|
|
</Style>
|
|
|
|
<Style Selector="DataBoxColumnHeader">
|
|
<Setter Property="Foreground" Value="{DynamicResource DataGridColumnHeaderForegroundBrush}" />
|
|
<Setter Property="Background" Value="{DynamicResource DataGridColumnHeaderBackgroundBrush}" />
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
<Setter Property="Focusable" Value="False" />
|
|
<Setter Property="SeparatorBrush" Value="{DynamicResource DataGridGridLinesBrush}" />
|
|
<Setter Property="Padding" Value="12,0,0,0" />
|
|
<Setter Property="FontSize" Value="12" />
|
|
<Setter Property="MinHeight" Value="32" />
|
|
<Setter Property="Template">
|
|
<ControlTemplate>
|
|
<DockPanel Name="PART_ColumnHeaderRoot"
|
|
Background="{TemplateBinding Background}">
|
|
<Panel Name="PanelResize" DockPanel.Dock="Right" Cursor="SizeWestEast" Background="Transparent" Width="4" Margin="0">
|
|
<Rectangle Name="VerticalSeparator"
|
|
Width="1"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Stretch"
|
|
Fill="{TemplateBinding SeparatorBrush}"
|
|
/>
|
|
</Panel>
|
|
<Panel Name="PanelResizeRight" DockPanel.Dock="Left" Width="4" Margin="0" VerticalAlignment="Stretch" Background="Transparent">
|
|
<Rectangle Name="VerticalSeparatorRight"
|
|
Width="1"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Stretch"
|
|
Fill="{TemplateBinding SeparatorBrush}"
|
|
/>
|
|
</Panel>
|
|
<Path Name="SortIcon"
|
|
DockPanel.Dock="Right"
|
|
Fill="{TemplateBinding Foreground}"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Stretch="Uniform"
|
|
Height="12"
|
|
MinWidth="24"/>
|
|
|
|
<TextBlock
|
|
Text="{TemplateBinding SortNumber}"
|
|
DockPanel.Dock="Right"
|
|
Padding="0 0 3 0"
|
|
VerticalAlignment="Center"
|
|
/>
|
|
|
|
<ContentPresenter Content="{TemplateBinding Content}"
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
Margin="{TemplateBinding Padding}"/>
|
|
</DockPanel>
|
|
</ControlTemplate>
|
|
</Setter>
|
|
</Style>
|
|
<Style Selector="DataBoxColumnHeader:pointerover /template/ DockPanel#PART_ColumnHeaderRoot">
|
|
<Setter Property="Background" Value="{DynamicResource DataGridColumnHeaderHoveredBackgroundColor}" />
|
|
</Style>
|
|
<Style Selector="DataBoxColumnHeader:pressed /template/ DockPanel#PART_ColumnHeaderRoot">
|
|
<Setter Property="Background" Value="{DynamicResource DataGridColumnHeaderPressedBackgroundColor}" />
|
|
</Style>
|
|
<Style Selector="DataBoxColumnHeader /template/ Path#SortIcon">
|
|
<Setter Property="IsVisible" Value="False" />
|
|
</Style>
|
|
<Style Selector="DataBoxColumnHeader:sortascending /template/ Path#SortIcon">
|
|
<Setter Property="IsVisible" Value="True" />
|
|
<Setter Property="Data" Value="{StaticResource DataGridSortIconAscendingPath}" />
|
|
</Style>
|
|
<Style Selector="DataBoxColumnHeader:sortdescending /template/ Path#SortIcon">
|
|
<Setter Property="IsVisible" Value="True" />
|
|
<Setter Property="Data" Value="{StaticResource DataGridSortIconDescendingPath}" />
|
|
</Style>
|
|
|
|
<Style Selector="DataBoxCellsPresenter">
|
|
<Setter Property="HorizontalAlignment" Value="Left" />
|
|
<Setter Property="VerticalAlignment" Value="Stretch" />
|
|
<Setter Property="Background" Value="Transparent" />
|
|
</Style>
|
|
|
|
<Style Selector="DataBoxRow">
|
|
<Setter Property="Background" Value="Transparent" />
|
|
<Setter Property="Margin" Value="0" />
|
|
<Setter Property="Padding" Value="0" />
|
|
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
|
<Setter Property="TextBlock.FontWeight" Value="Normal" />
|
|
<Setter Property="TextBlock.FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
|
|
<Setter Property="Template">
|
|
<ControlTemplate>
|
|
<Grid Name="PART_Root" RowDefinitions="*,Auto" ColumnDefinitions="*,Auto">
|
|
<Rectangle Grid.Row="0" Grid.ColumnSpan="2" Name="BackgroundRectangle" />
|
|
<DataBoxCellsPresenter Grid.Row="0" Grid.ColumnSpan="2" Name="PART_CellsPresenter"/>
|
|
<Rectangle Grid.Row="1" Grid.ColumnSpan="2" Name="PART_BottomGridLine"/>
|
|
<Rectangle Grid.Column="1" Name="RightBorder" VerticalAlignment="Stretch" Width="1" Fill="{DynamicResource DataGridGridLinesBrush}" />
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style Selector="DataBoxRow /template/ Rectangle#PART_BottomGridLine">
|
|
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
<Setter Property="Height" Value="1" />
|
|
<Setter Property="Fill" Value="{DynamicResource DataGridGridLinesBrush}" />
|
|
<Setter Property="Opacity" Value="0.4" />
|
|
</Style>
|
|
<Style Selector="DataBoxRow /template/ Rectangle#BackgroundRectangle">
|
|
<Setter Property="Fill" Value="{DynamicResource SystemControlTransparentBrush}" />
|
|
</Style>
|
|
<Style Selector="DataBoxRow:pointerover /template/ Rectangle#BackgroundRectangle">
|
|
<Setter Property="Fill" Value="{DynamicResource SystemListLowColor}" />
|
|
</Style>
|
|
<Style Selector="DataBoxRow:selected /template/ Rectangle#BackgroundRectangle">
|
|
<Setter Property="Fill" Value="{DynamicResource DataGridRowSelectedUnfocusedBackgroundColor}" />
|
|
<Setter Property="Opacity" Value="{DynamicResource DataGridRowSelectedUnfocusedBackgroundOpacity}" />
|
|
</Style>
|
|
<Style Selector="DataBoxRow:selected:pointerover /template/ Rectangle#BackgroundRectangle">
|
|
<Setter Property="Fill" Value="{DynamicResource DataGridRowSelectedHoveredUnfocusedBackgroundColor}" />
|
|
<Setter Property="Opacity" Value="{DynamicResource DataGridRowSelectedHoveredUnfocusedBackgroundOpacity}" />
|
|
</Style>
|
|
<Style Selector="DataBoxRow:selected:focus /template/ Rectangle#BackgroundRectangle">
|
|
<Setter Property="Fill" Value="{DynamicResource DataGridRowSelectedBackgroundColor}" />
|
|
<Setter Property="Opacity" Value="{DynamicResource DataGridRowSelectedBackgroundOpacity}" />
|
|
</Style>
|
|
<Style Selector="DataBoxRow:selected:pointerover:focus /template/ Rectangle#BackgroundRectangle">
|
|
<Setter Property="Fill" Value="{DynamicResource DataGridRowSelectedHoveredBackgroundColor}" />
|
|
<Setter Property="Opacity" Value="{DynamicResource DataGridRowSelectedHoveredBackgroundOpacity}" />
|
|
</Style>
|
|
|
|
<Style Selector="DataBoxCell">
|
|
<Setter Property="Background" Value="{DynamicResource DataGridCellBackgroundBrush}" />
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
|
<Setter Property="VerticalContentAlignment" Value="Stretch" />
|
|
<Setter Property="FontSize" Value="15" />
|
|
<Setter Property="MinHeight" Value="32" />
|
|
<Setter Property="Focusable" Value="False" />
|
|
<Setter Property="Template">
|
|
<ControlTemplate>
|
|
<Grid x:Name="PART_CellRoot"
|
|
ColumnDefinitions="Auto,*"
|
|
Background="{TemplateBinding Background}">
|
|
<ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}"
|
|
Grid.Column="1"
|
|
Content="{TemplateBinding Content}"
|
|
Margin="{TemplateBinding Padding}"
|
|
TextBlock.Foreground="{TemplateBinding Foreground}"
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
|
|
<Rectangle Name="PART_RightGridLine"
|
|
Grid.Column="0"
|
|
VerticalAlignment="Stretch"
|
|
Width="1"
|
|
Fill="{DynamicResource DataGridGridLinesBrush}" />
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter>
|
|
</Style>
|
|
|
|
</Styles>
|