From 666033098e74e044beb6d8b9e032e79b62d48c57 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Mon, 27 Dec 2021 13:45:36 +0200 Subject: Android: Replace toolbar Back button with Close Tab These should be user-configurable, though. --- src/ui/root.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/ui/root.c') diff --git a/src/ui/root.c b/src/ui/root.c index 36ac948e..3e0124d8 100644 --- a/src/ui/root.c +++ b/src/ui/root.c @@ -1542,10 +1542,19 @@ void createUserInterface_Root(iRoot *d) { arrangeHeight_WidgetFlag | arrangeHorizontal_WidgetFlag | commandOnClick_WidgetFlag | drawBackgroundToBottom_WidgetFlag, iTrue); +#if defined (iPlatformAndroidMobile) + /* Android has a system-provided back button (or gesture?), or in the toolbar we can have + a different in the place of Back. */ + setId_Widget(addChildFlags_Widget(toolBar, + iClob(newLargeIcon_LabelWidget(close_Icon, "tabs.close")), + frameless_WidgetFlag), + "toolbar.close"); +#else setId_Widget(addChildFlags_Widget(toolBar, iClob(newLargeIcon_LabelWidget(backArrow_Icon, "navigate.back")), frameless_WidgetFlag), "toolbar.back"); +#endif setId_Widget(addChildFlags_Widget(toolBar, iClob(newLargeIcon_LabelWidget(forwardArrow_Icon, "navigate.forward")), frameless_WidgetFlag), -- cgit v1.2.3