-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
Theme.h
97 lines (85 loc) · 2.81 KB
/
Theme.h
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
/* Copyright 2022 the SumatraPDF project authors (see AUTHORS file).
License: GPLv3 */
#include "utils/BaseUtil.h"
// The number of themes
#define THEME_COUNT 3
struct MainWindowStyle {
// Background color of recently added, about, and properties menus
COLORREF backgroundColor;
// Text color of recently added, about, and properties menus
COLORREF textColor;
// Link color on recently added, about, and properties menus
COLORREF linkColor;
};
struct DocumentStyle {
// Background color behind the open document
COLORREF canvasColor;
// Color value with which white (background) will be substituted
COLORREF backgroundColor;
// Color value with which black (text) will be substituted
COLORREF textColor;
};
struct NotificationStyle {
// Background color of the notification window
COLORREF backgroundColor;
// Text color of the notification window
COLORREF textColor;
// Color of the highlight box that surrounds the text when a notification is highlighted
COLORREF highlightColor;
// Color of the text when a notification is highlighted
COLORREF highlightTextColor;
// Background color of the progress bar in the notification window
COLORREF progressColor;
};
struct TabCloseStyle {
// Color of the X button
COLORREF xColor;
// Color of the circle surrounding the X button
COLORREF circleColor;
};
struct TabStyle {
// Background color of the tab
COLORREF backgroundColor;
// Text color of the tab
COLORREF textColor;
// Style of the close (X button) by default
TabCloseStyle close;
};
struct TabTheme {
// Height of the tab bar
int height;
// Style of the selected tab
TabStyle selected;
// Style of background tabs
TabStyle background;
// Style of the highlighted tab (hovered over)
TabStyle highlighted;
// Whether or not the circle around the tab X is displayed on hover
bool closeCircleEnabled;
// The width of the pen drawing the tab X
float closePenWidth;
// Style of the close (X button) when the mouse hovers over it
TabCloseStyle hoveredClose;
// Style of the close (X button) when the mouse is clicked down over it
TabCloseStyle clickedClose;
};
struct Theme {
// Name of the theme
const char* name;
// Style of the main window
MainWindowStyle mainWindow;
// Style of documents
DocumentStyle document;
// Style of tabs
TabTheme tab;
// Style of notifications
NotificationStyle notifications;
};
extern Theme* currentTheme;
void CycleNextTheme();
// Function definitions
Theme* GetThemeByName(char* name);
Theme* GetThemeByIndex(int index);
Theme* GetCurrentTheme();
int GetThemeIndex(Theme* theme);
int GetCurrentThemeIndex();