summaryrefslogtreecommitdiff
path: root/src/ui/color.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-08-20 15:34:48 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-08-20 15:34:48 +0300
commitde978eb32636804038567dcaaba4a9eebf24dc1c (patch)
tree7071fe28df52945c5ace7bbb8e70996442186cc1 /src/ui/color.c
parente8f5fd342e069643d0fc4b2163713cf8788ca5d6 (diff)
SidebarWidget: Added history items; context menu
Diffstat (limited to 'src/ui/color.c')
-rw-r--r--src/ui/color.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/ui/color.c b/src/ui/color.c
index 53315a4f..c6ba68bb 100644
--- a/src/ui/color.c
+++ b/src/ui/color.c
@@ -86,7 +86,7 @@ void setThemePalette_Color(enum iColorTheme theme) {
86 copy_(uiInputCursor_ColorId, orange_ColorId); 86 copy_(uiInputCursor_ColorId, orange_ColorId);
87 copy_(uiInputCursorText_ColorId, black_ColorId); 87 copy_(uiInputCursorText_ColorId, black_ColorId);
88 copy_(uiHeading_ColorId, cyan_ColorId); 88 copy_(uiHeading_ColorId, cyan_ColorId);
89 copy_(uiIcon_ColorId, teal_ColorId); 89 copy_(uiIcon_ColorId, cyan_ColorId);
90 copy_(uiIconHover_ColorId, cyan_ColorId); 90 copy_(uiIconHover_ColorId, cyan_ColorId);
91 copy_(uiSeparator_ColorId, gray25_ColorId); 91 copy_(uiSeparator_ColorId, gray25_ColorId);
92 copy_(uiMarked_ColorId, brown_ColorId); 92 copy_(uiMarked_ColorId, brown_ColorId);
@@ -141,7 +141,7 @@ void setThemePalette_Color(enum iColorTheme theme) {
141 copy_(uiBackgroundPressed_ColorId, cyan_ColorId); 141 copy_(uiBackgroundPressed_ColorId, cyan_ColorId);
142 copy_(uiBackgroundFramelessHover_ColorId, orange_ColorId); 142 copy_(uiBackgroundFramelessHover_ColorId, orange_ColorId);
143 copy_(uiText_ColorId, black_ColorId); 143 copy_(uiText_ColorId, black_ColorId);
144 copy_(uiTextStrong_ColorId, brown_ColorId); 144 copy_(uiTextStrong_ColorId, teal_ColorId);
145 copy_(uiTextPressed_ColorId, black_ColorId); 145 copy_(uiTextPressed_ColorId, black_ColorId);
146 copy_(uiTextSelected_ColorId, black_ColorId); 146 copy_(uiTextSelected_ColorId, black_ColorId);
147 copy_(uiTextFramelessHover_ColorId, black_ColorId); 147 copy_(uiTextFramelessHover_ColorId, black_ColorId);
@@ -235,6 +235,14 @@ void set_Color(int color, iColor rgba) {
235 } 235 }
236} 236}
237 237
238iColor mix_Color(iColor c1, iColor c2, float t) {
239 t = iClamp(t, 0.0f, 1.0f);
240 return (iColor){ c1.r * (1 - t) + c2.r * t,
241 c1.g * (1 - t) + c2.g * t,
242 c1.b * (1 - t) + c2.b * t,
243 c1.a * (1 - t) + c2.a * t };
244}
245
238iLocalDef iBool equal_Color_(const iColor *x, const iColor *y) { 246iLocalDef iBool equal_Color_(const iColor *x, const iColor *y) {
239 return memcmp(x, y, sizeof(iColor)) == 0; 247 return memcmp(x, y, sizeof(iColor)) == 0;
240} 248}