mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Use SVG for search icon
This commit is contained in:
parent
a2f741b376
commit
3b9c10fd66
5 changed files with 18 additions and 6 deletions
|
|
@ -30,7 +30,7 @@ namespace Flow.Launcher.Infrastructure
|
|||
|
||||
public static string PythonPath;
|
||||
|
||||
public static readonly string QueryTextBoxIconImagePath = $"{ProgramDirectory}\\Images\\mainsearch.png";
|
||||
public static readonly string QueryTextBoxIconImagePath = $"{ProgramDirectory}\\Images\\mainsearch.svg";
|
||||
|
||||
public const string DefaultTheme = "Darker";
|
||||
|
||||
|
|
|
|||
|
|
@ -82,6 +82,7 @@
|
|||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="PropertyChanged.Fody" Version="2.5.13" />
|
||||
<PackageReference Include="SharpVectors" Version="1.7.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
10
Flow.Launcher/Images/mainsearch.svg
Normal file
10
Flow.Launcher/Images/mainsearch.svg
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
||||
<svg version="1.0" xmlns="http://www.w3.org/2000/svg" width="1200px" height="1200px" viewBox="0 0 12000 12000" preserveAspectRatio="xMidYMid meet">
|
||||
<g id="layer101" fill="#000000" stroke="none">
|
||||
</g>
|
||||
<g id="layer102" fill="#555555" stroke="none">
|
||||
<path d="M10354 10962 c-28 -11 -75 -35 -105 -55 -33 -21 -773 -754 -1879 -1861 -1004 -1004 -1829 -1826 -1834 -1826 -4 0 -38 22 -75 48 -248 179 -578 351 -869 453 -398 139 -790 198 -1232 185 -748 -20 -1407 -259 -2020 -732 -209 -161 -508 -475 -676 -709 -270 -377 -476 -847 -567 -1295 -53 -261 -67 -406 -67 -700 0 -340 26 -556 105 -861 128 -499 376 -976 715 -1374 86 -101 312 -324 410 -406 521 -434 1162 -709 1830 -784 181 -20 577 -20 758 0 657 75 1252 323 1782 744 144 114 451 426 556 566 176 233 281 404 393 635 223 465 332 947 332 1470 0 394 -50 705 -174 1082 -53 160 -62 182 -135 343 -85 186 -212 407 -332 575 -28 39 -50 73 -50 78 0 4 826 833 1835 1842 1386 1386 1843 1849 1869 1894 21 34 42 90 52 134 14 64 15 85 4 146 -28 163 -140 311 -290 383 -69 34 -83 37 -180 40 -85 3 -115 0 -156 -15z m-5669 -3912 c529 -49 1009 -241 1415 -566 109 -88 296 -275 384 -384 667 -833 762 -1990 237 -2910 -352 -619 -923 -1053 -1621 -1234 -394 -101 -878 -101 -1270 1 -382 99 -690 253 -992 496 -501 402 -828 974 -930 1627 -31 194 -31 576 0 770 40 255 120 520 225 740 326 682 944 1192 1677 1383 157 41 275 61 480 80 81 8 293 6 395 -3z"/>
|
||||
</g>
|
||||
|
||||
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
|
|
@ -6,6 +6,7 @@
|
|||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:converters="clr-namespace:Flow.Launcher.Converters"
|
||||
xmlns:svgc="http://sharpvectors.codeplex.com/svgc/"
|
||||
mc:Ignorable="d"
|
||||
Title="Flow Launcher"
|
||||
Topmost="True"
|
||||
|
|
@ -68,8 +69,8 @@
|
|||
Margin="18,0,56,0">
|
||||
<TextBox.Text>
|
||||
<MultiBinding Converter="{StaticResource QuerySuggestionBoxConverter}">
|
||||
<Binding ElementName="QueryTextBox" Path="Text"/>
|
||||
<Binding ElementName="ResultListBox" Path="SelectedItem"/>
|
||||
<Binding ElementName="QueryTextBox" Path="Text" Mode="OneWay"/>
|
||||
<Binding ElementName="ResultListBox" Path="SelectedItem" Mode="OneWay"/>
|
||||
</MultiBinding>
|
||||
</TextBox.Text>
|
||||
</TextBox>
|
||||
|
|
@ -81,7 +82,7 @@
|
|||
AllowDrop="True"
|
||||
Visibility="Visible"
|
||||
Background="Transparent"
|
||||
Margin="18,0,56,0">
|
||||
Margin="18,1,0,1" HorizontalAlignment="Left" Width="660">
|
||||
<TextBox.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Command="ApplicationCommands.Cut"/>
|
||||
|
|
@ -92,7 +93,7 @@
|
|||
</ContextMenu>
|
||||
</TextBox.ContextMenu>
|
||||
</TextBox>
|
||||
<Image Source="{Binding Image, IsAsync=True}" Width="48" RenderOptions.BitmapScalingMode="Fant" HorizontalAlignment="Right" />
|
||||
<svgc:SvgControl Source="{Binding Image, Mode=OneWay}" HorizontalAlignment="Right" Width="48" Height="48"/>
|
||||
</Grid>
|
||||
<Line x:Name="ProgressBar" HorizontalAlignment="Right"
|
||||
Style="{DynamicResource PendingLineStyle}" Visibility="{Binding ProgressBarVisibility, Mode=TwoWay}"
|
||||
|
|
|
|||
|
|
@ -285,7 +285,7 @@ namespace Flow.Launcher.ViewModel
|
|||
|
||||
public string OpenResultCommandModifiers { get; private set; }
|
||||
|
||||
public ImageSource Image => ImageLoader.Load(Constant.QueryTextBoxIconImagePath);
|
||||
public string Image => Constant.QueryTextBoxIconImagePath;
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue