mirror of
https://github.com/ZuneDev/ZuneModdingHelper.git
synced 2026-07-27 13:12:21 -07:00
Make AbstractUIGroupDialog title bar dark
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
xmlns:local="clr-namespace:ZuneModdingHelper"
|
xmlns:local="clr-namespace:ZuneModdingHelper"
|
||||||
xmlns:absui="clr-namespace:OwlCore.Wpf.AbstractUI.Controls;assembly=OwlCore.Wpf"
|
xmlns:absui="clr-namespace:OwlCore.Wpf.AbstractUI.Controls;assembly=OwlCore.Wpf"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="Options" Height="475" Width="800"
|
Title="Options" Height="400" Width="700"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
Foreground="White">
|
Foreground="White">
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
using OwlCore.AbstractUI.Models;
|
using OwlCore.AbstractUI.Models;
|
||||||
using OwlCore.AbstractUI.ViewModels;
|
using OwlCore.AbstractUI.ViewModels;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using System;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
using System.Windows.Interop;
|
||||||
|
|
||||||
namespace ZuneModdingHelper
|
namespace ZuneModdingHelper
|
||||||
{
|
{
|
||||||
@@ -9,6 +12,25 @@ namespace ZuneModdingHelper
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class AbstractUIGroupDialog : Window
|
public partial class AbstractUIGroupDialog : Window
|
||||||
{
|
{
|
||||||
|
[LibraryImport("DwmApi")]
|
||||||
|
private static partial int DwmSetWindowAttribute(IntPtr hwnd, int attr, int[] attrValue, int attrSize);
|
||||||
|
|
||||||
|
protected override void OnSourceInitialized(EventArgs e)
|
||||||
|
{
|
||||||
|
base.OnSourceInitialized(e);
|
||||||
|
|
||||||
|
// TODO: Move this entire control into a proper dialog.
|
||||||
|
var isAtLeastWin10 = Environment.OSVersion.Version > new Version(10, 0);
|
||||||
|
if (isAtLeastWin10)
|
||||||
|
{
|
||||||
|
var handle = new WindowInteropHelper(this).EnsureHandle();
|
||||||
|
|
||||||
|
if (DwmSetWindowAttribute(handle, 19, [1], 4) != 0)
|
||||||
|
_ = DwmSetWindowAttribute(handle, 20, [1], 4);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public AbstractUIGroupDialog(AbstractUICollectionViewModel viewModel)
|
public AbstractUIGroupDialog(AbstractUICollectionViewModel viewModel)
|
||||||
{
|
{
|
||||||
ViewModel = viewModel;
|
ViewModel = viewModel;
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
<Platforms>x64;x86</Platforms>
|
<Platforms>x64;x86</Platforms>
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
<ApplicationIcon>Assets\ZMH_Icon.ico</ApplicationIcon>
|
<ApplicationIcon>Assets\ZMH_Icon.ico</ApplicationIcon>
|
||||||
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
Reference in New Issue
Block a user