[DESK] Remember icon picker custom colors between invocations (#6215)

This makes editing a theme slightly less annoying, if you can define custom colors.
This commit is contained in:
Whindmar Saksit 2023-12-23 22:00:11 +01:00 committed by GitHub
parent 48909364db
commit 83bc98f96a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -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;

View file

@ -129,6 +129,8 @@ typedef struct tagGLOBALS
HBITMAP hbmpThemePreview;
HDC hdcThemePreview;
COLORREF crCustom[16];
} GLOBALS;
/* prototypes for theme.c */