Adding Hosts icon (#21227)

* Adding Hosts icon

* assets added to setup

Co-authored-by: Davide <davide.giacometti@outlook.it>
This commit is contained in:
Niels Laute
2022-10-14 14:10:44 +02:00
committed by GitHub
parent af5b9903ee
commit 1c264e0899
15 changed files with 170 additions and 165 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 657 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 KiB

View File

@@ -19,11 +19,15 @@
<RootNamespace>Hosts</RootNamespace>
<AssemblyName>PowerToys.Hosts</AssemblyName>
<DefineConstants>DISABLE_XAML_GENERATED_MAIN,TRACE</DefineConstants>
<ApplicationIcon>icon.ico</ApplicationIcon>
<ApplicationIcon>Assets/Hosts.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Content Include="icon.ico" />
<None Remove="Assets\AppList.scale-100.png" />
<None Remove="Assets\AppList.scale-125.png" />
<None Remove="Assets\AppList.scale-150.png" />
<None Remove="Assets\AppList.scale-200.png" />
<None Remove="Assets\AppList.scale-400.png" />
</ItemGroup>
<ItemGroup>

View File

@@ -1,5 +1,4 @@
<winuiex:WindowEx
x:Uid="Window"
x:Class="Hosts.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
@@ -8,6 +7,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:views="using:Hosts.Views"
xmlns:winuiex="using:WinUIEx"
x:Uid="Window"
Width="680"
MinWidth="480"
MinHeight="320"
@@ -25,9 +25,10 @@
Margin="16,8,8,8"
VerticalAlignment="Top"
Orientation="Horizontal">
<TextBlock FontFamily="{ThemeResource SymbolThemeFontFamily}" Text="&#xEA3F;" />
<Image Source="Assets/AppList.png" />
<TextBlock
Margin="12,0,0,0"
FontSize="12"
Style="{StaticResource CaptionTextBlockStyle}"
Text="Hosts File Editor" />
</StackPanel>

View File

@@ -29,7 +29,7 @@ namespace Hosts
var hWnd = WinRT.Interop.WindowNative.GetWindowHandle(this);
WindowId windowId = Win32Interop.GetWindowIdFromWindow(hWnd);
AppWindow appWindow = AppWindow.GetFromWindowId(windowId);
appWindow.SetIcon("icon.ico");
appWindow.SetIcon("Assets/Hosts.ico");
if (ThemeHelpers.GetAppTheme() == AppTheme.Dark)
{

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB