From ecb69789e3fb5e3a55e898b4ce9829d414be59ca Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Wed, 24 Nov 2021 19:30:14 +0200 Subject: SidebarWidget: Tighter layout for Feeds actions --- src/ui/labelwidget.c | 3 ++- src/ui/sidebarwidget.c | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ui/labelwidget.c b/src/ui/labelwidget.c index 46bdc890..f6ddfd43 100644 --- a/src/ui/labelwidget.c +++ b/src/ui/labelwidget.c @@ -421,7 +421,8 @@ static void draw_LabelWidget_(const iLabelWidget *d) { else { drawCenteredOutline_Text( d->font, - adjusted_Rect(bounds, init_I2(iconPad * 1.5f, 0), init_I2(-iconPad, 0)), + adjusted_Rect(bounds, init_I2(iconPad * (flags & tight_WidgetFlag ? 1.0f : 1.5f), 0), + init_I2(-iconPad * (flags & tight_WidgetFlag ? 0.5f : 1.0f), 0)), d->flags.alignVisual, d->flags.drawAsOutline ? fg : none_ColorId, d->flags.drawAsOutline ? d->widget.bgColor : fg, diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c index 69e4fb01..550fccde 100644 --- a/src/ui/sidebarwidget.c +++ b/src/ui/sidebarwidget.c @@ -350,10 +350,11 @@ static void updateItems_SidebarWidget_(iSidebarWidget *d) { } /* Actions. */ { addActionButton_SidebarWidget_( - d, check_Icon " ${feeds.markallread}", "feeds.markallread", expand_WidgetFlag); - addChildFlags_Widget(d->actions, + d, check_Icon " ${feeds.markallread}", "feeds.markallread", expand_WidgetFlag | + tight_WidgetFlag); + updateSize_LabelWidget(addChildFlags_Widget(d->actions, iClob(new_LabelWidget("${sidebar.action.show}", NULL)), - frameless_WidgetFlag); + frameless_WidgetFlag | tight_WidgetFlag)); const iMenuItem items[] = { { "${sidebar.action.feeds.showall}", SDLK_u, KMOD_SHIFT, "feeds.mode arg:0" }, { "${sidebar.action.feeds.showunread}", SDLK_u, 0, "feeds.mode arg:1" }, -- cgit v1.2.3