diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-04 14:35:29 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-04 22:24:43 +0200 |
commit | 179913000184c7f7f482167192a8f968bf5e773d (patch) | |
tree | 8b11bd6e8cc665c25a4a64db647358a9464e186f /src/ui | |
parent | 6b503898dfd52ea342d64a6611878aa05719fa51 (diff) |
Save identity usage changes immediately
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/sidebarwidget.c | 6 |
1 files changed, 4 insertions, 2 deletions
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) | |||
1008 | else { | 1008 | else { |
1009 | signOut_GmCerts(certs_App(), tabUrl); | 1009 | signOut_GmCerts(certs_App(), tabUrl); |
1010 | } | 1010 | } |
1011 | saveIdentities_GmCerts(certs_App()); | ||
1011 | updateItems_SidebarWidget_(d); | 1012 | updateItems_SidebarWidget_(d); |
1012 | } | 1013 | } |
1013 | return iTrue; | 1014 | return iTrue; |
@@ -1459,6 +1460,7 @@ static void draw_SidebarItem_(const iSidebarItem *d, iPaint *p, iRect itemRect, | |||
1459 | iString icon; | 1460 | iString icon; |
1460 | initUnicodeN_String(&icon, &d->icon, 1); | 1461 | initUnicodeN_String(&icon, &d->icon, 1); |
1461 | iInt2 cPos = topLeft_Rect(itemRect); | 1462 | iInt2 cPos = topLeft_Rect(itemRect); |
1463 | const int indent = 1.4f * lineHeight_Text(font); | ||
1462 | addv_I2(&cPos, | 1464 | addv_I2(&cPos, |
1463 | init_I2(3 * gap_UI, | 1465 | init_I2(3 * gap_UI, |
1464 | (itemHeight - lineHeight_Text(default_FontId) * 2 - lineHeight_Text(font)) / | 1466 | (itemHeight - lineHeight_Text(default_FontId) * 2 - lineHeight_Text(font)) / |
@@ -1470,11 +1472,11 @@ static void draw_SidebarItem_(const iSidebarItem *d, iPaint *p, iRect itemRect, | |||
1470 | font, cPos, d->listItem.isSelected ? iconColor : metaFg, range_String(&icon)); | 1472 | font, cPos, d->listItem.isSelected ? iconColor : metaFg, range_String(&icon)); |
1471 | deinit_String(&icon); | 1473 | deinit_String(&icon); |
1472 | drawRange_Text(d->listItem.isSelected ? uiContentBold_FontId : font, | 1474 | drawRange_Text(d->listItem.isSelected ? uiContentBold_FontId : font, |
1473 | add_I2(cPos, init_I2(6 * gap_UI, 0)), | 1475 | add_I2(cPos, init_I2(indent, 0)), |
1474 | fg, | 1476 | fg, |
1475 | range_String(&d->label)); | 1477 | range_String(&d->label)); |
1476 | drawRange_Text(default_FontId, | 1478 | drawRange_Text(default_FontId, |
1477 | add_I2(cPos, init_I2(6 * gap_UI, lineHeight_Text(font))), | 1479 | add_I2(cPos, init_I2(indent, lineHeight_Text(font))), |
1478 | metaFg, | 1480 | metaFg, |
1479 | range_String(&d->meta)); | 1481 | range_String(&d->meta)); |
1480 | } | 1482 | } |