detect/detect.gui/Assets/Button.axaml

480 lines
24 KiB
Plaintext
Raw Permalink Normal View History

2024-11-13 17:09:15 +08:00
<Styles xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Styles.Resources>
<BoxShadows x:Key="TabRadioButtonShadows">inset 0 0 20 2 #006CC6</BoxShadows>
<SolidColorBrush x:Key="TabRadioButtonPointeroverBackgroundColor" Color="#45afdf" Opacity="0.8" />
<SolidColorBrush x:Key="TabRadioButtonCheckedBackgroundColor" Color="#3793d4" />
<BoxShadows x:Key="DarkTabRadioButtonShadows">inset 0 0 20 2 #3A62CB</BoxShadows>
<SolidColorBrush x:Key="DarkTabRadioButtonPointeroverBackgroundColor" Color="#3A62CB" Opacity="0.8" />
<SolidColorBrush x:Key="DarkTabRadioButtonCheckedBackgroundColor" Color="#3A62CB" Opacity="0.8" />
<BoxShadows x:Key="ButtonShadows">inset 0 0 30 2 #006CC6</BoxShadows>
<BoxShadows x:Key="WindowButtonShadows">inset 0 0 15 2 #2F1A9A</BoxShadows>
<SolidColorBrush x:Key="BlueButtonBackgroundColor" Color="{StaticResource Blue1}" />
<SolidColorBrush x:Key="BlueButtonPointeroverBackgroundColor" Color="#45afdf" Opacity="0.8" />
<LinearGradientBrush x:Key="ButtonPointeroverBackgroundColor" StartPoint="0% 0%" EndPoint="100% 0%">
<GradientStop Offset="0.0" Color="#3A62CB" />
<GradientStop Offset="0.5" Color="#68D9FF" />
<GradientStop Offset="1.0" Color="#3A62CB" />
</LinearGradientBrush>
</Styles.Resources>
<Style Selector="Button">
<Setter Property="FontFamily" Value="{StaticResource Font-Family}" />
</Style>
<Style Selector="Button.rect-button">
<Setter Property="Padding" Value="10,5" />
<Setter Property="CornerRadius" Value="6" />
<Setter Property="FontSize" Value="14" />
<Setter Property="Foreground" Value="{StaticResource Light}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Border x:Name="BackBorder"
CornerRadius="{TemplateBinding CornerRadius}">
<Border Background="{TemplateBinding Background}"
BoxShadow="{StaticResource ButtonShadows}"
CornerRadius="{TemplateBinding CornerRadius}"
Padding="{TemplateBinding Padding}"
Width="{TemplateBinding Width}"
Height="{TemplateBinding Height}">
<TextBlock Text="{TemplateBinding Content}"
FontFamily="{TemplateBinding FontFamily}"
FontSize="{TemplateBinding FontSize}"
Foreground="{TemplateBinding Foreground}"
HorizontalAlignment="Center" />
</Border>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style Selector="Button.rect-button:disabled">
<Setter Property="Foreground" Value="{StaticResource Gray}" />
</Style>
<Style Selector="Button.rect-button.login">
<Setter Property="FontSize" Value="16" />
</Style>
<Style Selector="Button.blue">
<Setter Property="Foreground" Value="{StaticResource Light}" />
<Setter Property="Background" Value="{StaticResource BlueButtonBackgroundColor}" />
</Style>
<Style Selector="Button.blue:pointerover">
<Setter Property="Background" Value="{StaticResource BlueButtonPointeroverBackgroundColor}" />
</Style>
<Style Selector="Button.blue:disabled">
<Setter Property="Foreground" Value="#bbbbbb" />
</Style>
<Style Selector="Button.icon-button">
<Setter Property="Margin" Value="0" />
<Setter Property="Width" Value="33" />
<Setter Property="Height" Value="33" />
<Setter Property="CornerRadius" Value="0" />
<Setter Property="Foreground" Value="{StaticResource Light}" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Border x:Name="BackBorder"
CornerRadius="{TemplateBinding CornerRadius}">
<Border Width="{TemplateBinding Width}"
Height="{TemplateBinding Height}"
CornerRadius="{Binding $parent.CornerRadius}">
<PathIcon Name="ButtonIcon"
Width="13"
Height="13"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Foreground="{TemplateBinding Foreground}"/>
</Border>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style Selector="Button.icon-button:disabled">
<Setter Property="Foreground" Value="{StaticResource Gray}" />
</Style>
<Style Selector="Button.icon-button:disabled /template/ Border#BackBorder">
<Setter Property="Background" Value="Transparent" />
</Style>
<Style Selector="Button.icon-button:pointerover /template/ Border#BackBorder">
<Setter Property="BoxShadow" Value="{StaticResource TabRadioButtonShadows}"/>
<Setter Property="Background" Value="{StaticResource TabRadioButtonPointeroverBackgroundColor}"/>
</Style>
<Style Selector="Button.circle">
<Setter Property="CornerRadius" Value="100" />
</Style>
<Style Selector="Button.window">
<Setter Property="Foreground" Value="{StaticResource Light}"/>
</Style>
<Style Selector="Button.window:disabled">
<Setter Property="Foreground" Value="{StaticResource Gray}"/>
</Style>
<Style Selector="Button.window:pointerover">
<Setter Property="Foreground" Value="{StaticResource Light}"/>
</Style>
<Style Selector="Button.window:pointerover /template/ Border#BackBorder">
<Setter Property="BoxShadow" Value="{StaticResource WindowButtonShadows}"/>
<Setter Property="Background" Value="{StaticResource BlueButtonPointeroverBackgroundColor}"/>
</Style>
<Style Selector="Button.page">
<Setter Property="Foreground" Value="{StaticResource Light}"/>
</Style>
<Style Selector="Button.page:disabled">
<Setter Property="Foreground" Value="{StaticResource Gray}"/>
</Style>
<Style Selector="Button.page:pointerover">
<Setter Property="Foreground" Value="{StaticResource Light}"/>
</Style>
<Style Selector="Button.page:pointerover /template/ Border#BackBorder">
<Setter Property="BoxShadow" Value="{StaticResource TabRadioButtonShadows}"/>
<Setter Property="Background" Value="{StaticResource TabRadioButtonPointeroverBackgroundColor}"/>
</Style>
<Style Selector="Button.list-item">
<Setter Property="FontFamily" Value="{StaticResource Font-Family}" />
<Setter Property="FontSize" Value="14" />
<Setter Property="CornerRadius" Value="6" />
<Setter Property="Foreground" Value="{StaticResource Light}" />
<Setter Property="Height" Value="38" />
<Setter Property="Template">
<ControlTemplate>
<Grid Height="{TemplateBinding Height}">
<Border Height="{TemplateBinding Height}"
CornerRadius="{TemplateBinding CornerRadius}"
BorderThickness="0"
BoxShadow="{StaticResource TabRadioButtonShadows}"
BorderBrush="{StaticResource Light}"
Background="{StaticResource TabRadioButtonCheckedBackgroundColor}"/>
<Border x:Name="BackBorder"
Height="{TemplateBinding Height}"
CornerRadius="{TemplateBinding CornerRadius}"
Padding="0"
BorderThickness="1"
Background="Transparent">
<Grid ColumnDefinitions="15, Auto, 10, *, 10, Auto, 15"
Width="{TemplateBinding Width}"
VerticalAlignment="Center">
<PathIcon Grid.Column="1"
x:Name="ButtonIcon"
Width="17"
Height="17"
Foreground="{TemplateBinding Foreground}" />
<TextBlock Grid.Column="3"
x:Name="ButtonText"
FontSize="{TemplateBinding FontSize}"
Foreground="{TemplateBinding Foreground}"
Text="{TemplateBinding Content}" />
<PathIcon Grid.Column="5"
x:Name="ArrowIcon"
Width="15"
Height="15"
Foreground="{TemplateBinding Foreground}" />
</Grid>
</Border>
</Grid>
</ControlTemplate>
</Setter>
</Style>
<Style Selector="Button.list-item:pointerover Border#BackBorder">
<Setter Property="BoxShadow" Value="{StaticResource TabRadioButtonShadows}" />
<Setter Property="Background" Value="{StaticResource TabRadioButtonPointeroverBackgroundColor}" />
</Style>
<Style Selector="Button.split">
<Setter Property="FontFamily" Value="{StaticResource Font-Family}" />
<Setter Property="FontSize" Value="14" />
<Setter Property="CornerRadius" Value="4" />
<Setter Property="Foreground" Value="{StaticResource Light}" />
<Setter Property="Width" Value="15" />
<Setter Property="Height" Value="58" />
<Setter Property="Template">
<ControlTemplate>
<Grid Height="{TemplateBinding Height}">
<Border Height="{TemplateBinding Height}"
CornerRadius="{TemplateBinding CornerRadius}"
BorderThickness="0"
BoxShadow="{StaticResource TabRadioButtonShadows}"
BorderBrush="{StaticResource Light}"
Background="Transparent"/>
<Border x:Name="BackBorder"
Height="{TemplateBinding Height}"
CornerRadius="{TemplateBinding CornerRadius}"
Padding="0"
BorderThickness="1"
Background="Transparent">
<PathIcon x:Name="ArrowIcon"
Width="10"
Height="10"
Foreground="{TemplateBinding Foreground}" />
</Border>
</Grid>
</ControlTemplate>
</Setter>
</Style>
<Style Selector="Button.split:pointerover Border#BackBorder">
<Setter Property="BoxShadow" Value="{StaticResource TabRadioButtonShadows}" />
<Setter Property="Background" Value="{StaticResource TabRadioButtonPointeroverBackgroundColor}" />
</Style>
<Style Selector="Button.filter">
<Setter Property="FontFamily" Value="{StaticResource Font-Family}" />
<Setter Property="FontSize" Value="14" />
<Setter Property="CornerRadius" Value="6" />
<Setter Property="Foreground" Value="{StaticResource Light}" />
<Setter Property="Template">
<ControlTemplate>
<Grid Height="{TemplateBinding Height}">
<Border Height="{TemplateBinding Height}"
CornerRadius="{TemplateBinding CornerRadius}"
BorderThickness="0"
BoxShadow="{StaticResource TabRadioButtonShadows}"
BorderBrush="{StaticResource Light}"
Background="{StaticResource TabRadioButtonCheckedBackgroundColor}"/>
<Border x:Name="BackBorder"
Height="{TemplateBinding Height}"
CornerRadius="{TemplateBinding CornerRadius}"
Padding="0"
BorderThickness="1"
Background="Transparent">
<Grid ColumnDefinitions="15, Auto, 10, *, 15"
Width="{TemplateBinding Width}"
VerticalAlignment="Center">
<PathIcon Grid.Column="1"
x:Name="ButtonIcon"
Width="12"
Height="12"
Foreground="{TemplateBinding Foreground}" />
<TextBlock Grid.Column="3"
x:Name="ButtonText"
FontSize="{TemplateBinding FontSize}"
Foreground="{TemplateBinding Foreground}"
Text="{TemplateBinding Content}" />
</Grid>
</Border>
</Grid>
</ControlTemplate>
</Setter>
</Style>
<Style Selector="Button.filter:pointerover Border#BackBorder">
<Setter Property="BoxShadow" Value="{StaticResource TabRadioButtonShadows}" />
<Setter Property="Background" Value="{StaticResource TabRadioButtonPointeroverBackgroundColor}" />
</Style>
<Style Selector="Button.filter-dark">
<Setter Property="FontFamily" Value="{StaticResource Font-Family}" />
<Setter Property="FontSize" Value="14" />
<Setter Property="CornerRadius" Value="6" />
<Setter Property="Foreground" Value="{StaticResource Light}" />
<Setter Property="Template">
<ControlTemplate>
<Grid Height="{TemplateBinding Height}">
<Border Height="{TemplateBinding Height}"
CornerRadius="{TemplateBinding CornerRadius}"
BorderThickness="0"
BoxShadow="{StaticResource DarkTabRadioButtonShadows}"
BorderBrush="{StaticResource Light}"
Background="{StaticResource DarkTabRadioButtonCheckedBackgroundColor}"/>
<Border x:Name="BackBorder"
Height="{TemplateBinding Height}"
CornerRadius="{TemplateBinding CornerRadius}"
Padding="0"
BorderThickness="1"
Background="Transparent">
<Grid ColumnDefinitions="15, Auto, 10, *, 15"
Width="{TemplateBinding Width}"
VerticalAlignment="Center">
<PathIcon Grid.Column="1"
x:Name="ButtonIcon"
Width="12"
Height="12"
Foreground="{TemplateBinding Foreground}" />
<TextBlock Grid.Column="3"
x:Name="ButtonText"
FontSize="{TemplateBinding FontSize}"
Foreground="{TemplateBinding Foreground}"
Text="{TemplateBinding Content}" />
</Grid>
</Border>
</Grid>
</ControlTemplate>
</Setter>
</Style>
<Style Selector="Button.filter-dark:pointerover Border#BackBorder">
<Setter Property="BoxShadow" Value="{StaticResource TabRadioButtonShadows}" />
<Setter Property="Background" Value="{StaticResource DarkTabRadioButtonPointeroverBackgroundColor}" />
</Style>
<Style Selector="Button.logout /template/ PathIcon#ButtonIcon">
<Setter Property="Data" Value="{StaticResource LogoutData}"/>
</Style>
<Style Selector="Button.close /template/ PathIcon#ButtonIcon">
<Setter Property="Data" Value="{StaticResource CloseData}"/>
</Style>
<Style Selector="Button.min /template/ PathIcon#ButtonIcon">
<Setter Property="Data" Value="{StaticResource MinData}"/>
</Style>
<Style Selector="Button.max /template/ PathIcon#ButtonIcon">
<Setter Property="Data" Value="{StaticResource MaxData}"/>
</Style>
<Style Selector="Button.restore /template/ PathIcon#ButtonIcon">
<Setter Property="Data" Value="{StaticResource RestoreData}"/>
</Style>
<Style Selector="Button.first-page /template/ PathIcon#ButtonIcon">
<Setter Property="Data" Value="{StaticResource PageFirstData}"/>
</Style>
<Style Selector="Button.left-page /template/ PathIcon#ButtonIcon">
<Setter Property="Data" Value="{StaticResource PageLeftData}"/>
</Style>
<Style Selector="Button.right-page /template/ PathIcon#ButtonIcon">
<Setter Property="Data" Value="{StaticResource PageRightData}"/>
</Style>
<Style Selector="Button.last-page /template/ PathIcon#ButtonIcon">
<Setter Property="Data" Value="{StaticResource PageLastData}"/>
</Style>
<Style Selector="Button.record-add /template/ PathIcon#ButtonIcon">
<Setter Property="Data" Value="{StaticResource RecordAddData}"/>
</Style>
<Style Selector="Button.record-edit /template/ PathIcon#ButtonIcon">
<Setter Property="Data" Value="{StaticResource RecordEditData}"/>
</Style>
<Style Selector="Button.record-delete /template/ PathIcon#ButtonIcon">
<Setter Property="Data" Value="{StaticResource RecordDeleteData}"/>
</Style>
<Style Selector="Button.record-reload /template/ PathIcon#ButtonIcon">
<Setter Property="Data" Value="{StaticResource RecordReLoadData}"/>
</Style>
<Style Selector="Button.record-search /template/ PathIcon#ButtonIcon">
<Setter Property="Data" Value="{StaticResource RecordSearchData}"/>
</Style>
<Style Selector="Button.record-detail /template/ PathIcon#ButtonIcon">
<Setter Property="Data" Value="{StaticResource RecordDetailData}"/>
</Style>
<Style Selector="Button.record-settings /template/ PathIcon#ButtonIcon">
<Setter Property="Data" Value="{StaticResource RecordSettingsData}"/>
</Style>
<Style Selector="Button.submit /template/ PathIcon#ButtonIcon">
<Setter Property="Data" Value="{StaticResource SubmitData}"/>
</Style>
<Style Selector="Button.ok /template/ PathIcon#ButtonIcon">
<Setter Property="Data" Value="{StaticResource OkData}"/>
</Style>
<Style Selector="Button.cancel /template/ PathIcon#ButtonIcon">
<Setter Property="Data" Value="{StaticResource CancelData}"/>
</Style>
<Style Selector="Button.tool-expand /template/ PathIcon#ButtonIcon">
<Setter Property="Data" Value="{StaticResource ToolExpandData}"/>
</Style>
<Style Selector="Button.tool-collapse /template/ PathIcon#ButtonIcon">
<Setter Property="Data" Value="{StaticResource ToolCollapseData}"/>
</Style>
<Style Selector="Button.tool-expand-all /template/ PathIcon#ButtonIcon">
<Setter Property="Data" Value="{StaticResource ToolExpandAllData}"/>
</Style>
<Style Selector="Button.tool-collapse-all /template/ PathIcon#ButtonIcon">
<Setter Property="Data" Value="{StaticResource ToolCollapseAllData}"/>
</Style>
<Style Selector="Button.tool-go-back /template/ PathIcon#ButtonIcon">
<Setter Property="Data" Value="{StaticResource ToolGoBackData}"/>
</Style>
<Style Selector="Button.run /template/ PathIcon#ButtonIcon">
<Setter Property="Data" Value="{StaticResource ToolRunData}"/>
</Style>
<Style Selector="Button.list-region /template/ PathIcon#ButtonIcon">
<Setter Property="Data" Value="{StaticResource ListRegionData}"/>
</Style>
<Style Selector="Button.list-region-left /template/ PathIcon#ArrowIcon">
<Setter Property="Data" Value="{StaticResource ToolExpandData}"/>
<Setter Property="RenderTransform">
<RotateTransform Angle="-90"></RotateTransform>
</Setter>
</Style>
<Style Selector="Button.list-region-down /template/ PathIcon#ArrowIcon">
<Setter Property="Data" Value="{StaticResource ToolExpandData}"/>
<Setter Property="RenderTransform">
<RotateTransform Angle="0"></RotateTransform>
</Setter>
</Style>
<Style Selector="Button.split-left /template/ PathIcon#ArrowIcon">
<Setter Property="Data" Value="{StaticResource ToolExpandData}"/>
<Setter Property="RenderTransform">
<RotateTransform Angle="90"></RotateTransform>
</Setter>
</Style>
<Style Selector="Button.split-right /template/ PathIcon#ArrowIcon">
<Setter Property="Data" Value="{StaticResource ToolExpandData}"/>
<Setter Property="RenderTransform">
<RotateTransform Angle="-90"></RotateTransform>
</Setter>
</Style>
<Style Selector="Button.search /template/ PathIcon#ButtonIcon">
<Setter Property="Data" Value="{StaticResource SearchData}"/>
</Style>
<Style Selector="Button.reset /template/ PathIcon#ButtonIcon">
<Setter Property="Data" Value="{StaticResource ResetData}"/>
</Style>
<Style Selector="Button.view /template/ PathIcon#ButtonIcon">
<Setter Property="Data" Value="{StaticResource ViewData}"/>
</Style>
<Style Selector="Button.video-control-button">
<Setter Property="Width" Value="32" />
<Setter Property="Height" Value="32" />
<Setter Property="CornerRadius" Value="0" />
<Setter Property="Foreground" Value="{StaticResource Light}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Border Background="Transparent"
CornerRadius="2"
Padding="4">
<Border CornerRadius="50"
Width="24"
Height="24"
Name="ButtonBorder"
VerticalAlignment="Center" HorizontalAlignment="Center">
<PathIcon Name="ButtonIcon"
Foreground="{TemplateBinding Foreground}"
Width="24"
Height="24"
CornerRadius="50" />
</Border>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style Selector="Button.video-control-button:disabled">
<Setter Property="Foreground" Value="#999999" />
</Style>
<Style Selector="Button.video-control-button:pointerover /template/ Border#ButtonBorder">
<Setter Property="Background" Value="#13265a"/>
</Style>
<Style Selector="Button.video-control-button.play /template/ PathIcon#ButtonIcon">
<Setter Property="PathIcon.Data" Value="{StaticResource VideoPlayData}"/>
</Style>
<Style Selector="Button.video-control-button.stop /template/ PathIcon#ButtonIcon">
<Setter Property="PathIcon.Data" Value="{StaticResource VideoStopData}"/>
</Style>
<Style Selector="Button.video-control-button.pause /template/ PathIcon#ButtonIcon">
<Setter Property="PathIcon.Data" Value="{StaticResource VideoPauseData}"/>
</Style>
</Styles>