diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-02-23 19:04:42 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-02-23 19:04:42 +0200 |
commit | 78ab2ead2f907ea869cc71fb9900bdfcb1bf2834 (patch) | |
tree | 9abee49224a244e510eaf47f501d6b6af951508c /src/ui/color.c | |
parent | 8f7a1033f37be1a4d47c626ffb36a28385340699 (diff) |
SidebarWidget: Improved appearance
Added a color for sidebar background. Removed the right-edge separator line; instead, use color to separate. Page outline uses bold font for level 1 headings.
Diffstat (limited to 'src/ui/color.c')
-rw-r--r-- | src/ui/color.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/ui/color.c b/src/ui/color.c index 3adf857d..ab95906d 100644 --- a/src/ui/color.c +++ b/src/ui/color.c | |||
@@ -79,6 +79,8 @@ void setThemePalette_Color(enum iColorTheme theme) { | |||
79 | copy_(uiBackgroundPressed_ColorId, orange_ColorId); | 79 | copy_(uiBackgroundPressed_ColorId, orange_ColorId); |
80 | copy_(uiBackgroundSelected_ColorId, teal_ColorId); | 80 | copy_(uiBackgroundSelected_ColorId, teal_ColorId); |
81 | copy_(uiBackgroundFramelessHover_ColorId, teal_ColorId); | 81 | copy_(uiBackgroundFramelessHover_ColorId, teal_ColorId); |
82 | set_Color(uiBackgroundSidebar_ColorId, | ||
83 | mix_Color(get_Color(black_ColorId), get_Color(gray25_ColorId), 0.66f)); | ||
82 | copy_(uiText_ColorId, gray75_ColorId); | 84 | copy_(uiText_ColorId, gray75_ColorId); |
83 | copy_(uiTextPressed_ColorId, black_ColorId); | 85 | copy_(uiTextPressed_ColorId, black_ColorId); |
84 | copy_(uiTextStrong_ColorId, white_ColorId); | 86 | copy_(uiTextStrong_ColorId, white_ColorId); |
@@ -125,6 +127,8 @@ void setThemePalette_Color(enum iColorTheme theme) { | |||
125 | copy_(uiBackgroundPressed_ColorId, orange_ColorId); | 127 | copy_(uiBackgroundPressed_ColorId, orange_ColorId); |
126 | copy_(uiBackgroundSelected_ColorId, teal_ColorId); | 128 | copy_(uiBackgroundSelected_ColorId, teal_ColorId); |
127 | copy_(uiBackgroundFramelessHover_ColorId, teal_ColorId); | 129 | copy_(uiBackgroundFramelessHover_ColorId, teal_ColorId); |
130 | set_Color(uiBackgroundSidebar_ColorId, | ||
131 | mix_Color(get_Color(black_ColorId), get_Color(gray25_ColorId), 0.66f)); | ||
128 | copy_(uiText_ColorId, gray75_ColorId); | 132 | copy_(uiText_ColorId, gray75_ColorId); |
129 | copy_(uiTextPressed_ColorId, black_ColorId); | 133 | copy_(uiTextPressed_ColorId, black_ColorId); |
130 | copy_(uiTextStrong_ColorId, white_ColorId); | 134 | copy_(uiTextStrong_ColorId, white_ColorId); |
@@ -170,6 +174,8 @@ void setThemePalette_Color(enum iColorTheme theme) { | |||
170 | copy_(uiBackgroundSelected_ColorId, orange_ColorId); | 174 | copy_(uiBackgroundSelected_ColorId, orange_ColorId); |
171 | copy_(uiBackgroundPressed_ColorId, cyan_ColorId); | 175 | copy_(uiBackgroundPressed_ColorId, cyan_ColorId); |
172 | copy_(uiBackgroundFramelessHover_ColorId, orange_ColorId); | 176 | copy_(uiBackgroundFramelessHover_ColorId, orange_ColorId); |
177 | set_Color(uiBackgroundSidebar_ColorId, | ||
178 | mix_Color(get_Color(white_ColorId), get_Color(gray75_ColorId), 0.5f)); | ||
173 | copy_(uiText_ColorId, black_ColorId); | 179 | copy_(uiText_ColorId, black_ColorId); |
174 | copy_(uiTextStrong_ColorId, black_ColorId); | 180 | copy_(uiTextStrong_ColorId, black_ColorId); |
175 | copy_(uiTextDim_ColorId, gray25_ColorId); | 181 | copy_(uiTextDim_ColorId, gray25_ColorId); |
@@ -215,6 +221,8 @@ void setThemePalette_Color(enum iColorTheme theme) { | |||
215 | copy_(uiBackgroundSelected_ColorId, orange_ColorId); | 221 | copy_(uiBackgroundSelected_ColorId, orange_ColorId); |
216 | copy_(uiBackgroundPressed_ColorId, cyan_ColorId); | 222 | copy_(uiBackgroundPressed_ColorId, cyan_ColorId); |
217 | copy_(uiBackgroundFramelessHover_ColorId, orange_ColorId); | 223 | copy_(uiBackgroundFramelessHover_ColorId, orange_ColorId); |
224 | set_Color(uiBackgroundSidebar_ColorId, | ||
225 | mix_Color(get_Color(white_ColorId), get_Color(gray75_ColorId), 0.5f)); | ||
218 | set_Color(uiText_ColorId, | 226 | set_Color(uiText_ColorId, |
219 | mix_Color(get_Color(black_ColorId), get_Color(gray25_ColorId), 0.5f)); | 227 | mix_Color(get_Color(black_ColorId), get_Color(gray25_ColorId), 0.5f)); |
220 | copy_(uiTextPressed_ColorId, black_ColorId); | 228 | copy_(uiTextPressed_ColorId, black_ColorId); |
@@ -260,14 +268,15 @@ void setThemePalette_Color(enum iColorTheme theme) { | |||
260 | mix_Color(get_Color(uiText_ColorId), | 268 | mix_Color(get_Color(uiText_ColorId), |
261 | get_Color(uiIcon_ColorId), | 269 | get_Color(uiIcon_ColorId), |
262 | isDark_ColorTheme(theme) ? 0.5f : 0.75f)); | 270 | isDark_ColorTheme(theme) ? 0.5f : 0.75f)); |
263 | set_Color(uiBackgroundUnfocusedSelection_ColorId, mix_Color(get_Color(uiBackground_ColorId), | 271 | set_Color(uiBackgroundUnfocusedSelection_ColorId, |
264 | get_Color(uiBackgroundSelected_ColorId), | 272 | mix_Color(get_Color(uiBackground_ColorId), |
265 | isDark_ColorTheme(theme) ? 0.25f : 0.66f)); | 273 | get_Color(uiBackgroundSelected_ColorId), |
274 | isDark_ColorTheme(theme) ? 0.25f : 0.66f)); | ||
266 | setHsl_Color(uiBackgroundFolder_ColorId, | 275 | setHsl_Color(uiBackgroundFolder_ColorId, |
267 | addSatLum_HSLColor(get_HSLColor(uiBackground_ColorId), | 276 | addSatLum_HSLColor(get_HSLColor(uiBackgroundSidebar_ColorId), |
268 | 0, | 277 | 0, |
269 | theme == pureBlack_ColorTheme ? 0.075 | 278 | theme == pureBlack_ColorTheme ? -1 |
270 | : theme == dark_ColorTheme ? -0.033 | 279 | : theme == dark_ColorTheme ? -0.04 |
271 | : -0.075)); | 280 | : -0.075)); |
272 | palette_[uiMarked_ColorId].a = 128; | 281 | palette_[uiMarked_ColorId].a = 128; |
273 | palette_[uiMatching_ColorId].a = 128; | 282 | palette_[uiMatching_ColorId].a = 128; |