From 1c283766aab6c7504b51c16195e00edd1f0086b3 Mon Sep 17 00:00:00 2001 From: Serge <5920850+seerge@users.noreply.github.com> Date: Thu, 6 Apr 2023 23:41:08 +0200 Subject: [PATCH 1/4] Update README.md --- docs/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index 8f595a298..f0e69223c 100644 --- a/docs/README.md +++ b/docs/README.md @@ -18,6 +18,7 @@ A small utility that allows you to do almost everything you could do with Armour ### [:floppy_disk: Download latest release](https://github.com/seerge/g-helper/releases/latest/download/GHelper.zip) If you like this app, please [star :star: it on Github](https://github.com/seerge/g-helper) and spread a word about it! + _If you post about the app - please include a link. Thanks._ ![Screenshot 2023-03-30 115149](https://user-images.githubusercontent.com/5920850/228799078-bc93148f-6580-4319-b9e6-fbde4d246cd2.png) @@ -40,7 +41,7 @@ _If you post about the app - please include a link. Thanks._ - Auto Screen refresh rate (60hz on battery, 120+ hz when plugged) - Keyboard backlight can be turned off on battery -To keep auto switching and hotkeys working the app needs to stay in running in the tray. It doesn't consume any resources. +To keep auto switching and hotkeys working the app needs to stay running in the tray. It doesn't consume any resources. ### :rocket: Performance Modes From e33a0d05ed083438d390723142ec88429d272d8d Mon Sep 17 00:00:00 2001 From: Serge <5920850+seerge@users.noreply.github.com> Date: Fri, 7 Apr 2023 12:06:11 +0200 Subject: [PATCH 2/4] Update README.md --- docs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index f0e69223c..515ed341e 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,4 +1,4 @@ -# [G-Helper](https://github.com/seerge/g-helper) +# G-Helper (GHelper) [![Github all releases](https://img.shields.io/github/downloads/seerge/g-helper/total.svg)](https://GitHub.com/seerge/g-helper/releases/) [![GitHub release](https://img.shields.io/github/release/seerge/g-helper.svg)](https://GitHub.com/seerge/g-helper/releases/) [![GitHub stars](https://img.shields.io/github/stars/seerge/g-helper.svg?style=social&label=Star)](https://GitHub.com/seerge/g-helper/stargazers/) From 2c6bb32e4a25fa134384e993a1208a49992710bd Mon Sep 17 00:00:00 2001 From: Serge <5920850+seerge@users.noreply.github.com> Date: Fri, 7 Apr 2023 12:10:19 +0200 Subject: [PATCH 3/4] Update README.md --- docs/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/README.md b/docs/README.md index 515ed341e..5fdd0b8f8 100644 --- a/docs/README.md +++ b/docs/README.md @@ -7,7 +7,7 @@ A small utility that allows you to do almost everything you could do with Armoury Crate but without extra bloat and unnecessary services. -### :gift: Main advantages +## :gift: Main advantages 1. Seamless and automatic GPU switching (without asking you to close all apps, etc) 2. All performance modes can be fully customized (with fan curves and PPTs) @@ -15,7 +15,7 @@ A small utility that allows you to do almost everything you could do with Armour 4. Simple and clean native UI with easy access to all settings 5. Doesn't need administrator privileges to run! -### [:floppy_disk: Download latest release](https://github.com/seerge/g-helper/releases/latest/download/GHelper.zip) +## [:floppy_disk: Download App](https://github.com/seerge/g-helper/releases/latest/download/GHelper.zip) If you like this app, please [star :star: it on Github](https://github.com/seerge/g-helper) and spread a word about it! From 988c9e11dd89773e972679d6ab33e8e44358e481 Mon Sep 17 00:00:00 2001 From: seerge Date: Fri, 7 Apr 2023 13:37:00 +0200 Subject: [PATCH 4/4] Theme change fix --- app/CustomControls.cs | 2 +- app/Program.cs | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/CustomControls.cs b/app/CustomControls.cs index 555c489d3..211a63c4f 100644 --- a/app/CustomControls.cs +++ b/app/CustomControls.cs @@ -28,7 +28,7 @@ public class RForm : Form [DllImport("DwmApi")] //System.Runtime.InteropServices private static extern int DwmSetWindowAttribute(IntPtr hwnd, int attr, int[] attrValue, int attrSize); - public bool darkTheme; + public bool darkTheme = false; public static void InitColors(bool darkTheme) { diff --git a/app/Program.cs b/app/Program.cs index 483d5717d..b80e584c5 100644 --- a/app/Program.cs +++ b/app/Program.cs @@ -100,14 +100,16 @@ static void SystemEvents_UserPreferenceChanged(object sender, UserPreferenceChan { if (Math.Abs(DateTimeOffset.Now.ToUnixTimeMilliseconds() - lastTheme) < 2000) return; - lastTheme = DateTimeOffset.Now.ToUnixTimeMilliseconds(); switch (e.Category) { case UserPreferenceCategory.General: - Debug.WriteLine("Theme Changed"); - Thread.Sleep(1000); - settingsForm.InitTheme(); + bool changed = settingsForm.InitTheme(); + if (changed) + { + Debug.WriteLine("Theme Changed"); + lastTheme = DateTimeOffset.Now.ToUnixTimeMilliseconds(); + } if (settingsForm.fans is not null && settingsForm.fans.Text != "") settingsForm.fans.InitTheme();