[FileLocksmith]Add icons (#21553)

* Adding icon to project

* Adding icon to Settings

* Reference the right file

* Fix icon on Windows 10

* Add new Icon files to the installer

* Fix installer.
This commit is contained in:
Niels Laute
2022-10-31 15:03:33 +01:00
committed by GitHub
parent ff290eef9d
commit b9ccb9f049
13 changed files with 47 additions and 8 deletions

View File

@@ -117,7 +117,9 @@
<?define PowerRenameFiles=PowerRenameUI.ico;PowerToys.PowerRename.exe;resources.pri;PowerToys.PowerRenameExt.dll;PowerRenameContextMenuPackage.msix;PowerToys.PowerRenameContextMenu.dll?>
<?define FileLocksmithFiles=icon.ico;Microsoft.Win32.SystemEvents.dll;Microsoft.Xaml.Interactions.dll;Microsoft.Xaml.Interactivity.dll;CommunityToolkit.WinUI.dll;CommunityToolkit.WinUI.UI.dll;CommunityToolkit.Common.dll;CommunityToolkit.Mvvm.dll;CommunityToolkit.Labs.WinUI.SettingsControls.dll;Ijwhost.dll;Microsoft.InteractiveExperiences.Projection.dll;Microsoft.Windows.ApplicationModel.DynamicDependency.Projection.dll;Microsoft.Windows.ApplicationModel.Resources.Projection.dll;Microsoft.Windows.ApplicationModel.WindowsAppRuntime.Projection.dll;Microsoft.Windows.AppLifecycle.Projection.dll;Microsoft.Windows.SDK.NET.dll;Microsoft.Windows.System.Power.Projection.dll;Microsoft.WindowsAppRuntime.Bootstrap.Net.dll;Microsoft.WinUI.dll;PowerToys.ManagedCommon.dll;PowerToys.ManagedTelemetry.dll;PowerToys.FileLocksmithExt.dll;PowerToys.FileLocksmithLib.Interop.dll;PowerToys.FileLocksmithUI.exe;PowerToys.FileLocksmithUI.dll;PowerToys.FileLocksmithUI.deps.json;PowerToys.FileLocksmithUI.runtimeconfig.json;System.CodeDom.dll;System.Drawing.Common.dll;System.Management.dll;WinRT.Runtime.dll;WinUIEx.dll;resources.pri;PowerToys.GPOWrapper.dll?>
<?define FileLocksmithFiles=Microsoft.Win32.SystemEvents.dll;Microsoft.Xaml.Interactions.dll;Microsoft.Xaml.Interactivity.dll;CommunityToolkit.WinUI.dll;CommunityToolkit.WinUI.UI.dll;CommunityToolkit.Common.dll;CommunityToolkit.Mvvm.dll;CommunityToolkit.Labs.WinUI.SettingsControls.dll;Ijwhost.dll;Microsoft.InteractiveExperiences.Projection.dll;Microsoft.Windows.ApplicationModel.DynamicDependency.Projection.dll;Microsoft.Windows.ApplicationModel.Resources.Projection.dll;Microsoft.Windows.ApplicationModel.WindowsAppRuntime.Projection.dll;Microsoft.Windows.AppLifecycle.Projection.dll;Microsoft.Windows.SDK.NET.dll;Microsoft.Windows.System.Power.Projection.dll;Microsoft.WindowsAppRuntime.Bootstrap.Net.dll;Microsoft.WinUI.dll;PowerToys.ManagedCommon.dll;PowerToys.ManagedTelemetry.dll;PowerToys.FileLocksmithExt.dll;PowerToys.FileLocksmithLib.Interop.dll;PowerToys.FileLocksmithUI.exe;PowerToys.FileLocksmithUI.dll;PowerToys.FileLocksmithUI.deps.json;PowerToys.FileLocksmithUI.runtimeconfig.json;System.CodeDom.dll;System.Drawing.Common.dll;System.Management.dll;WinRT.Runtime.dll;WinUIEx.dll;resources.pri;PowerToys.GPOWrapper.dll?>
<?define FileLocksmithAssetsFiles=Icon.ico?>
<?define PowerRenameSparsePackageAssets=LargeTile.png;SmallTile.png;SplashScreen.png;Square150x150Logo.png;Square44x44Logo.png;storelogo.png;Wide310x150Logo.png?>
@@ -502,6 +504,7 @@
<Directory Id="PowerAccentInstallFolder" Name="$(var.PowerAccentProjectName)">
</Directory>
<Directory Id="FileLocksmithInstallFolder" Name="$(var.FileLocksmithProjectName)">
<Directory Id="FileLocksmithAssetsInstallFolder" Name="Assets" />
</Directory>
<Directory Id="PowerRenameInstallFolder" Name="$(var.PowerRenameProjectName)">
<Directory Id="PowerRenameAssetsFolder" Name="Assets" />
@@ -905,6 +908,28 @@
</RegistryKey>
</Component>
</DirectoryRef>
<DirectoryRef Id="FileLocksmithAssetsInstallFolder" FileSource="$(var.BinDir)modules\$(var.FileLocksmithProjectName)\Assets">
<?foreach File in $(var.FileLocksmithAssetsFiles)?>
<Component Id="FileLocksmith_Assets_$(var.File)" Win64="yes">
<File Id="FileLocksmithAssetsFile_$(var.File)" Source="$(var.BinDir)modules\$(var.FileLocksmithProjectName)\Assets\$(var.File)" />
</Component>
<?endforeach?>
<Component Id="FileLocksmith_Assets_Applist_Scale100" Win64="yes">
<File Id="FL_AppList_Scale100" Source="$(var.BinDir)modules\$(var.FileLocksmithProjectName)\Assets\AppList.scale-100.png" />
</Component>
<Component Id="FileLocksmith_Assets_Applist_Scale125" Win64="yes">
<File Id="FL_AppList_Scale125" Source="$(var.BinDir)modules\$(var.FileLocksmithProjectName)\Assets\AppList.scale-125.png" />
</Component>
<Component Id="FileLocksmith_Assets_Applist_Scale150" Win64="yes">
<File Id="FL_AppList_Scale150" Source="$(var.BinDir)modules\$(var.FileLocksmithProjectName)\Assets\AppList.scale-150.png" />
</Component>
<Component Id="FileLocksmith_Assets_Applist_Scale200" Win64="yes">
<File Id="FL_AppList_Scale200" Source="$(var.BinDir)modules\$(var.FileLocksmithProjectName)\Assets\AppList.scale-200.png" />
</Component>
<Component Id="FileLocksmith_Assets_Applist_Scale400" Win64="yes">
<File Id="FL_AppList_Scale400" Source="$(var.BinDir)modules\$(var.FileLocksmithProjectName)\Assets\AppList.scale-400.png" />
</Component>
</DirectoryRef>
<!-- PowerRename -->
<DirectoryRef Id="PowerRenameInstallFolder" FileSource="$(var.BinDir)modules\$(var.PowerRenameProjectName)">
@@ -1274,6 +1299,14 @@
<?foreach File in $(var.FileLocksmithFiles)?>
<ComponentRef Id="FileLocksmith_$(var.File)" />
<?endforeach?>
<?foreach File in $(var.FileLocksmithAssetsFiles)?>
<ComponentRef Id="FileLocksmith_Assets_$(var.File)" />
<?endforeach?>
<ComponentRef Id="FileLocksmith_Assets_Applist_Scale100" />
<ComponentRef Id="FileLocksmith_Assets_Applist_Scale125" />
<ComponentRef Id="FileLocksmith_Assets_Applist_Scale150" />
<ComponentRef Id="FileLocksmith_Assets_Applist_Scale200" />
<ComponentRef Id="FileLocksmith_Assets_Applist_Scale400" />
<?foreach File in $(var.PowerAccentFiles)?>
<ComponentRef Id="PowerAccent_$(var.File)" />
<?endforeach?>

Binary file not shown.

After

Width:  |  Height:  |  Size: 564 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 780 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 964 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

View File

@@ -20,7 +20,7 @@
<WindowsPackageType>None</WindowsPackageType>
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
<ApplicationIcon>icon.ico</ApplicationIcon>
<ApplicationIcon>Assets/Icon.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
@@ -28,6 +28,15 @@
</PropertyGroup>
<ItemGroup>
<Content Include="Assets\Icon.ico" />
</ItemGroup>
<ItemGroup>
<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" />
<None Remove="Views\MainPage.xaml" />
</ItemGroup>
@@ -65,9 +74,6 @@
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
<ItemGroup>
<Content Include="icon.ico" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\common\GPOWrapper\GPOWrapper.vcxproj" />
<ProjectReference Include="..\..\..\common\interop\PowerToys.Interop.vcxproj" />

View File

@@ -32,7 +32,7 @@
Margin="16,8,8,8"
VerticalAlignment="Top"
Orientation="Horizontal">
<TextBlock FontFamily="{ThemeResource SymbolThemeFontFamily}" Text="&#xEA3F;" />
<Image Source="Assets/AppList.png" />
<TextBlock
x:Uid="AppTitleText"
Margin="12,0,0,0"

View File

@@ -38,7 +38,7 @@ namespace FileLocksmithUI
// Set window icon
WindowId windowId = Win32Interop.GetWindowIdFromWindow(hWnd);
AppWindow appWindow = AppWindow.GetFromWindowId(windowId);
appWindow.SetIcon("icon.ico");
appWindow.SetIcon("Assets/Icon.ico");
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -21,7 +21,7 @@
<controls:Setting x:Uid="FileLocksmith_Enable_FileLocksmith" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}">
<controls:Setting.Icon>
<BitmapIcon UriSource="ms-appx:///Assets/FluentIcons/FluentIconsPowerToys.png" ShowAsMonochrome="False" />
<BitmapIcon UriSource="ms-appx:///Assets/FluentIcons/FluentIconsFileLocksmith.png" ShowAsMonochrome="False" />
</controls:Setting.Icon>
<controls:Setting.ActionContent>
<ToggleSwitch IsOn="{x:Bind ViewModel.IsFileLocksmithEnabled, Mode=TwoWay}" HorizontalAlignment="Right"/>