Skip to content

Commit d96e291

Browse files
committed
Fix PluginStoreItem Color (Darkmode)
1 parent fa47398 commit d96e291

File tree

1 file changed

+43
-7
lines changed

1 file changed

+43
-7
lines changed

Flow.Launcher/SettingWindow.xaml

Lines changed: 43 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@
9494
<Setter Property="Margin" Value="0,5,0,0" />
9595
<Setter Property="Padding" Value="0,15,0,15" />
9696
<Setter Property="SnapsToDevicePixels" Value="True" />
97-
9897
</Style>
9998
<Style x:Key="SettingTitleLabel" TargetType="{x:Type TextBlock}">
10099
<Setter Property="Foreground" Value="{DynamicResource Color05B}" />
@@ -262,9 +261,6 @@
262261
</Setter>
263262
</Style>
264263

265-
<!-- Plugin Store Item when Selected layout for nothing -->
266-
<Style x:Key="StoreItem" TargetType="{x:Type ToggleButton}" />
267-
268264
<Style x:Key="PluginList" TargetType="ListBoxItem">
269265
<Setter Property="Background" Value="{DynamicResource Color00B}" />
270266
<Setter Property="Padding" Value="0,0,0,0" />
@@ -400,6 +396,7 @@
400396
x:Key="StoreListStyle"
401397
BasedOn="{StaticResource {x:Type ListBox}}"
402398
TargetType="ListBox">
399+
<Setter Property="Background" Value="{DynamicResource Color01B}" />
403400
<Style.Triggers>
404401
<DataTrigger Binding="{Binding RelativeSource={x:Static RelativeSource.Self}, Path=Items.Count}" Value="0">
405402
<Setter Property="Template">
@@ -1044,7 +1041,7 @@
10441041
<ListBox
10451042
Name="Plugins"
10461043
Width="Auto"
1047-
Margin="0,0,0,0"
1044+
Margin="5,0,0,0"
10481045
Padding="0,0,7,0"
10491046
HorizontalAlignment="Stretch"
10501047
Background="{DynamicResource Color01B}"
@@ -1534,7 +1531,45 @@
15341531

15351532
<ListView.ItemTemplate>
15361533
<DataTemplate>
1537-
<!-- Hover Layout Style -->
1534+
<DataTemplate.Resources>
1535+
<Style x:Key="StoreListItemBtnStyle" TargetType="Button">
1536+
<Setter Property="Template">
1537+
<Setter.Value>
1538+
<ControlTemplate TargetType="Button">
1539+
<Border
1540+
x:Name="Background"
1541+
Background="{DynamicResource Color00B}"
1542+
BorderBrush="{DynamicResource Color03B}"
1543+
BorderThickness="1"
1544+
CornerRadius="4"
1545+
SnapsToDevicePixels="True">
1546+
<Border
1547+
x:Name="Border"
1548+
Padding="{TemplateBinding Padding}"
1549+
BorderThickness="1"
1550+
CornerRadius="4">
1551+
<ContentPresenter
1552+
x:Name="ContentPresenter"
1553+
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
1554+
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
1555+
Focusable="False"
1556+
RecognizesAccessKey="True"
1557+
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
1558+
</Border>
1559+
</Border>
1560+
<ControlTemplate.Triggers>
1561+
<Trigger Property="IsMouseOver" Value="True">
1562+
<Setter TargetName="Background" Property="Background" Value="{DynamicResource Color07B}" />
1563+
</Trigger>
1564+
<Trigger Property="IsPressed" Value="True">
1565+
<Setter TargetName="Background" Property="Background" Value="{DynamicResource Color07B}" />
1566+
</Trigger>
1567+
</ControlTemplate.Triggers>
1568+
</ControlTemplate>
1569+
</Setter.Value>
1570+
</Setter>
1571+
</Style>
1572+
</DataTemplate.Resources>
15381573
<Button
15391574
Name="StoreListItem"
15401575
Margin="0"
@@ -1545,7 +1580,8 @@
15451580
VerticalContentAlignment="Stretch"
15461581
BorderThickness="0"
15471582
Click="StoreListItem_Click"
1548-
FocusVisualStyle="{StaticResource StoreItemFocusVisualStyleKey}">
1583+
FocusVisualStyle="{StaticResource StoreItemFocusVisualStyleKey}"
1584+
Style="{DynamicResource StoreListItemBtnStyle}">
15491585
<ui:FlyoutService.Flyout>
15501586
<ui:Flyout x:Name="InstallFlyout" Placement="Bottom">
15511587
<Grid MinWidth="200">

0 commit comments

Comments
 (0)