feat: utilize combobox popup resources.

This commit is contained in:
rabbitism
2024-11-16 15:55:55 +08:00
parent 4cb60fe9ce
commit c133c7e1ff
8 changed files with 9 additions and 7 deletions

View File

@@ -74,7 +74,7 @@
Placement="BottomEdgeAlignedLeft"
PlacementTarget="{TemplateBinding}">
<Border
Margin="8"
Margin="{DynamicResource ComboBoxPopupBorderMargin}"
Padding="8"
Background="{DynamicResource ComboBoxPopupBackground}"
BorderBrush="{DynamicResource ComboBoxPopupBorderBrush}"

View File

@@ -82,7 +82,7 @@
Placement="BottomEdgeAlignedLeft"
PlacementTarget="Background">
<Border
Margin="8"
Margin="{DynamicResource ComboBoxPopupBorderMargin}"
Padding="8"
HorizontalAlignment="Stretch"
Background="{DynamicResource ComboBoxPopupBackground}"

View File

@@ -73,7 +73,7 @@
Placement="BottomEdgeAlignedLeft"
PlacementTarget="{TemplateBinding}">
<Border
Margin="8"
Margin="{DynamicResource ComboBoxPopupBorderMargin}"
Padding="8"
Background="{DynamicResource ComboBoxPopupBackground}"
BorderBrush="{DynamicResource ComboBoxPopupBorderBrush}"

View File

@@ -110,7 +110,7 @@
IsOpen="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsDropDownOpen, Mode=TwoWay}"
PlacementTarget="PART_RootGrid">
<Border
Margin="0,4"
Margin="{DynamicResource ComboBoxPopupBorderMargin}"
HorizontalAlignment="Stretch"
Background="{DynamicResource ComboBoxPopupBackground}"
BorderBrush="{DynamicResource ComboBoxPopupBorderBrush}"

View File

@@ -159,7 +159,7 @@
Placement="BottomEdgeAlignedLeft"
PlacementTarget="Background">
<Border
Margin="0,4"
Margin="{DynamicResource ComboBoxPopupBorderMargin}"
HorizontalAlignment="Stretch"
Background="{DynamicResource ComboBoxPopupBackground}"
BorderBrush="{DynamicResource ComboBoxPopupBorderBrush}"

View File

@@ -83,7 +83,7 @@
Placement="BottomEdgeAlignedLeft"
PlacementTarget="Background">
<Border
Margin="0,4"
Margin="{DynamicResource ComboBoxPopupBorderMargin}"
HorizontalAlignment="Stretch"
Background="{DynamicResource ComboBoxPopupBackground}"
BorderBrush="{DynamicResource ComboBoxPopupBorderBrush}"

View File

@@ -111,7 +111,7 @@
WindowManagerAddShadowHint="False">
<Border
Name="PopupBorder"
Margin="0,4"
Margin="{DynamicResource ComboBoxPopupBorderMargin}"
Background="{DynamicResource ComboBoxPopupBackground}"
BorderBrush="{DynamicResource ComboBoxPopupBorderBrush}"
BorderThickness="{DynamicResource ComboBoxPopupBorderThickness}"

View File

@@ -15,6 +15,8 @@
<ResourceInclude Source="Themes/Shared/_index.axaml" />
<ResourceInclude Source="Locale/zh-cn.axaml" />
</ResourceDictionary.MergedDictionaries>
<!-- This resource definition is from Semi Avalonia 11.2.1. This can be removed after Ursa dependency is higher than Avalonia 11.2.1 -->
<Thickness x:Key="ComboBoxPopupBorderMargin">4</Thickness>
</ResourceDictionary>
</Styles.Resources>