=> 3e371f7ea70b1c2e06e1af50c3b41efdecbd072b
[1mdiff --git a/src/prefs.c b/src/prefs.c[m [1mindex 426b7212..3aa05f01 100644[m [1m--- a/src/prefs.c[m [1m+++ b/src/prefs.c[m [36m@@ -44,7 +44,12 @@[m [mvoid init_Prefs(iPrefs *d) {[m d->uiAnimations = iTrue;[m d->uiScale = 1.0f; /* default set elsewhere */[m d->zoomPercent = 100;[m [32m+[m[32m#if defined (iPlatformAndroidMobile)[m [32m+[m[32m /* Android has a system-wide back button so no need to have a duplicate. */[m [32m+[m[32m d->toolbarActions[0] = closeTab_ToolbarAction;[m [32m+[m[32m#else[m d->toolbarActions[0] = back_ToolbarAction;[m [32m+[m[32m#endif[m d->toolbarActions[1] = forward_ToolbarAction;[m d->sideIcon = iTrue;[m d->hideToolbarOnScroll = iTrue;[m [1mdiff --git a/src/ui/root.c b/src/ui/root.c[m [1mindex 31176115..5ec63e91 100644[m [1m--- a/src/ui/root.c[m [1m+++ b/src/ui/root.c[m [36m@@ -1534,19 +1534,10 @@[m [mvoid createUserInterface_Root(iRoot *d) {[m arrangeHeight_WidgetFlag | arrangeHorizontal_WidgetFlag |[m commandOnClick_WidgetFlag |[m drawBackgroundToBottom_WidgetFlag, iTrue);[m [31m-#if defined (iPlatformAndroidMobile)[m [31m- /* Android has a system-provided back button (or gesture?), or in the toolbar we can have[m [31m- a different in the place of Back. */[m [31m- setId_Widget(addChildFlags_Widget(toolBar,[m [31m- iClob(newLargeIcon_LabelWidget(close_Icon, "tabs.close")),[m [31m- frameless_WidgetFlag),[m [31m- "toolbar.close");[m [31m-#else[m setId_Widget(addChildFlags_Widget(toolBar,[m iClob(newLargeIcon_LabelWidget("", "...")),[m frameless_WidgetFlag),[m "toolbar.action1");[m [31m-#endif[m setId_Widget(addChildFlags_Widget(toolBar,[m iClob(newLargeIcon_LabelWidget("", "...")),[m frameless_WidgetFlag),[m [36m@@ -1638,6 +1629,12 @@[m [mvoid createUserInterface_Root(iRoot *d) {[m { select_Icon " ${menu.selectall}", 0, 0, "input.selectall" },[m }, 8);[m #endif[m [32m+[m[32m if (deviceType_App() == phone_AppDeviceType) {[m [32m+[m[32m /* Small screen; conserve space by removing the Cancel item. */[m [32m+[m[32m iRelease(removeChild_Widget(clipMenu, lastChild_Widget(clipMenu)));[m [32m+[m[32m iRelease(removeChild_Widget(clipMenu, lastChild_Widget(clipMenu)));[m [32m+[m[32m iRelease(removeChild_Widget(clipMenu, lastChild_Widget(clipMenu)));[m [32m+[m[32m }[m iWidget *splitMenu = makeMenu_Widget(root, (iMenuItem[]){[m { "${menu.split.merge}", '1', 0, "ui.split arg:0" },[m { "${menu.split.swap}", SDLK_x, 0, "ui.split swap:1" },[m [1mdiff --git a/src/ui/util.c b/src/ui/util.c[m [1mindex 6add5c89..c590caa9 100644[m [1m--- a/src/ui/util.c[m [1m+++ b/src/ui/util.c[m [36m@@ -1204,6 +1204,9 @@[m [mvoid openMenuFlags_Widget(iWidget *d, iInt2 windowCoord, int menuOpenFlags) {[m leftExcess += l;[m rightExcess += r;[m }[m [32m+[m[32m#elif defined (iPlatformMobile)[m [32m+[m[32m /* Reserve space for the keyboard. */[m [32m+[m[32m bottomExcess += get_MainWindow()->keyboardHeight;[m #endif[m if (!allowOverflow) {[m if (bottomExcess > 0 && (!isPortraitPhone || !isSlidePanel)) {[m [36m@@ -2495,8 +2498,9 @@[m [miWidget *makePreferences_Widget(void) {[m };[m const iMenuItem colorPanelItems[] = {[m { "title id:heading.prefs.colors" },[m [31m- //{ "heading id:heading.prefs.uitheme" },[m [32m+[m[32m#if !defined (iPlatformAndroidMobile)[m { "toggle id:prefs.ostheme" },[m [32m+[m[32m#endif[m { "radio id:prefs.theme", 0, 0, (const void *) themeItems },[m { "radio id:prefs.accent", 0, 0, (const void *) accentItems },[m { "heading id:heading.prefs.pagecontent" },[m [1mdiff --git a/src/ui/window.c b/src/ui/window.c[m [1mindex 953d5ea4..ef941798 100644[m [1m--- a/src/ui/window.c[m [1m+++ b/src/ui/window.c[m [36m@@ -606,6 +606,7 @@[m [mvoid init_MainWindow(iMainWindow *d, iRect rect) {[m #endif[m setCurrent_Text(d->base.text);[m SDL_GetRendererOutputSize(d->base.render, &d->base.size.x, &d->base.size.y);[m [32m+[m[32m d->maxDrawableHeight = d->base.size.y;[m setupUserInterface_MainWindow(d);[m postCommand_App("~bindings.changed"); /* update from bindings */[m /* Load the border shadow texture. */ {[m [36m@@ -1011,8 +1012,19 @@[m [miBool processEvent_Window(iWindow *d, const SDL_Event *ev) {[m if (event.type == SDL_USEREVENT && isCommand_UserEvent(ev, "window.sysframe") && mw) {[m /* This command is sent on Android to update the keyboard height. */[m const char *cmd = command_UserEvent(ev);[m [31m- setKeyboardHeight_MainWindow(mw, argLabel_Command(cmd, "fullheight") -[m [31m- argLabel_Command(cmd, "bottom"));[m [32m+[m[32m /*[m [32m+[m[32m 0[m [32m+[m[32m |[m [32m+[m[32m top[m [32m+[m[32m | |[m [32m+[m[32m | bottom (top of keyboard) :[m [32m+[m[32m | | : keyboardHeight[m [32m+[m[32m maxDrawableHeight :[m [32m+[m[32m |[m [32m+[m[32m fullheight[m [32m+[m[32m */[m [32m+[m[32m setKeyboardHeight_MainWindow(mw, argLabel_Command(cmd, "top") +[m [32m+[m[32m mw->maxDrawableHeight - argLabel_Command(cmd, "bottom"));[m return iTrue;[m }[m if (processEvent_Touch(&event)) {[m [36m@@ -1245,11 +1257,15 @@[m [mvoid draw_MainWindow(iMainWindow *d) {[m isDrawing_ = iTrue;[m setCurrent_Text(d->base.text);[m /* Check if root needs resizing. */ {[m [32m+[m[32m const iBool wasPortrait = isPortrait_App();[m iInt2 renderSize;[m SDL_GetRendererOutputSize(w->render, &renderSize.x, &renderSize.y);[m if (!isEqual_I2(renderSize, w->size)) {[m updateSize_MainWindow_(d, iTrue);[m processEvents_App(postedEventsOnly_AppEventMode);[m [32m+[m[32m if (isPortrait_App() != wasPortrait) {[m [32m+[m[32m d->maxDrawableHeight = renderSize.y;[m [32m+[m[32m }[m }[m }[m const int winFlags = SDL_GetWindowFlags(d->base.win);[m [1mdiff --git a/src/ui/window.h b/src/ui/window.h[m [1mindex ae111f4c..b4e348d2 100644[m [1m--- a/src/ui/window.h[m [1m+++ b/src/ui/window.h[m [36m@@ -116,7 +116,8 @@[m [mstruct Impl_MainWindow {[m iString * pendingSplitUrl; /* URL to open in a newly opened split */[m iString * pendingSplitOrigin; /* tab from where split was initiated, if any */[m SDL_Texture * appIcon;[m [31m- int keyboardHeight; /* mobile software keyboards */ [m [32m+[m[32m int keyboardHeight; /* mobile software keyboards */[m [32m+[m[32m int maxDrawableHeight;[m };[m [m iLocalDef enum iWindowType type_Window(const iAnyWindow *d) {[m [36m@@ -187,10 +188,10 @@[m [mvoid setKeyboardHeight_MainWindow (iMainWindow *, int height);[m void setSplitMode_MainWindow (iMainWindow *, int splitMode);[m void checkPendingSplit_MainWindow (iMainWindow *);[m void swapRoots_MainWindow (iMainWindow *);[m [31m-void showToolbars_MainWindow (iMainWindow *, iBool show);[m [32m+[m[32m//void showToolbars_MainWindow (iMainWindow *, iBool show);[m void resize_MainWindow (iMainWindow *, int w, int h);[m [m [31m-iBool processEvent_MainWindow (iMainWindow *, const SDL_Event *);[m [32m+[m[32m//iBool processEvent_MainWindow (iMainWindow *, const SDL_Event *);[m void draw_MainWindow (iMainWindow *);[m void drawWhileResizing_MainWindow (iMainWindow *, int w, int h); /* workaround for SDL bug */[m [m
text/gemini; charset=utf-8
This content has been proxied by September (3851b).