diff --git a/TwitchDesktopNotifications/ManageIgnores.xaml b/TwitchDesktopNotifications/ManageIgnores.xaml
index 70d8831..c7db6a9 100644
--- a/TwitchDesktopNotifications/ManageIgnores.xaml
+++ b/TwitchDesktopNotifications/ManageIgnores.xaml
@@ -6,10 +6,61 @@
xmlns:local="clr-namespace:TwitchDesktopNotifications"
xmlns:core="clr-namespace:TwitchDesktopNotifications.Core"
mc:Ignorable="d"
- Title="Twitchy: Ignored Streamers" Height="435" Width="395" ResizeMode="CanResizeWithGrip">
+ Title="Twitchy: Ignored Streamers" Height="435" Width="395" ResizeMode="CanResizeWithGrip" Background="#FF333333">
+
+
+
+
+
+
+
+
@@ -29,7 +80,7 @@
Grid.Column="1"
Grid.RowSpan="1" Grid.Row="3"
CanUserResizeColumns="False"
- x:Name="dgrdIgnore" ItemsSource="{Binding StreamersToIgnore}" AutoGenerateColumns="False" CanUserAddRows="False" RowHeaderWidth="0" HeadersVisibility="Column">
+ x:Name="dgrdIgnore" ItemsSource="{Binding StreamersToIgnore}" AutoGenerateColumns="False" CanUserAddRows="False" RowHeaderWidth="0" HeadersVisibility="Column" Background="#FF333333">
@@ -48,8 +99,8 @@
-
-
-
+
+
+
diff --git a/TwitchDesktopNotifications/ManageIgnores.xaml.cs b/TwitchDesktopNotifications/ManageIgnores.xaml.cs
index 7791b41..a42ac8d 100644
--- a/TwitchDesktopNotifications/ManageIgnores.xaml.cs
+++ b/TwitchDesktopNotifications/ManageIgnores.xaml.cs
@@ -1,8 +1,10 @@
using System.Diagnostics;
+using System.Runtime.InteropServices;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Forms;
+using System.Windows.Interop;
using System.Windows.Threading;
using TwitchDesktopNotifications.Core;
@@ -13,9 +15,65 @@ namespace TwitchDesktopNotifications
///
public partial class ManageIgnores : Window
{
+ public enum DWMWINDOWATTRIBUTE
+ {
+ DWMWA_NCRENDERING_ENABLED,
+ DWMWA_NCRENDERING_POLICY,
+ DWMWA_TRANSITIONS_FORCEDISABLED,
+ DWMWA_ALLOW_NCPAINT,
+ DWMWA_CAPTION_BUTTON_BOUNDS,
+ DWMWA_NONCLIENT_RTL_LAYOUT,
+ DWMWA_FORCE_ICONIC_REPRESENTATION,
+ DWMWA_FLIP3D_POLICY,
+ DWMWA_EXTENDED_FRAME_BOUNDS,
+ DWMWA_HAS_ICONIC_BITMAP,
+ DWMWA_DISALLOW_PEEK,
+ DWMWA_EXCLUDED_FROM_PEEK,
+ DWMWA_CLOAK,
+ DWMWA_CLOAKED,
+ DWMWA_FREEZE_REPRESENTATION,
+ DWMWA_PASSIVE_UPDATE_MODE,
+ DWMWA_USE_HOSTBACKDROPBRUSH,
+ DWMWA_USE_IMMERSIVE_DARK_MODE = 20,
+ DWMWA_WINDOW_CORNER_PREFERENCE = 33,
+ DWMWA_BORDER_COLOR,
+ DWMWA_CAPTION_COLOR,
+ DWMWA_TEXT_COLOR,
+ DWMWA_VISIBLE_FRAME_BORDER_THICKNESS,
+ DWMWA_SYSTEMBACKDROP_TYPE,
+ DWMWA_LAST
+ }
+
+ // The DWM_WINDOW_CORNER_PREFERENCE enum for DwmSetWindowAttribute's third parameter, which tells the function
+ // what value of the enum to set.
+ public enum DWM_WINDOW_CORNER_PREFERENCE
+ {
+ DWMWCP_DEFAULT = 0,
+ DWMWCP_DONOTROUND = 1,
+ DWMWCP_ROUND = 2,
+ DWMWCP_ROUNDSMALL = 3
+ }
+
+ // Import dwmapi.dll and define DwmSetWindowAttribute in C# corresponding to the native function.
+ [DllImport("dwmapi.dll", CharSet = CharSet.Unicode, SetLastError = true)]
+ private static extern long DwmSetWindowAttribute(IntPtr hwnd,
+ DWMWINDOWATTRIBUTE attribute,
+ ref uint pvAttribute,
+ uint cbAttribute);
+
public ManageIgnores()
{
- InitializeComponent();
+ InitializeComponent();
+
+ IntPtr hWnd = new WindowInteropHelper(GetWindow(this)).EnsureHandle();
+ var attribute = DWMWINDOWATTRIBUTE.DWMWA_WINDOW_CORNER_PREFERENCE;
+ uint preference = 2;
+ DwmSetWindowAttribute(hWnd, attribute, ref preference, sizeof(uint));
+
+ var attribute2 = DWMWINDOWATTRIBUTE.DWMWA_USE_IMMERSIVE_DARK_MODE;
+ uint colour = 1;
+ DwmSetWindowAttribute(hWnd, attribute2, ref colour, sizeof(uint));
+
}
List StreamersToIgnore = DataStore.GetInstance().Store.SteamersToIgnore.Streamers;
diff --git a/TwitchDesktopNotifications/Program.cs b/TwitchDesktopNotifications/Program.cs
index a9c09a1..b87ad95 100644
--- a/TwitchDesktopNotifications/Program.cs
+++ b/TwitchDesktopNotifications/Program.cs
@@ -95,6 +95,9 @@ internal class Program
notifyIcon.Text = "Twitch Notify";
cms = new ContextMenuStrip();
+ cms.BackColor = System.Drawing.Color.FromArgb(51, 51, 51);
+ cms.ForeColor = System.Drawing.Color.FromArgb(145, 70, 255);
+ cms.ShowImageMargin= false;
cms.Items.Add(new ToolStripMenuItem("Manage Ignores", null, new EventHandler(ManageIgnores_Click)));
cms.Items.Add(new ToolStripSeparator());
cms.Items.Add(new ToolStripMenuItem("Reconnect", null, new EventHandler(Reconnect_Click)));
diff --git a/TwitchDesktopNotifications/ReconnectionNeeded.xaml b/TwitchDesktopNotifications/ReconnectionNeeded.xaml
index e249f23..2b527e4 100644
--- a/TwitchDesktopNotifications/ReconnectionNeeded.xaml
+++ b/TwitchDesktopNotifications/ReconnectionNeeded.xaml
@@ -5,8 +5,9 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:TwitchDesktopNotifications"
mc:Ignorable="d"
- Title="Twitchy Disconnected" Height="140" Width="335" x:Name="reconnectionNeededWin">
+ Title="Twitchy Disconnected" Height="140" Width="335" x:Name="reconnectionNeededWin" Background="#FF333333">
+
@@ -20,8 +21,8 @@
-
-
-
+
+
+
diff --git a/TwitchDesktopNotifications/ReconnectionNeeded.xaml.cs b/TwitchDesktopNotifications/ReconnectionNeeded.xaml.cs
index 62479f9..2ca88d1 100644
--- a/TwitchDesktopNotifications/ReconnectionNeeded.xaml.cs
+++ b/TwitchDesktopNotifications/ReconnectionNeeded.xaml.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
@@ -8,6 +9,7 @@ using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
+using System.Windows.Interop;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
@@ -19,9 +21,63 @@ namespace TwitchDesktopNotifications
///
public partial class ReconnectionNeeded : Window
{
+
+ public enum DWMWINDOWATTRIBUTE
+ {
+ DWMWA_NCRENDERING_ENABLED,
+ DWMWA_NCRENDERING_POLICY,
+ DWMWA_TRANSITIONS_FORCEDISABLED,
+ DWMWA_ALLOW_NCPAINT,
+ DWMWA_CAPTION_BUTTON_BOUNDS,
+ DWMWA_NONCLIENT_RTL_LAYOUT,
+ DWMWA_FORCE_ICONIC_REPRESENTATION,
+ DWMWA_FLIP3D_POLICY,
+ DWMWA_EXTENDED_FRAME_BOUNDS,
+ DWMWA_HAS_ICONIC_BITMAP,
+ DWMWA_DISALLOW_PEEK,
+ DWMWA_EXCLUDED_FROM_PEEK,
+ DWMWA_CLOAK,
+ DWMWA_CLOAKED,
+ DWMWA_FREEZE_REPRESENTATION,
+ DWMWA_PASSIVE_UPDATE_MODE,
+ DWMWA_USE_HOSTBACKDROPBRUSH,
+ DWMWA_USE_IMMERSIVE_DARK_MODE = 20,
+ DWMWA_WINDOW_CORNER_PREFERENCE = 33,
+ DWMWA_BORDER_COLOR,
+ DWMWA_CAPTION_COLOR,
+ DWMWA_TEXT_COLOR,
+ DWMWA_VISIBLE_FRAME_BORDER_THICKNESS,
+ DWMWA_SYSTEMBACKDROP_TYPE,
+ DWMWA_LAST
+ }
+
+ // The DWM_WINDOW_CORNER_PREFERENCE enum for DwmSetWindowAttribute's third parameter, which tells the function
+ // what value of the enum to set.
+ public enum DWM_WINDOW_CORNER_PREFERENCE
+ {
+ DWMWCP_DEFAULT = 0,
+ DWMWCP_DONOTROUND = 1,
+ DWMWCP_ROUND = 2,
+ DWMWCP_ROUNDSMALL = 3
+ }
+
+ // Import dwmapi.dll and define DwmSetWindowAttribute in C# corresponding to the native function.
+ [DllImport("dwmapi.dll", CharSet = CharSet.Unicode, SetLastError = true)]
+ private static extern long DwmSetWindowAttribute(IntPtr hwnd,
+ DWMWINDOWATTRIBUTE attribute,
+ ref uint pvAttribute,
+ uint cbAttribute);
public ReconnectionNeeded()
{
InitializeComponent();
+ IntPtr hWnd = new WindowInteropHelper(GetWindow(this)).EnsureHandle();
+ var attribute = DWMWINDOWATTRIBUTE.DWMWA_WINDOW_CORNER_PREFERENCE;
+ uint preference = 2;
+ DwmSetWindowAttribute(hWnd, attribute, ref preference, sizeof(uint));
+
+ var attribute2 = DWMWINDOWATTRIBUTE.DWMWA_USE_IMMERSIVE_DARK_MODE;
+ uint colour = 1;
+ DwmSetWindowAttribute(hWnd, attribute2, ref colour, sizeof(uint));
}
private void Button_Click(object sender, RoutedEventArgs e)