diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-02-20 08:33:15 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-02-20 08:33:15 +0200 |
commit | 0c4fc5d9189510ff88369709f018afc550aa0b54 (patch) | |
tree | 88f743ca8e6ab22e8eea781d116cdfc34c8b91d0 /src/ui/widget.c | |
parent | c1cc59ee6a6d8b88d6f49eb59ffa871d75c75866 (diff) |
iOS: Tweaks and changes for phone mode
Phone mode uses a modified user interface. Work in progress...
Diffstat (limited to 'src/ui/widget.c')
-rw-r--r-- | src/ui/widget.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ui/widget.c b/src/ui/widget.c index 331192f9..128aa39c 100644 --- a/src/ui/widget.c +++ b/src/ui/widget.c | |||
@@ -126,11 +126,15 @@ const iString *id_Widget(const iWidget *d) { | |||
126 | } | 126 | } |
127 | 127 | ||
128 | int64_t flags_Widget(const iWidget *d) { | 128 | int64_t flags_Widget(const iWidget *d) { |
129 | return d->flags; | 129 | return d ? d->flags : 0; |
130 | } | 130 | } |
131 | 131 | ||
132 | void setFlags_Widget(iWidget *d, int64_t flags, iBool set) { | 132 | void setFlags_Widget(iWidget *d, int64_t flags, iBool set) { |
133 | if (d) { | 133 | if (d) { |
134 | if (deviceType_App() == phone_AppDeviceType) { | ||
135 | /* Phones rarely have keyboards attached so don't bother with the shortcuts. */ | ||
136 | flags &= ~drawKey_WidgetFlag; | ||
137 | } | ||
134 | iChangeFlags(d->flags, flags, set); | 138 | iChangeFlags(d->flags, flags, set); |
135 | if (flags & keepOnTop_WidgetFlag) { | 139 | if (flags & keepOnTop_WidgetFlag) { |
136 | if (set) { | 140 | if (set) { |
@@ -731,7 +735,7 @@ size_t childIndex_Widget(const iWidget *d, const iAnyObject *child) { | |||
731 | } | 735 | } |
732 | 736 | ||
733 | iAny *hitChild_Widget(const iWidget *d, iInt2 coord) { | 737 | iAny *hitChild_Widget(const iWidget *d, iInt2 coord) { |
734 | if (d->flags & unhittable_WidgetFlag) { | 738 | if (d->flags & (unhittable_WidgetFlag | hidden_WidgetFlag)) { |
735 | return NULL; | 739 | return NULL; |
736 | } | 740 | } |
737 | /* Check for on-top widgets first. */ | 741 | /* Check for on-top widgets first. */ |