summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-01-02 21:23:04 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-01-02 21:23:04 +0200
commite31f1118512282550ba484a591b23638f75d819f (patch)
tree0bcfc1c805db8784e5670c60f170307f9bda7fd0 /src/ui
parent2e856e7f61acba9beed83f80e1304252baad2e98 (diff)
SidebarWidget: Background color for remote bookmarks
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/color.c6
-rw-r--r--src/ui/color.h1
-rw-r--r--src/ui/sidebarwidget.c6
3 files changed, 13 insertions, 0 deletions
diff --git a/src/ui/color.c b/src/ui/color.c
index 1bab8538..dc19dd39 100644
--- a/src/ui/color.c
+++ b/src/ui/color.c
@@ -254,6 +254,12 @@ void setThemePalette_Color(enum iColorTheme theme) {
254 set_Color(uiBackgroundUnfocusedSelection_ColorId, mix_Color(get_Color(uiBackground_ColorId), 254 set_Color(uiBackgroundUnfocusedSelection_ColorId, mix_Color(get_Color(uiBackground_ColorId),
255 get_Color(uiBackgroundSelected_ColorId), 255 get_Color(uiBackgroundSelected_ColorId),
256 isDark_ColorTheme(theme) ? 0.25f : 0.66f)); 256 isDark_ColorTheme(theme) ? 0.25f : 0.66f));
257 setHsl_Color(uiBackgroundFolder_ColorId,
258 addSatLum_HSLColor(get_HSLColor(uiBackground_ColorId),
259 0,
260 theme == pureBlack_ColorTheme ? 0.075
261 : theme == dark_ColorTheme ? -0.033
262 : -0.075));
257 palette_[uiMarked_ColorId].a = 128; 263 palette_[uiMarked_ColorId].a = 128;
258 palette_[uiMatching_ColorId].a = 128; 264 palette_[uiMatching_ColorId].a = 128;
259} 265}
diff --git a/src/ui/color.h b/src/ui/color.h
index 61da37c0..b5d32ac4 100644
--- a/src/ui/color.h
+++ b/src/ui/color.h
@@ -103,6 +103,7 @@ enum iColorId {
103 uiMarked_ColorId, 103 uiMarked_ColorId,
104 uiMatching_ColorId, 104 uiMatching_ColorId,
105 uiBackgroundUnfocusedSelection_ColorId, 105 uiBackgroundUnfocusedSelection_ColorId,
106 uiBackgroundFolder_ColorId,
106 uiTextDim_ColorId, 107 uiTextDim_ColorId,
107 108
108 /* content theme colors */ 109 /* content theme colors */
diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c
index e28f86f9..bec6d87a 100644
--- a/src/ui/sidebarwidget.c
+++ b/src/ui/sidebarwidget.c
@@ -1163,6 +1163,12 @@ static void draw_SidebarItem_(const iSidebarItem *d, iPaint *p, iRect itemRect,
1163 bg = uiBackgroundUnfocusedSelection_ColorId; 1163 bg = uiBackgroundUnfocusedSelection_ColorId;
1164 fillRect_Paint(p, itemRect, bg); 1164 fillRect_Paint(p, itemRect, bg);
1165 } 1165 }
1166 else if (sidebar->mode == bookmarks_SidebarMode) {
1167 if (d->icon == 0x2913) { /* TODO: Remote icon; meaning: is this in a folder? */
1168 bg = uiBackgroundFolder_ColorId;
1169 fillRect_Paint(p, itemRect, bg);
1170 }
1171 }
1166 iInt2 pos = itemRect.pos; 1172 iInt2 pos = itemRect.pos;
1167 if (sidebar->mode == documentOutline_SidebarMode) { 1173 if (sidebar->mode == documentOutline_SidebarMode) {
1168 const int fg = isHover ? (isPressing ? uiTextPressed_ColorId : uiTextFramelessHover_ColorId) 1174 const int fg = isHover ? (isPressing ? uiTextPressed_ColorId : uiTextFramelessHover_ColorId)