summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-04-09 13:33:21 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-04-10 06:29:31 +0300
commite0256c5b7c1e92db42cef1556eee849dff92c513 (patch)
tree0c6c18a6bd8c838536a4ea6142b6d6f3530471eb /src
parentdf99b5720bbe4f277a77d0a94fb40d3eeec6eb07 (diff)
Mobile: Hide shortcut keys
On iPad, the platform convention is to show these in a popup anyway.
Diffstat (limited to 'src')
-rw-r--r--src/ui/util.c2
-rw-r--r--src/ui/widget.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/ui/util.c b/src/ui/util.c
index 8424dd65..eb0ee661 100644
--- a/src/ui/util.c
+++ b/src/ui/util.c
@@ -577,7 +577,7 @@ iWidget *makeMenu_Widget(iWidget *parent, const iMenuItem *items, size_t n) {
577 menu, 577 menu,
578 iClob(newKeyMods_LabelWidget(item->label, item->key, item->kmods, item->command)), 578 iClob(newKeyMods_LabelWidget(item->label, item->key, item->kmods, item->command)),
579 noBackground_WidgetFlag | frameless_WidgetFlag | alignLeft_WidgetFlag | 579 noBackground_WidgetFlag | frameless_WidgetFlag | alignLeft_WidgetFlag |
580 drawKey_WidgetFlag | itemFlags); 580 drawKey_WidgetFlag | itemFlags);
581 haveIcons |= checkIcon_LabelWidget(label); 581 haveIcons |= checkIcon_LabelWidget(label);
582 updateSize_LabelWidget(label); /* drawKey was set */ 582 updateSize_LabelWidget(label); /* drawKey was set */
583 } 583 }
diff --git a/src/ui/widget.c b/src/ui/widget.c
index cef36a00..1ef2360c 100644
--- a/src/ui/widget.c
+++ b/src/ui/widget.c
@@ -166,8 +166,8 @@ int64_t flags_Widget(const iWidget *d) {
166 166
167void setFlags_Widget(iWidget *d, int64_t flags, iBool set) { 167void setFlags_Widget(iWidget *d, int64_t flags, iBool set) {
168 if (d) { 168 if (d) {
169 if (deviceType_App() == phone_AppDeviceType) { 169 if (deviceType_App() != desktop_AppDeviceType) {
170 /* Phones rarely have keyboards attached so don't bother with the shortcuts. */ 170 /* TODO: Tablets should detect if a hardware keyboard is available. */
171 flags &= ~drawKey_WidgetFlag; 171 flags &= ~drawKey_WidgetFlag;
172 } 172 }
173 iChangeFlags(d->flags, flags, set); 173 iChangeFlags(d->flags, flags, set);