=> 55cd303c52a8fe524e15bd618bfcb02b8ff7dcb7
[1mdiff --git a/src/ui/mobile.c b/src/ui/mobile.c[m [1mindex 48f17c9c..7e359a84 100644[m [1m--- a/src/ui/mobile.c[m [1m+++ b/src/ui/mobile.c[m [36m@@ -512,7 +512,7 @@[m [mvoid makePanelItems_Mobile(iWidget *panel, const iMenuItem *itemsNullTerminated)[m }[m }[m [m [31m-iWidget *makeSplitMultiPanel_Mobile(const iMenuItem *itemsNullTerminated) {[m [32m+[m[32miWidget *makePanels_Mobile(const iMenuItem *itemsNullTerminated) {[m /* A multipanel widget has a top panel and one or more detail panels. In a horizontal layout,[m the detail panels slide in from the right and cover the top panel. In a landscape layout,[m the detail panels are always visible on the side. */[m [1mdiff --git a/src/ui/mobile.h b/src/ui/mobile.h[m [1mindex 50b89e32..5e2d8957 100644[m [1m--- a/src/ui/mobile.h[m [1m+++ b/src/ui/mobile.h[m [36m@@ -27,7 +27,7 @@[m [mSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */[m iDeclareType(Widget)[m iDeclareType(MenuItem)[m [m [31m-iWidget * makeSplitMultiPanel_Mobile (const iMenuItem *itemsNullTerminated);[m [32m+[m[32miWidget * makePanels_Mobile (const iMenuItem *itemsNullTerminated);[m [m void setupMenuTransition_Mobile (iWidget *menu, iBool isIncoming);[m void setupSheetTransition_Mobile (iWidget *sheet, iBool isIncoming);[m [1mdiff --git a/src/ui/util.c b/src/ui/util.c[m [1mindex 0d9338b5..22d8bce4 100644[m [1m--- a/src/ui/util.c[m [1m+++ b/src/ui/util.c[m [36m@@ -1617,11 +1617,23 @@[m [miInputWidget *addTwoColumnDialogInputField_Widget(iWidget *headings, iWidget *va[m return input;[m }[m [m [32m+[m[32mstatic void addDialogPadding_(iWidget *headings, iWidget *values) {[m [32m+[m[32m const int bigGap = lineHeight_Text(uiLabel_FontId) * 3 / 4;[m [32m+[m[32m addChild_Widget(headings, iClob(makePadding_Widget(bigGap)));[m [32m+[m[32m addChild_Widget(values, iClob(makePadding_Widget(bigGap)));[m[41m [m [32m+[m[32m}[m [32m+[m static void addPrefsInputWithHeading_(iWidget *headings, iWidget *values,[m const char *id, iInputWidget *input) {[m addDialogInputWithHeading_(headings, values, format_CStr("${%s}", id), id, input);[m }[m [m [32m+[m[32mstatic void addDialogToggle_(iWidget *headings, iWidget *values,[m [32m+[m[32m const char *heading, const char *toggleId) {[m [32m+[m[32m addChild_Widget(headings, iClob(makeHeading_Widget(heading)));[m [32m+[m[32m addChild_Widget(values, iClob(makeToggle_Widget(toggleId)));[m [32m+[m[32m}[m [32m+[m static size_t findWidestItemLabel_(const iMenuItem *items, size_t num) {[m int widest = 0;[m size_t widestPos = iInvalidPos;[m [36m@@ -1830,9 +1842,9 @@[m [miWidget *makePreferences_Widget(void) {[m };[m iString *aboutText = collectNew_String(); {[m setCStr_String(aboutText, "Lagrange " LAGRANGE_APP_VERSION);[m [31m-#if defined (iPlatformAppleMobile)[m [32m+[m[32m #if defined (iPlatformAppleMobile)[m appendCStr_String(aboutText, " (" LAGRANGE_IOS_VERSION ")");[m [31m-#endif[m [32m+[m[32m #endif[m }[m const iMenuItem aboutPanelItems[] = {[m { format_CStr("heading text:%s", cstr_String(aboutText)) },[m [36m@@ -1842,8 +1854,8 @@[m [miWidget *makePreferences_Widget(void) {[m { "button text:" info_Icon " ${menu.aboutpages}", 0, 0, "!open url:about:about" },[m { "button text:" bug_Icon " ${menu.debug}", 0, 0, "!open url:about:debug" },[m { NULL }[m [31m- }; [m [31m- const iMenuItem items[] = {[m [32m+[m[32m };[m [32m+[m[32m iWidget *dlg = makePanels_Mobile((iMenuItem[]){[m { "panel icon:0x2699 id:heading.prefs.general", 0, 0, (const void *) generalPanelItems },[m { "panel icon:0x1f5a7 id:heading.prefs.network", 0, 0, (const void *) networkPanelItems },[m { "panel text:" person_Icon " ${sidebar.identities}", 0, 0, (const void *) identityPanelItems },[m [36m@@ -1857,8 +1869,7 @@[m [miWidget *makePreferences_Widget(void) {[m { "padding" },[m { "panel text:" planet_Icon " ${menu.about}", 0, 0, (const void *) aboutPanelItems },[m { NULL }[m [31m- }; [m [31m- iWidget *dlg = makeSplitMultiPanel_Mobile(items);[m [32m+[m[32m });[m setupSheetTransition_Mobile(dlg, iTrue);[m return dlg;[m }[m [36m@@ -1870,7 +1881,6 @@[m [miWidget *makePreferences_Widget(void) {[m setBackgroundColor_Widget(findChild_Widget(tabs, "tabs.buttons"), uiBackgroundSidebar_ColorId);[m setId_Widget(tabs, "prefs.tabs");[m iWidget *headings, *values;[m [31m- const int bigGap = lineHeight_Text(uiLabel_FontId) * 3 / 4;[m /* General preferences. */ {[m appendTwoColumnTabPage_Widget(tabs, "${heading.prefs.general}", '1', &headings, &values);[m #if defined (LAGRANGE_ENABLE_DOWNLOAD_EDIT)[m [36m@@ -1879,12 +1889,9 @@[m [miWidget *makePreferences_Widget(void) {[m iInputWidget *searchUrl;[m addPrefsInputWithHeading_(headings, values, "prefs.searchurl", iClob(searchUrl = new_InputWidget(0)));[m setUrlContent_InputWidget(searchUrl, iTrue);[m [31m- addChild_Widget(headings, iClob(makePadding_Widget(bigGap)));[m [31m- addChild_Widget(values, iClob(makePadding_Widget(bigGap)));[m [31m- addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.hoverlink}")));[m [31m- addChild_Widget(values, iClob(makeToggle_Widget("prefs.hoverlink")));[m [31m- addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.archive.openindex}")));[m [31m- addChild_Widget(values, iClob(makeToggle_Widget("prefs.archive.openindex")));[m [32m+[m[32m addDialogPadding_(headings, values);[m [32m+[m[32m addDialogToggle_(headings, values, "${prefs.hoverlink}", "prefs.hoverlink");[m [32m+[m[32m addDialogToggle_(headings, values, "${prefs.archive.openindex}", "prefs.archive.openindex");[m if (deviceType_App() != phone_AppDeviceType) {[m addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.pinsplit}")));[m iWidget *pinSplit = new_Widget();[m [36m@@ -1895,8 +1902,7 @@[m [miWidget *makePreferences_Widget(void) {[m }[m addChildFlags_Widget(values, iClob(pinSplit), arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag);[m }[m [31m- addChild_Widget(headings, iClob(makePadding_Widget(bigGap)));[m [31m- addChild_Widget(values, iClob(makePadding_Widget(bigGap)));[m [32m+[m[32m addDialogPadding_(headings, values);[m /* UI languages. */ {[m iArray *uiLangs = collectNew_Array(sizeof(iMenuItem));[m pushBackN_Array(uiLangs, langItems, iElemCount(langItems) - 1);[m [36m@@ -1915,8 +1921,7 @@[m [miWidget *makePreferences_Widget(void) {[m /* User Interface. */ {[m appendTwoColumnTabPage_Widget(tabs, "${heading.prefs.interface}", '2', &headings, &values);[m #if defined (LAGRANGE_ENABLE_CUSTOM_FRAME)[m [31m- addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.customframe}")));[m [31m- addChild_Widget(values, iClob(makeToggle_Widget("prefs.customframe")));[m [32m+[m[32m addDialogToggle_(headings, values, "${prefs.customframe}", "prefs.customframe");[m #endif[m addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.returnkey}")));[m /* Return key behaviors. */ {[m [36m@@ -1931,11 +1936,9 @@[m [miWidget *makePreferences_Widget(void) {[m setId_Widget(addChildFlags_Widget(values, iClob(returnKey), alignLeft_WidgetFlag),[m "prefs.returnkey");[m }[m [31m- addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.animate}")));[m [31m- addChild_Widget(values, iClob(makeToggle_Widget("prefs.animate")));[m [32m+[m[32m addDialogToggle_(headings, values, "${prefs.animate}", "prefs.animate");[m makeTwoColumnHeading_("${heading.prefs.scrolling}", headings, values);[m [31m- addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.smoothscroll}")));[m [31m- addChild_Widget(values, iClob(makeToggle_Widget("prefs.smoothscroll")));[m [32m+[m[32m addDialogToggle_(headings, values, "${prefs.smoothscroll}", "prefs.smoothscroll");[m /* Scroll speeds. */ {[m for (int type = 0; type < max_ScrollType; type++) {[m const char *typeStr = (type == mouse_ScrollType ? "mouse" : "keyboard");[m [36m@@ -1955,25 +1958,21 @@[m [miWidget *makePreferences_Widget(void) {[m values, iClob(scrollSpeed), arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag);[m }[m }[m [31m- addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.imageloadscroll}")));[m [31m- addChild_Widget(values, iClob(makeToggle_Widget("prefs.imageloadscroll")));[m [32m+[m[32m addDialogToggle_(headings, values, "${prefs.imageloadscroll}", "prefs.imageloadscroll");[m if (deviceType_App() == phone_AppDeviceType) {[m [31m- addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.hidetoolbarscroll}")));[m [31m- addChild_Widget(values, iClob(makeToggle_Widget("prefs.hidetoolbarscroll")));[m [32m+[m[32m addDialogToggle_(headings, values, "${prefs.hidetoolbarscroll}", "prefs.hidetoolbarscroll");[m }[m makeTwoColumnHeading_("${heading.prefs.sizing}", headings, values);[m addPrefsInputWithHeading_(headings, values, "prefs.uiscale", iClob(new_InputWidget(8)));[m if (deviceType_App() == desktop_AppDeviceType) {[m [31m- addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.retainwindow}")));[m [31m- addChild_Widget(values, iClob(makeToggle_Widget("prefs.retainwindow")));[m [32m+[m[32m addDialogToggle_(headings, values, "${prefs.retainwindow}", "prefs.retainwindow");[m }[m }[m /* Colors. */ {[m appendTwoColumnTabPage_Widget(tabs, "${heading.prefs.colors}", '3', &headings, &values);[m makeTwoColumnHeading_("${heading.prefs.uitheme}", headings, values);[m #if defined (iPlatformApple) || defined (iPlatformMSys)[m [31m- addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.ostheme}")));[m [31m- addChild_Widget(values, iClob(makeToggle_Widget("prefs.ostheme")));[m [32m+[m[32m addDialogToggle_(headings, values, "${prefs.ostheme}", "prefs.ostheme");[m #endif[m addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.theme}")));[m iWidget *themes = new_Widget();[m [36m@@ -2034,8 +2033,7 @@[m [miWidget *makePreferences_Widget(void) {[m addFontButtons_(values, "headingfont");[m addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.font}")));[m addFontButtons_(values, "font");[m [31m- addChild_Widget(headings, iClob(makePadding_Widget(bigGap)));[m [31m- addChild_Widget(values, iClob(makePadding_Widget(bigGap)));[m [32m+[m[32m addDialogPadding_(headings, values);[m addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.mono}")));[m iWidget *mono = new_Widget(); {[m iWidget *tog;[m [36m@@ -2067,8 +2065,7 @@[m [miWidget *makePreferences_Widget(void) {[m updateSize_LabelWidget((iLabelWidget *) tog);[m }[m addChildFlags_Widget(values, iClob(boldLink), arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag);[m [31m- addChild_Widget(headings, iClob(makePadding_Widget(bigGap)));[m [31m- addChild_Widget(values, iClob(makePadding_Widget(bigGap)));[m [32m+[m[32m addDialogPadding_(headings, values);[m /* Custom font. */ {[m iInputWidget *customFont = new_InputWidget(0);[m setHint_InputWidget(customFont, "${hint.prefs.userfont}");[m [36m@@ -2097,19 +2094,12 @@[m [miWidget *makePreferences_Widget(void) {[m addRadioButton_(quote, "prefs.quoteicon.0", "${prefs.quoteicon.line}", "quoteicon.set arg:0");[m }[m addChildFlags_Widget(values, iClob(quote), arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag);[m [31m- addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.biglede}")));[m [31m- addChild_Widget(values, iClob(makeToggle_Widget("prefs.biglede")));[m [31m- addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.plaintext.wrap}")));[m [31m- addChild_Widget(values, iClob(makeToggle_Widget("prefs.plaintext.wrap")));[m [31m- addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.collapsepreonload}")));[m [31m- addChild_Widget(values, iClob(makeToggle_Widget("prefs.collapsepreonload")));[m [31m-// makeTwoColumnHeading_("${heading.prefs.widelayout}", headings, values);[m [31m- addChild_Widget(headings, iClob(makePadding_Widget(bigGap)));[m [31m- addChild_Widget(values, iClob(makePadding_Widget(bigGap)));[m [31m- addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.sideicon}")));[m [31m- addChild_Widget(values, iClob(makeToggle_Widget("prefs.sideicon")));[m [31m- addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.centershort}")));[m [31m- addChild_Widget(values, iClob(makeToggle_Widget("prefs.centershort")));[m [32m+[m[32m addDialogToggle_(headings, values, "${prefs.biglede}", "prefs.biglede");[m [32m+[m[32m addDialogToggle_(headings, values, "${prefs.plaintext.wrap}", "prefs.plaintext.wrap");[m [32m+[m[32m addDialogToggle_(headings, values, "${prefs.collapsepreonload}", "prefs.collapsepreonload");[m [32m+[m[32m addDialogPadding_(headings, values);[m [32m+[m[32m addDialogToggle_(headings, values, "${prefs.sideicon}", "prefs.sideicon");[m [32m+[m[32m addDialogToggle_(headings, values, "${prefs.centershort}", "prefs.centershort");[m }[m /* Network. */ {[m appendTwoColumnTabPage_Widget(tabs, "${heading.prefs.network}", '6', &headings, &values);[m [36m@@ -2181,12 +2171,9 @@[m [miWidget *makeBookmarkEditor_Widget(void) {[m addChild_Widget(dlg, iClob(makePadding_Widget(gap_UI)));[m addChild_Widget(dlg, iClob(makeTwoColumns_Widget(&headings, &values)));[m makeTwoColumnHeading_("${heading.bookmark.tags}", headings, values);[m [31m- addChild_Widget(headings, iClob(makeHeading_Widget("${bookmark.tag.home}")));[m [31m- addChild_Widget(values, iClob(makeToggle_Widget("bmed.tag.home")));[m [31m- addChild_Widget(headings, iClob(makeHeading_Widget("${bookmark.tag.remote}")));[m [31m- addChild_Widget(values, iClob(makeToggle_Widget("bmed.tag.remote")));[m [31m- addChild_Widget(headings, iClob(makeHeading_Widget("${bookmark.tag.linksplit}")));[m [31m- addChild_Widget(values, iClob(makeToggle_Widget("bmed.tag.linksplit")));[m [32m+[m[32m addDialogToggle_(headings, values, "${bookmark.tag.home}", "bmed.tag.home");[m [32m+[m[32m addDialogToggle_(headings, values, "${bookmark.tag.remote}", "bmed.tag.remote");[m [32m+[m[32m addDialogToggle_(headings, values, "${bookmark.tag.linksplit}", "bmed.tag.linksplit");[m arrange_Widget(dlg);[m for (int i = 0; i < 3; ++i) {[m as_Widget(inputs[i])->rect.size.x = 100 * gap_UI - headings->rect.size.x;[m
text/gemini; charset=utf-8
This content has been proxied by September (ba2dc).