Skip to content

Commit c828c33

Browse files
committed
Change Combobox design
Adjust Colors
1 parent 74d6eed commit c828c33

File tree

5 files changed

+49
-17
lines changed

5 files changed

+49
-17
lines changed

Flow.Launcher/Resources/CustomControlTemplate.xaml

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -755,25 +755,41 @@
755755
<ControlTemplate TargetType="ComboBoxItem">
756756
<Border
757757
x:Name="LayoutRoot"
758+
Margin="0 2 0 2"
758759
Background="{TemplateBinding Background}"
759760
BorderBrush="{TemplateBinding BorderBrush}"
760761
BorderThickness="{TemplateBinding BorderThickness}"
762+
CornerRadius="4"
761763
SnapsToDevicePixels="True">
762-
<ContentPresenter
763-
x:Name="ContentPresenter"
764-
Margin="{TemplateBinding Padding}"
765-
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
766-
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
767-
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
768-
TextElement.Foreground="{TemplateBinding Foreground}" />
764+
<Grid>
765+
<Grid.ColumnDefinitions>
766+
<ColumnDefinition Width="Auto" />
767+
<ColumnDefinition />
768+
</Grid.ColumnDefinitions>
769+
<Border
770+
x:Name="ComboBullet"
771+
Grid.Column="0"
772+
Width="3"
773+
Height="14"
774+
Background="Transparent"
775+
CornerRadius="2" />
776+
<ContentPresenter
777+
x:Name="ContentPresenter"
778+
Grid.Column="1"
779+
Margin="{TemplateBinding Padding}"
780+
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
781+
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
782+
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
783+
TextElement.Foreground="{TemplateBinding Foreground}" />
784+
</Grid>
769785
</Border>
770786
<ControlTemplate.Triggers>
771787
<MultiTrigger>
772788
<MultiTrigger.Conditions>
773789
<Condition Property="IsSelected" Value="False" />
774790
<Condition Property="IsMouseOver" Value="True" />
775791
</MultiTrigger.Conditions>
776-
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource ComboBoxItemBackgroundPointerOver}" />
792+
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource CustomComboItemHoverBG}" />
777793
<Setter TargetName="LayoutRoot" Property="BorderBrush" Value="{DynamicResource ComboBoxItemBorderBrushPointerOver}" />
778794
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource ComboBoxItemForegroundPointerOver}" />
779795
</MultiTrigger>
@@ -792,7 +808,8 @@
792808
<Condition Property="IsSelected" Value="True" />
793809
<Condition Property="IsFocused" Value="True" />
794810
</MultiTrigger.Conditions>
795-
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource ComboBoxItemBackgroundSelected}" />
811+
<Setter TargetName="ComboBullet" Property="Background" Value="{StaticResource SystemControlBackgroundAccentBrush}" />
812+
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource CustomComboItemHoverBG}" />
796813
<Setter TargetName="LayoutRoot" Property="BorderBrush" Value="{DynamicResource ComboBoxItemBorderBrushSelected}" />
797814
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource ComboBoxItemForegroundSelected}" />
798815
</MultiTrigger>
@@ -802,7 +819,8 @@
802819
<Condition Property="IsSelected" Value="True" />
803820
<Condition Property="IsFocused" Value="False" />
804821
</MultiTrigger.Conditions>
805-
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource ComboBoxItemBackgroundSelectedUnfocused}" />
822+
<Setter TargetName="ComboBullet" Property="Background" Value="{StaticResource SystemControlBackgroundAccentBrush}" />
823+
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource CustomComboItemHoverBG}" />
806824
<Setter TargetName="LayoutRoot" Property="BorderBrush" Value="{DynamicResource ComboBoxItemBorderBrushSelectedUnfocused}" />
807825
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource ComboBoxItemForegroundSelectedUnfocused}" />
808826
</MultiTrigger>
@@ -822,7 +840,7 @@
822840
<Condition Property="IsSelected" Value="True" />
823841
<Condition Property="IsMouseOver" Value="True" />
824842
</MultiTrigger.Conditions>
825-
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource ComboBoxItemBackgroundSelectedPointerOver}" />
843+
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource CustomComboItemSelectedHoverBG}" />
826844
<Setter TargetName="LayoutRoot" Property="BorderBrush" Value="{DynamicResource ComboBoxItemBorderBrushSelectedPointerOver}" />
827845
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource ComboBoxItemForegroundSelectedPointerOver}" />
828846
</MultiTrigger>
@@ -1124,10 +1142,10 @@
11241142
<Border
11251143
x:Name="PopupBorder"
11261144
HorizontalAlignment="Stretch"
1127-
Background="{DynamicResource PopUpBorderBG}"
1128-
CornerRadius="{DynamicResource OverlayCornerRadius}">
1145+
Background="{DynamicResource CustomPopUpBorderBG}"
1146+
CornerRadius="5">
11291147
<Border
1130-
Padding="{DynamicResource ComboBoxDropdownBorderPadding}"
1148+
Padding="5"
11311149
BorderBrush="{DynamicResource CustomComboBorder}"
11321150
BorderThickness="{DynamicResource ComboBoxDropdownBorderThickness}"
11331151
CornerRadius="{Binding ElementName=PopupBorder, Path=CornerRadius}">
@@ -1138,7 +1156,7 @@
11381156
IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}"
11391157
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
11401158
<ItemsPresenter
1141-
Margin="{DynamicResource ComboBoxDropdownContentMargin}"
1159+
Margin="0"
11421160
KeyboardNavigation.DirectionalNavigation="Contained"
11431161
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
11441162
</ScrollViewer>

Flow.Launcher/Resources/Dark.xaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
<SolidColorBrush x:Key="ClockDateForeground" Color="#26FFFFFF" />
2121
<Color x:Key="ItemSelectedBackgroundColorBrush">#198F8F8F</Color>
2222

23+
<SolidColorBrush x:Key="BasicSystemAccentColor" Color="{m:DynamicColor SystemAccentColorLight1}" />
2324

2425
<SolidColorBrush x:Key="Color00B" Color="#2b2b2b" />
2526
<SolidColorBrush x:Key="Color01B" Color="#202020" />
@@ -159,9 +160,14 @@
159160
<m:StaticResource x:Key="CustomComboOutline" ResourceKey="Color13B" />
160161
<m:StaticResource x:Key="CustomComboInline" ResourceKey="Color21B" />
161162
<m:StaticResource x:Key="PopUpBorderBG" ResourceKey="Color07B" />
163+
<SolidColorBrush x:Key="CustomPopUpBorderBG" Color="#373737" />
162164
<SolidColorBrush x:Key="CustomComboBorder" Color="#3f3f3f" />
163165
<m:StaticResource x:Key="CustomComboHoverBG" ResourceKey="Color22B" />
164166
<m:StaticResource x:Key="CustomComboPressedBG" ResourceKey="Color23B" />
167+
168+
<SolidColorBrush x:Key="CustomComboItemHoverBG" Color="#4E4E4E" />
169+
<SolidColorBrush x:Key="CustomComboItemSelectedHoverBG" Color="#484848" />
170+
165171
<m:StaticResource x:Key="CustomComboPressedOutLine" ResourceKey="Color19B" />
166172
<m:StaticResource x:Key="CustomComboPressedText" ResourceKey="Color08B" />
167173
<m:StaticResource x:Key="CustomComboDisabledBG" ResourceKey="Color07B" />
@@ -172,7 +178,7 @@
172178

173179
<Thickness x:Key="CustomComboOutlineThickness">1,1,1,1</Thickness>
174180
<Thickness x:Key="CustomComboInlineThickness">0,0,0,0</Thickness>
175-
<Thickness x:Key="PressedCustomComboOutlineThickness">1,1,1,0</Thickness>
181+
<Thickness x:Key="PressedCustomComboOutlineThickness">1,1,1,1</Thickness>
176182
<Thickness x:Key="DisabledCustomComboOutlineThickness">1,1,1,1</Thickness>
177183

178184

Flow.Launcher/Resources/Light.xaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
<SolidColorBrush x:Key="ClockDateForeground" Color="#44000000" />
2121
<Color x:Key="ItemSelectedBackgroundColorBrush">#7EFFFFFF</Color>
2222

23+
<SolidColorBrush x:Key="BasicSystemAccentColor" Color="{m:DynamicColor SystemAccentColor}" />
24+
2325
<SolidColorBrush x:Key="Color00B" Color="#CEFAFAFA" />
2426
<SolidColorBrush x:Key="Color01B" Color="#f3f3f3" />
2527
<SolidColorBrush x:Key="Color02B" Color="#ffffff" />
@@ -153,12 +155,17 @@
153155
<m:StaticResource x:Key="CustomComboOutline" ResourceKey="Color13B" />
154156
<m:StaticResource x:Key="CustomComboInline" ResourceKey="Color21B" />
155157
<m:StaticResource x:Key="PopUpBorderBG" ResourceKey="Color07B" />
158+
<SolidColorBrush x:Key="CustomPopUpBorderBG" Color="#f6f6f6" />
156159
<SolidColorBrush
157160
x:Key="CustomComboBorder"
158161
Opacity="0.14"
159162
Color="#000000" />
160163
<m:StaticResource x:Key="CustomComboHoverBG" ResourceKey="Color07B" />
161164
<m:StaticResource x:Key="CustomComboPressedBG" ResourceKey="Color07B" />
165+
166+
<SolidColorBrush x:Key="CustomComboItemHoverBG" Color="#E5E5E5" />
167+
<SolidColorBrush x:Key="CustomComboItemSelectedHoverBG" Color="#D9D9D9" />
168+
162169
<m:StaticResource x:Key="CustomComboPressedOutLine" ResourceKey="Color13B" />
163170
<m:StaticResource x:Key="CustomComboPressedText" ResourceKey="Color08B" />
164171
<m:StaticResource x:Key="CustomComboDisabledBG" ResourceKey="Color07B" />

Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@
194194

195195
<cc:Card Title="{DynamicResource lastQueryMode}" Sub="{DynamicResource lastQueryModeToolTip}">
196196
<ComboBox
197+
MinWidth="210"
197198
DisplayMemberPath="Display"
198199
ItemsSource="{Binding LastQueryModes}"
199200
SelectedValue="{Binding Settings.LastQueryMode}"

Flow.Launcher/Themes/Win11Light.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<Setter Property="Width" Value="4" />
3232
<Setter Property="Height" Value="38" />
3333
<Setter Property="CornerRadius" Value="2" />
34-
<Setter Property="Background" Value="{StaticResource SystemAccentColorLight1Brush}" />
34+
<Setter Property="Background" Value="{DynamicResource BasicSystemAccentColor}" />
3535
</Style>
3636
<Style
3737
x:Key="ItemGlyph"

0 commit comments

Comments
 (0)