summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-09-04 19:30:36 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-09-04 19:30:36 +0300
commitc3e5a0c2d4168515804dc0823c93d0522982108c (patch)
tree5d509273b148f16b4b674825c2eecaba25ade2d2
parent5c23b5805a25b815458809eab74e47776c3f47ce (diff)
iOS: Minor fixes
The SDL text input rectangle function applies some sort of offset that is inappropriate on iOS.
-rw-r--r--CMakeLists.txt2
-rw-r--r--src/ui/documentwidget.c6
-rw-r--r--src/ui/inputwidget.c4
-rw-r--r--src/ui/root.c8
4 files changed, 18 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c3793eea..78b78562 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -25,7 +25,7 @@ project (Lagrange
25set (COPYRIGHT_YEAR 2021) 25set (COPYRIGHT_YEAR 2021)
26if (IOS) 26if (IOS)
27 set (PROJECT_VERSION 1.4) # pinned for TestFlight 27 set (PROJECT_VERSION 1.4) # pinned for TestFlight
28 set (IOS_BUNDLE_VERSION 21.9.4) 28 set (IOS_BUNDLE_VERSION 21.9.5)
29endif () 29endif ()
30 30
31# Default that depend on environment. 31# Default that depend on environment.
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index 76e843d5..e280bc84 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -3676,10 +3676,16 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e
3676 { "---", 0, 0, NULL }, 3676 { "---", 0, 0, NULL },
3677 { book_Icon " ${menu.page.import}", 0, 0, "bookmark.links confirm:1" }, 3677 { book_Icon " ${menu.page.import}", 0, 0, "bookmark.links confirm:1" },
3678 { globe_Icon " ${menu.page.translate}", 0, 0, "document.translate" }, 3678 { globe_Icon " ${menu.page.translate}", 0, 0, "document.translate" },
3679#if defined (iPlatformMobile)
3680 { "---", 0, 0, NULL },
3681 { "${menu.page.copyurl}", 0, 0, "document.copylink" } },
3682 14);
3683#else
3679 { upload_Icon " ${menu.page.upload}", 0, 0, "document.upload" }, 3684 { upload_Icon " ${menu.page.upload}", 0, 0, "document.upload" },
3680 { "---", 0, 0, NULL }, 3685 { "---", 0, 0, NULL },
3681 { "${menu.page.copyurl}", 0, 0, "document.copylink" } }, 3686 { "${menu.page.copyurl}", 0, 0, "document.copylink" } },
3682 15); 3687 15);
3688#endif
3683 if (isEmpty_Range(&d->selectMark)) { 3689 if (isEmpty_Range(&d->selectMark)) {
3684 pushBackN_Array( 3690 pushBackN_Array(
3685 &items, 3691 &items,
diff --git a/src/ui/inputwidget.c b/src/ui/inputwidget.c
index 690107a2..f1b21922 100644
--- a/src/ui/inputwidget.c
+++ b/src/ui/inputwidget.c
@@ -542,8 +542,10 @@ static int contentHeight_InputWidget_(const iInputWidget *d) {
542} 542}
543 543
544static void updateTextInputRect_InputWidget_(const iInputWidget *d) { 544static void updateTextInputRect_InputWidget_(const iInputWidget *d) {
545#if !defined (iPlatformAppleMobile)
545 const iRect bounds = bounds_Widget(constAs_Widget(d)); 546 const iRect bounds = bounds_Widget(constAs_Widget(d));
546 SDL_SetTextInputRect(&(SDL_Rect){ bounds.pos.x, bounds.pos.y, bounds.size.x, bounds.size.y }); 547 SDL_SetTextInputRect(&(SDL_Rect){ bounds.pos.x, bounds.pos.y, bounds.size.x, bounds.size.y });
548#endif
547} 549}
548 550
549static void updateMetrics_InputWidget_(iInputWidget *d) { 551static void updateMetrics_InputWidget_(iInputWidget *d) {
diff --git a/src/ui/root.c b/src/ui/root.c
index a72f002c..0b55d250 100644
--- a/src/ui/root.c
+++ b/src/ui/root.c
@@ -1163,12 +1163,20 @@ void createUserInterface_Root(iRoot *d) {
1163 { star_Icon " ${menu.page.subscribe}", subscribeToPage_KeyModifier, "feeds.subscribe" }, 1163 { star_Icon " ${menu.page.subscribe}", subscribeToPage_KeyModifier, "feeds.subscribe" },
1164 { book_Icon " ${menu.page.import}", 0, 0, "bookmark.links confirm:1" }, 1164 { book_Icon " ${menu.page.import}", 0, 0, "bookmark.links confirm:1" },
1165 { globe_Icon " ${menu.page.translate}", 0, 0, "document.translate" }, 1165 { globe_Icon " ${menu.page.translate}", 0, 0, "document.translate" },
1166#if defined (iPlatformMobile)
1167 { "---", 0, 0, NULL },
1168 { "${menu.page.copyurl}", 0, 0, "document.copylink" },
1169 { "${menu.page.copysource}", 'c', KMOD_PRIMARY, "copy" },
1170 { download_Icon " " saveToDownloads_Label, SDLK_s, KMOD_PRIMARY, "document.save" } },
1171 11);
1172#else
1166 { upload_Icon " ${menu.page.upload}", 0, 0, "document.upload" }, 1173 { upload_Icon " ${menu.page.upload}", 0, 0, "document.upload" },
1167 { "---", 0, 0, NULL }, 1174 { "---", 0, 0, NULL },
1168 { "${menu.page.copyurl}", 0, 0, "document.copylink" }, 1175 { "${menu.page.copyurl}", 0, 0, "document.copylink" },
1169 { "${menu.page.copysource}", 'c', KMOD_PRIMARY, "copy" }, 1176 { "${menu.page.copysource}", 'c', KMOD_PRIMARY, "copy" },
1170 { download_Icon " " saveToDownloads_Label, SDLK_s, KMOD_PRIMARY, "document.save" } }, 1177 { download_Icon " " saveToDownloads_Label, SDLK_s, KMOD_PRIMARY, "document.save" } },
1171 12); 1178 12);
1179#endif
1172 setId_Widget(as_Widget(pageMenuButton), "pagemenubutton"); 1180 setId_Widget(as_Widget(pageMenuButton), "pagemenubutton");
1173 setFont_LabelWidget(pageMenuButton, uiContentBold_FontId); 1181 setFont_LabelWidget(pageMenuButton, uiContentBold_FontId);
1174 setAlignVisually_LabelWidget(pageMenuButton, iTrue); 1182 setAlignVisually_LabelWidget(pageMenuButton, iTrue);