From 12a1ae8bf615db890f0827a2f691837b2e883340 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Sat, 13 Mar 2021 13:59:59 +0200 Subject: LabelWidget: Adjusting spacing on tablets --- src/ui/labelwidget.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ui/labelwidget.c b/src/ui/labelwidget.c index 9af0e2e3..690ad1c3 100644 --- a/src/ui/labelwidget.c +++ b/src/ui/labelwidget.c @@ -253,7 +253,9 @@ static void draw_LabelWidget_(const iLabelWidget *d) { (iRect){ /* The icon position is fine-tuned; c.f. high baseline of Source Sans Pro. */ add_I2(add_I2(bounds.pos, padding_(flags)), - init_I2((flags & extraPadding_WidgetFlag ? -2 : -1.20f) * gap_UI, -gap_UI / 8)), + init_I2((flags & extraPadding_WidgetFlag ? -2 : -1.20f) * gap_UI + + (deviceType_App() == tablet_AppDeviceType ? -gap_UI : 0), + -gap_UI / 8)), init_I2(iconPad, lineHeight_Text(d->font)) }, iTrue, isCaution ? uiTextCaution_ColorId @@ -276,7 +278,9 @@ static void draw_LabelWidget_(const iLabelWidget *d) { init_String(&str); keyStr_LabelWidget_(d, &str); drawAlign_Text(uiShortcuts_FontId, - add_I2(topRight_Rect(bounds), negX_I2(padding_(flags))), + add_I2(topRight_Rect(bounds), + addX_I2(negX_I2(padding_(flags)), + deviceType_App() == tablet_AppDeviceType ? gap_UI : 0)), flags & pressed_WidgetFlag ? fg : uiTextShortcut_ColorId, right_Alignment, cstr_String(&str)); -- cgit v1.2.3