From 00a67e05bd6b1b2a8a8a65b3611c59c3a253e755 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Tue, 15 Jun 2021 12:46:12 +0300 Subject: Mobile: Draw Identity button as outline --- src/ui/root.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/ui/root.c') diff --git a/src/ui/root.c b/src/ui/root.c index c3a9596f..71f51ef0 100644 --- a/src/ui/root.c +++ b/src/ui/root.c @@ -432,9 +432,9 @@ static void updateNavBarIdentity_(iWidget *navBar) { const iGmIdentity *ident = identityForUrl_GmCerts(certs_App(), url_DocumentWidget(document_App())); iWidget *button = findChild_Widget(navBar, "navbar.ident"); - iWidget *tool = findWidget_App("toolbar.ident"); + iLabelWidget *toolButton = findWidget_App("toolbar.ident"); setFlags_Widget(button, selected_WidgetFlag, ident != NULL); - setFlags_Widget(tool, selected_WidgetFlag, ident != NULL); + setOutline_LabelWidget(toolButton, ident == NULL); /* Update menu. */ iLabelWidget *idItem = child_Widget(findChild_Widget(button, "menu"), 0); const iString *subjectName = ident ? name_GmIdentity(ident) : NULL; @@ -519,12 +519,14 @@ void updateToolbarColors_Root(iRoot *d) { iWidget *toolBar = findChild_Widget(d->widget, "toolbar"); if (toolBar) { const iBool isSidebarVisible = isVisible_Widget(findChild_Widget(d->widget, "sidebar")); - setBackgroundColor_Widget(toolBar, isSidebarVisible ? uiBackgroundSidebar_ColorId : - tmBannerBackground_ColorId); + const int bg = isSidebarVisible ? uiBackgroundSidebar_ColorId : + tmBannerBackground_ColorId; + setBackgroundColor_Widget(toolBar, bg); iForEach(ObjectList, i, children_Widget(toolBar)) { iLabelWidget *btn = i.object; setTextColor_LabelWidget(i.object, isSidebarVisible ? uiTextDim_ColorId : tmBannerIcon_ColorId); + setBackgroundColor_Widget(i.object, bg); /* using noBackground, but ident has outline */ } } #else -- cgit v1.2.3