Skip to content

Commit dff67ac

Browse files
committed
Add PlaceHolder Text in Searchbox
1 parent 919ea0d commit dff67ac

File tree

2 files changed

+65
-4
lines changed

2 files changed

+65
-4
lines changed

Flow.Launcher/Languages/en.xaml

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

5454
<!-- Setting Plugin -->
5555
<system:String x:Key="plugin">Plugins</system:String>
56+
<system:String x:Key="searchplugin">Search Plugin</system:String>
5657
<system:String x:Key="browserMorePlugins">Find more plugins</system:String>
5758
<system:String x:Key="enable">On</system:String>
5859
<system:String x:Key="disable">Off</system:String>

Flow.Launcher/SettingWindow.xaml

Lines changed: 64 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -919,15 +919,45 @@
919919
<DockPanel DockPanel.Dock="Right">
920920
<TextBox
921921
Name="pluginFilterTxb"
922-
Width="150"
922+
Width="250"
923923
Height="34"
924924
Margin="0,5,26,0"
925925
HorizontalAlignment="Right"
926926
DockPanel.Dock="Right"
927927
FontSize="14"
928928
Text=""
929929
TextAlignment="Left"
930-
TextChanged="OnPluginSearchTextChanged" />
930+
TextChanged="OnPluginSearchTextChanged">
931+
<TextBox.Style>
932+
<Style BasedOn="{StaticResource DefaultTextBoxStyle}" TargetType="TextBox">
933+
<Style.Resources>
934+
<VisualBrush
935+
x:Key="CueBannerBrush"
936+
AlignmentX="Left"
937+
AlignmentY="Center"
938+
Stretch="None">
939+
<VisualBrush.Visual>
940+
<Label
941+
Padding="10,0,0,0"
942+
Content="{DynamicResource searchplugin}"
943+
Foreground="{DynamicResource CustomContextDisabled}" />
944+
</VisualBrush.Visual>
945+
</VisualBrush>
946+
</Style.Resources>
947+
<Style.Triggers>
948+
<Trigger Property="Text" Value="{x:Static sys:String.Empty}">
949+
<Setter Property="Background" Value="{StaticResource CueBannerBrush}" />
950+
</Trigger>
951+
<Trigger Property="Text" Value="{x:Null}">
952+
<Setter Property="Background" Value="{StaticResource CueBannerBrush}" />
953+
</Trigger>
954+
<Trigger Property="IsKeyboardFocused" Value="True">
955+
<Setter Property="Background" Value="{DynamicResource Color02B}" />
956+
</Trigger>
957+
</Style.Triggers>
958+
</Style>
959+
</TextBox.Style>
960+
</TextBox>
931961
</DockPanel>
932962
</DockPanel>
933963
</Border>
@@ -1319,14 +1349,44 @@
13191349
DockPanel.Dock="Right"
13201350
FontSize="13" />
13211351
<TextBox
1322-
Width="150"
1352+
Width="250"
13231353
Height="34"
13241354
Margin="0,0,6,0"
13251355
HorizontalAlignment="Right"
13261356
DockPanel.Dock="Right"
13271357
FontSize="14"
13281358
Text=""
1329-
TextAlignment="Left" />
1359+
TextAlignment="Left">
1360+
<TextBox.Style>
1361+
<Style BasedOn="{StaticResource DefaultTextBoxStyle}" TargetType="TextBox">
1362+
<Style.Resources>
1363+
<VisualBrush
1364+
x:Key="CueBannerBrush"
1365+
AlignmentX="Left"
1366+
AlignmentY="Center"
1367+
Stretch="None">
1368+
<VisualBrush.Visual>
1369+
<Label
1370+
Padding="10,0,0,0"
1371+
Content="{DynamicResource searchplugin}"
1372+
Foreground="{DynamicResource CustomContextDisabled}" />
1373+
</VisualBrush.Visual>
1374+
</VisualBrush>
1375+
</Style.Resources>
1376+
<Style.Triggers>
1377+
<Trigger Property="Text" Value="{x:Static sys:String.Empty}">
1378+
<Setter Property="Background" Value="{StaticResource CueBannerBrush}" />
1379+
</Trigger>
1380+
<Trigger Property="Text" Value="{x:Null}">
1381+
<Setter Property="Background" Value="{StaticResource CueBannerBrush}" />
1382+
</Trigger>
1383+
<Trigger Property="IsKeyboardFocused" Value="True">
1384+
<Setter Property="Background" Value="{DynamicResource Color02B}" />
1385+
</Trigger>
1386+
</Style.Triggers>
1387+
</Style>
1388+
</TextBox.Style>
1389+
</TextBox>
13301390

13311391
</DockPanel>
13321392
<Border

0 commit comments

Comments
 (0)