forked from OpenSalamander/salamander
-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdarkmode.h
More file actions
55 lines (49 loc) · 1.49 KB
/
Copy pathdarkmode.h
File metadata and controls
55 lines (49 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// SPDX-FileCopyrightText: 2023 Open Salamander Authors
// SPDX-FileCopyrightText: 2026 Sally Authors
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include <windows.h>
enum
{
THEME_MODE_LIGHT = 0,
THEME_MODE_DARK = 1,
THEME_MODE_SYSTEM = 2,
};
struct DarkModeMainFramePalette
{
COLORREF Fill;
COLORREF LineDark;
COLORREF LineLight;
COLORREF Border;
};
struct DarkModeColors
{
COLORREF DialogBackground;
COLORREF DialogText;
COLORREF InputBackground;
COLORREF InputText;
COLORREF DisabledText;
COLORREF Border;
COLORREF Highlight;
COLORREF HighlightText;
COLORREF InactiveSelection;
COLORREF ToolTipBackground;
COLORREF ToolTipText;
COLORREF ViewerBackground;
COLORREF ViewerText;
COLORREF ViewerSelectionBackground;
COLORREF ViewerSelectionText;
};
void DarkMode_Initialize();
BOOL DarkMode_IsSupported();
void DarkMode_SetThemeMode(int themeMode);
BOOL DarkMode_ShouldUseDark();
BOOL DarkMode_GetColors(DarkModeColors* colors);
BOOL DarkMode_GetMainFramePalette(DarkModeMainFramePalette* palette);
HBRUSH DarkMode_GetDialogCtlColorBrush(UINT msg, HDC hdc, HWND hCtrl);
BOOL DarkMode_OnSettingChange(LPARAM lParam);
void DarkMode_ApplyTitleBar(HWND hwnd);
void DarkMode_ApplyToThreadTopLevelWindows(DWORD threadId);
void DarkMode_ApplyListTreeThemeRecursive(HWND root);
void DarkMode_ApplyGroupBoxThemeRecursive(HWND root);
void DarkMode_DrawSunkenFrame(HDC hDC, const RECT* r, const DarkModeMainFramePalette& palette);