summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-08-18 14:14:29 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-08-18 14:14:29 +0300
commit2d6d6cd513b8de36971545834212f927fa4e27dc (patch)
tree2e0a32a72ed775947a7a01f14fdb6b15b257739b
parenta87d5af936c168ed6edbc66547a2c8fddf81f41f (diff)
SidebarWidget: Bookmark heights; theme changes
-rw-r--r--src/ui/sidebarwidget.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c
index a8c2cd91..71b641d4 100644
--- a/src/ui/sidebarwidget.c
+++ b/src/ui/sidebarwidget.c
@@ -173,7 +173,7 @@ void setMode_SidebarWidget(iSidebarWidget *d, enum iSidebarMode mode) {
173 for (enum iSidebarMode i = 0; i < max_SidebarMode; i++) { 173 for (enum iSidebarMode i = 0; i < max_SidebarMode; i++) {
174 setFlags_Widget(as_Widget(d->modeButtons[i]), selected_WidgetFlag, i == d->mode); 174 setFlags_Widget(as_Widget(d->modeButtons[i]), selected_WidgetFlag, i == d->mode);
175 } 175 }
176 const float heights[max_SidebarMode] = { 1.5f, 3, 3, 1.2f }; 176 const float heights[max_SidebarMode] = { 1.333f, 3, 3, 1.2f };
177 d->itemHeight = heights[mode] * lineHeight_Text(uiContent_FontId); 177 d->itemHeight = heights[mode] * lineHeight_Text(uiContent_FontId);
178} 178}
179 179
@@ -424,6 +424,9 @@ static iBool processEvent_SidebarWidget_(iSidebarWidget *d, const SDL_Event *ev)
424 d->scrollY = 0; 424 d->scrollY = 0;
425 updateItems_SidebarWidget_(d); 425 updateItems_SidebarWidget_(d);
426 } 426 }
427 else if (equal_Command(cmd, "theme.changed")) {
428 invalidate_SidebarWidget_(d);
429 }
427 else if (equal_Command(cmd, "bookmark.copy")) { 430 else if (equal_Command(cmd, "bookmark.copy")) {
428 const iSidebarItem *item = hoverItem_SidebarWidget_(d); 431 const iSidebarItem *item = hoverItem_SidebarWidget_(d);
429 if (d->mode == bookmarks_SidebarMode && item) { 432 if (d->mode == bookmarks_SidebarMode && item) {