From 179913000184c7f7f482167192a8f968bf5e773d Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Thu, 4 Mar 2021 14:35:29 +0200 Subject: Save identity usage changes immediately --- src/ui/sidebarwidget.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/ui') diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c index dd7b977e..1f5a6d01 100644 --- a/src/ui/sidebarwidget.c +++ b/src/ui/sidebarwidget.c @@ -1008,6 +1008,7 @@ static iBool processEvent_SidebarWidget_(iSidebarWidget *d, const SDL_Event *ev) else { signOut_GmCerts(certs_App(), tabUrl); } + saveIdentities_GmCerts(certs_App()); updateItems_SidebarWidget_(d); } return iTrue; @@ -1459,6 +1460,7 @@ static void draw_SidebarItem_(const iSidebarItem *d, iPaint *p, iRect itemRect, iString icon; initUnicodeN_String(&icon, &d->icon, 1); iInt2 cPos = topLeft_Rect(itemRect); + const int indent = 1.4f * lineHeight_Text(font); addv_I2(&cPos, init_I2(3 * gap_UI, (itemHeight - lineHeight_Text(default_FontId) * 2 - lineHeight_Text(font)) / @@ -1470,11 +1472,11 @@ static void draw_SidebarItem_(const iSidebarItem *d, iPaint *p, iRect itemRect, font, cPos, d->listItem.isSelected ? iconColor : metaFg, range_String(&icon)); deinit_String(&icon); drawRange_Text(d->listItem.isSelected ? uiContentBold_FontId : font, - add_I2(cPos, init_I2(6 * gap_UI, 0)), + add_I2(cPos, init_I2(indent, 0)), fg, range_String(&d->label)); drawRange_Text(default_FontId, - add_I2(cPos, init_I2(6 * gap_UI, lineHeight_Text(font))), + add_I2(cPos, init_I2(indent, lineHeight_Text(font))), metaFg, range_String(&d->meta)); } -- cgit v1.2.3