mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-01-11 05:09:12 +00:00
2989c163a8
* editorconfig: Add default charset * Change file encoding from UTF-8-BOM to UTF-8
34 lines
1.1 KiB
C#
34 lines
1.1 KiB
C#
using Avalonia.Controls;
|
|
using Avalonia.Controls.Primitives;
|
|
using Avalonia.Media.Imaging;
|
|
using Avalonia.Platform;
|
|
using Ryujinx.Ui.Common.Configuration;
|
|
using System.IO;
|
|
using System.Reflection;
|
|
|
|
namespace Ryujinx.Ava.UI.Windows
|
|
{
|
|
public class StyleableWindow : Window
|
|
{
|
|
public Bitmap IconImage { get; set; }
|
|
|
|
public StyleableWindow()
|
|
{
|
|
WindowStartupLocation = WindowStartupLocation.CenterOwner;
|
|
TransparencyLevelHint = new[] { WindowTransparencyLevel.None };
|
|
|
|
using Stream stream = Assembly.GetAssembly(typeof(ConfigurationState)).GetManifestResourceStream("Ryujinx.Ui.Common.Resources.Logo_Ryujinx.png");
|
|
|
|
Icon = new WindowIcon(stream);
|
|
stream.Position = 0;
|
|
IconImage = new Bitmap(stream);
|
|
}
|
|
|
|
protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
|
|
{
|
|
base.OnApplyTemplate(e);
|
|
|
|
ExtendClientAreaChromeHints = ExtendClientAreaChromeHints.SystemChrome | ExtendClientAreaChromeHints.OSXThickTitleBar;
|
|
}
|
|
}
|
|
}
|