summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-03-13 13:59:59 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-03-13 13:59:59 +0200
commit12a1ae8bf615db890f0827a2f691837b2e883340 (patch)
tree65c3892cca3cf0bde1f164d9dd7e3e71e6786eb8 /src
parent1254ff21519f847aae0e823abbbdba914f3c8d35 (diff)
LabelWidget: Adjusting spacing on tablets
Diffstat (limited to 'src')
-rw-r--r--src/ui/labelwidget.c8
1 files changed, 6 insertions, 2 deletions
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) {
253 (iRect){ 253 (iRect){
254 /* The icon position is fine-tuned; c.f. high baseline of Source Sans Pro. */ 254 /* The icon position is fine-tuned; c.f. high baseline of Source Sans Pro. */
255 add_I2(add_I2(bounds.pos, padding_(flags)), 255 add_I2(add_I2(bounds.pos, padding_(flags)),
256 init_I2((flags & extraPadding_WidgetFlag ? -2 : -1.20f) * gap_UI, -gap_UI / 8)), 256 init_I2((flags & extraPadding_WidgetFlag ? -2 : -1.20f) * gap_UI +
257 (deviceType_App() == tablet_AppDeviceType ? -gap_UI : 0),
258 -gap_UI / 8)),
257 init_I2(iconPad, lineHeight_Text(d->font)) }, 259 init_I2(iconPad, lineHeight_Text(d->font)) },
258 iTrue, 260 iTrue,
259 isCaution ? uiTextCaution_ColorId 261 isCaution ? uiTextCaution_ColorId
@@ -276,7 +278,9 @@ static void draw_LabelWidget_(const iLabelWidget *d) {
276 init_String(&str); 278 init_String(&str);
277 keyStr_LabelWidget_(d, &str); 279 keyStr_LabelWidget_(d, &str);
278 drawAlign_Text(uiShortcuts_FontId, 280 drawAlign_Text(uiShortcuts_FontId,
279 add_I2(topRight_Rect(bounds), negX_I2(padding_(flags))), 281 add_I2(topRight_Rect(bounds),
282 addX_I2(negX_I2(padding_(flags)),
283 deviceType_App() == tablet_AppDeviceType ? gap_UI : 0)),
280 flags & pressed_WidgetFlag ? fg : uiTextShortcut_ColorId, 284 flags & pressed_WidgetFlag ? fg : uiTextShortcut_ColorId,
281 right_Alignment, 285 right_Alignment,
282 cstr_String(&str)); 286 cstr_String(&str));