https://git.reactos.org/?p=reactos.git;a=commitdiff;h=83bc98f96a14fee13d8c9fbeb28942622c66e21b

commit 83bc98f96a14fee13d8c9fbeb28942622c66e21b
Author:     Whindmar Saksit <whinds...@proton.me>
AuthorDate: Sat Dec 23 22:00:11 2023 +0100
Commit:     GitHub <nore...@github.com>
CommitDate: Sat Dec 23 22:00:11 2023 +0100

    [DESK] Remember icon picker custom colors between invocations (#6215)
    
    This makes editing a theme slightly less annoying, if you can define custom 
colors.
---
 dll/cpl/desk/advappdlg.c  | 3 +--
 dll/cpl/desk/appearance.h | 2 ++
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/dll/cpl/desk/advappdlg.c b/dll/cpl/desk/advappdlg.c
index e07d4860d1f..43c0f6a27a6 100644
--- a/dll/cpl/desk/advappdlg.c
+++ b/dll/cpl/desk/advappdlg.c
@@ -286,7 +286,6 @@ static BOOL
 GetColor(HWND hwndDlg, GLOBALS* g, INT nButton)
 {
     CHOOSECOLOR cc;
-    COLORREF crCustom[16] = { 0 };
     COLORREF crColor;
     INT ID = 0;
     INT ColorIndex = 0;
@@ -317,7 +316,7 @@ GetColor(HWND hwndDlg, GLOBALS* g, INT nButton)
     cc.hwndOwner = hwndDlg;
     cc.hInstance = NULL;
     cc.rgbResult = crColor;
-    cc.lpCustColors = crCustom;
+    cc.lpCustColors = g->crCustom;
     cc.Flags = CC_ANYCOLOR | CC_FULLOPEN | CC_RGBINIT;
     cc.lCustData = 0;
     cc.lpfnHook = NULL;
diff --git a/dll/cpl/desk/appearance.h b/dll/cpl/desk/appearance.h
index 1f1be728a03..259638cb80e 100644
--- a/dll/cpl/desk/appearance.h
+++ b/dll/cpl/desk/appearance.h
@@ -129,6 +129,8 @@ typedef struct tagGLOBALS
 
     HBITMAP hbmpThemePreview;
     HDC hdcThemePreview;
+
+    COLORREF crCustom[16];
 } GLOBALS;
 
 /* prototypes for theme.c */

Reply via email to