Skip to content

Commit 65e7ca8

Browse files
committed
Theme: dark ComboBox dropdown popups and items
1 parent 20a7915 commit 65e7ca8

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

src/BasisPM.App/Styles/BasisTheme.axaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@
4343
<SolidColorBrush x:Key="BasisBorderStrongBrush" Color="{StaticResource BasisBorderStrong}"/>
4444
<SolidColorBrush x:Key="BasisGlassBrush" Color="{StaticResource BasisGlass}"/>
4545
<SolidColorBrush x:Key="BasisGlassStrongBrush" Color="{StaticResource BasisGlassStrong}"/>
46+
<!-- Override the Fluent ComboBox dropdown-popup fill to the dark scheme (backup for the
47+
ComboBox /template/ Border#PopupBorder selector); Fluent's default is light/translucent. -->
48+
<SolidColorBrush x:Key="ComboBoxDropDownBackground" Color="{StaticResource BasisSurface}"/>
4649
<SolidColorBrush x:Key="BasisTextPrimaryBrush" Color="{StaticResource BasisTextPrimary}"/>
4750
<SolidColorBrush x:Key="BasisTextMutedBrush" Color="{StaticResource BasisTextMuted}"/>
4851
<SolidColorBrush x:Key="BasisTextSecondaryBrush" Color="{StaticResource BasisTextSecondary}"/>
@@ -344,6 +347,26 @@
344347
<Setter Property="Background" Value="Transparent"/>
345348
<Setter Property="Padding" Value="12,8"/>
346349
</Style>
350+
<!-- Dropdown popup + item states: match the dark scheme. Fluent's defaults are a light/
351+
translucent popup and a blue accent highlight, which don't match the Basis palette. -->
352+
<Style Selector="ComboBox /template/ Border#PopupBorder">
353+
<Setter Property="Background" Value="{StaticResource BasisSurfaceBrush}"/>
354+
<Setter Property="BorderBrush" Value="{StaticResource BasisBorderStrongBrush}"/>
355+
<Setter Property="BorderThickness" Value="1"/>
356+
<Setter Property="CornerRadius" Value="10"/>
357+
</Style>
358+
<Style Selector="ComboBoxItem:pointerover /template/ ContentPresenter#PART_ContentPresenter">
359+
<Setter Property="Background" Value="{StaticResource BasisSurfaceHoverBrush}"/>
360+
<Setter Property="TextElement.Foreground" Value="{StaticResource BasisTextPrimaryBrush}"/>
361+
</Style>
362+
<Style Selector="ComboBoxItem:selected /template/ ContentPresenter#PART_ContentPresenter">
363+
<Setter Property="Background" Value="{StaticResource BasisSurfaceHoverBrush}"/>
364+
<Setter Property="TextElement.Foreground" Value="{StaticResource BasisTextPrimaryBrush}"/>
365+
</Style>
366+
<Style Selector="ComboBoxItem:selected:pointerover /template/ ContentPresenter#PART_ContentPresenter">
367+
<Setter Property="Background" Value="{StaticResource BasisSurfaceHoverBrush}"/>
368+
<Setter Property="TextElement.Foreground" Value="{StaticResource BasisTextPrimaryBrush}"/>
369+
</Style>
347370

348371
<Style Selector="CheckBox">
349372
<Setter Property="Foreground" Value="{StaticResource BasisTextPrimaryBrush}"/>

0 commit comments

Comments
 (0)