mirror of
https://github.com/Stone-Red-Code/DesktopMagic.git
synced 2026-09-04 00:46:12 +02:00
Add theme-aware Modio icon and resource for PluginManager page
This commit is contained in:
@@ -1,6 +1,10 @@
|
|||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Media.Imaging;
|
||||||
|
|
||||||
|
using Wpf.Ui.Appearance;
|
||||||
|
|
||||||
namespace DesktopMagic.DataContexts;
|
namespace DesktopMagic.DataContexts;
|
||||||
|
|
||||||
@@ -70,6 +74,23 @@ internal class PluginManagerDataContext : INotifyPropertyChanged
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public BitmapImage ModIoIcon
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
ApplicationTheme theme = ApplicationThemeManager.GetAppTheme();
|
||||||
|
|
||||||
|
if (theme == ApplicationTheme.Light)
|
||||||
|
{
|
||||||
|
return Application.Current.Resources["ModioLogoBlueDark"] as BitmapImage ?? new BitmapImage();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return Application.Current.Resources["ModioLogoBlueLight"] as BitmapImage ?? new BitmapImage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public string LoginButtonText => isAuthenticated ? (string)App.LanguageDictionary["logout"] : (string)App.LanguageDictionary["login"];
|
public string LoginButtonText => isAuthenticated ? (string)App.LanguageDictionary["logout"] : (string)App.LanguageDictionary["login"];
|
||||||
|
|
||||||
protected void OnPropertyChanged([CallerMemberName] string? name = null)
|
protected void OnPropertyChanged([CallerMemberName] string? name = null)
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
<None Remove="icon_Dark.ico" />
|
<None Remove="icon_Dark.ico" />
|
||||||
<None Remove="Resources\Images\modio-cog-blue.png" />
|
<None Remove="Resources\Images\modio-cog-blue.png" />
|
||||||
<None Remove="Resources\Images\modio-logo-bluedark.png" />
|
<None Remove="Resources\Images\modio-logo-bluedark.png" />
|
||||||
|
<None Remove="Resources\Images\modio-logo-bluelight.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -66,6 +67,7 @@
|
|||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</Resource>
|
</Resource>
|
||||||
<Resource Include="Resources\Images\modio-logo-bluedark.png" />
|
<Resource Include="Resources\Images\modio-logo-bluedark.png" />
|
||||||
|
<Resource Include="Resources\Images\modio-logo-bluelight.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -107,7 +107,7 @@
|
|||||||
<ColumnDefinition Width="0.5*" />
|
<ColumnDefinition Width="0.5*" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Image Source="{StaticResource ModioLogoBlueDark}" Cursor="Hand" Height="30" MouseUp="Image_MouseUp" HorizontalAlignment="Left" />
|
<Image Source="{Binding ModIoIcon}" Cursor="Hand" Height="30" MouseUp="Image_MouseUp" HorizontalAlignment="Left" />
|
||||||
<Button Grid.Column="2" HorizontalAlignment="Stretch" Click="CreatePluginButton_Click">
|
<Button Grid.Column="2" HorizontalAlignment="Stretch" Click="CreatePluginButton_Click">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<ui:SymbolIcon Symbol="Add24" Margin="0 0 10 0" />
|
<ui:SymbolIcon Symbol="Add24" Margin="0 0 10 0" />
|
||||||
|
|||||||
@@ -3,4 +3,5 @@
|
|||||||
<BitmapImage x:Key="Icon" UriSource="/icon.ico" />
|
<BitmapImage x:Key="Icon" UriSource="/icon.ico" />
|
||||||
<BitmapImage x:Key="ModioCogBlue" UriSource="modio-cog-blue.png" />
|
<BitmapImage x:Key="ModioCogBlue" UriSource="modio-cog-blue.png" />
|
||||||
<BitmapImage x:Key="ModioLogoBlueDark" UriSource="modio-logo-bluedark.png" />
|
<BitmapImage x:Key="ModioLogoBlueDark" UriSource="modio-logo-bluedark.png" />
|
||||||
|
<BitmapImage x:Key="ModioLogoBlueLight" UriSource="modio-logo-bluelight.png" />
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 70 KiB |
Reference in New Issue
Block a user