summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ui/mobile.c9
-rw-r--r--src/ui/util.c81
2 files changed, 53 insertions, 37 deletions
diff --git a/src/ui/mobile.c b/src/ui/mobile.c
index 7c0c8b60..0ff3fe85 100644
--- a/src/ui/mobile.c
+++ b/src/ui/mobile.c
@@ -473,7 +473,8 @@ void finalizeSheet_Mobile(iWidget *sheet) {
473 0x02699, /* gear */ 473 0x02699, /* gear */
474 0x1f4f1, /* mobile phone */ 474 0x1f4f1, /* mobile phone */
475 0x1f3a8, /* palette */ 475 0x1f3a8, /* palette */
476 0x1f523, 476 0x1f5da, /* aA */
477 0x1f660, /* pointing bud */
477 0x1f5a7, /* computer network */ 478 0x1f5a7, /* computer network */
478 }; 479 };
479 setIcon_LabelWidget(panelButton, icons[i]); 480 setIcon_LabelWidget(panelButton, icons[i]);
@@ -622,6 +623,12 @@ void finalizeSheet_Mobile(iWidget *sheet) {
622 /* Additional elements for preferences. */ 623 /* Additional elements for preferences. */
623 if (isPrefs) { 624 if (isPrefs) {
624 addChild_Widget(topPanel, iClob(makePadding_Widget(lineHeight_Text(labelFont_())))); 625 addChild_Widget(topPanel, iClob(makePadding_Widget(lineHeight_Text(labelFont_()))));
626 /* Management. */ {
627 iLabelWidget *idManButton = addChildFlags_Widget(topPanel,
628 iClob(makePanelButton_(person_Icon " ${sidebar.identities}", "panel.open")),
629 chevron_WidgetFlag | borderTop_WidgetFlag);
630 }
631 addChild_Widget(topPanel, iClob(makePadding_Widget(lineHeight_Text(labelFont_()))));
625 iLabelWidget *aboutButton = addChildFlags_Widget(topPanel, 632 iLabelWidget *aboutButton = addChildFlags_Widget(topPanel,
626 iClob(makePanelButton_(planet_Icon " ${menu.about}", "panel.open")), 633 iClob(makePanelButton_(planet_Icon " ${menu.about}", "panel.open")),
627 chevron_WidgetFlag | borderTop_WidgetFlag); 634 chevron_WidgetFlag | borderTop_WidgetFlag);
diff --git a/src/ui/util.c b/src/ui/util.c
index 55b48b3f..f094bdf9 100644
--- a/src/ui/util.c
+++ b/src/ui/util.c
@@ -1607,12 +1607,6 @@ iWidget *makePreferences_Widget(void) {
1607 setUrlContent_InputWidget(searchUrl, iTrue); 1607 setUrlContent_InputWidget(searchUrl, iTrue);
1608 addChild_Widget(headings, iClob(makePadding_Widget(bigGap))); 1608 addChild_Widget(headings, iClob(makePadding_Widget(bigGap)));
1609 addChild_Widget(values, iClob(makePadding_Widget(bigGap))); 1609 addChild_Widget(values, iClob(makePadding_Widget(bigGap)));
1610 addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.collapsepreonload}")));
1611 addChild_Widget(values, iClob(makeToggle_Widget("prefs.collapsepreonload")));
1612 addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.plaintext.wrap}")));
1613 addChild_Widget(values, iClob(makeToggle_Widget("prefs.plaintext.wrap")));
1614 addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.centershort}")));
1615 addChild_Widget(values, iClob(makeToggle_Widget("prefs.centershort")));
1616 addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.hoverlink}"))); 1610 addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.hoverlink}")));
1617 addChild_Widget(values, iClob(makeToggle_Widget("prefs.hoverlink"))); 1611 addChild_Widget(values, iClob(makeToggle_Widget("prefs.hoverlink")));
1618 addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.archive.openindex}"))); 1612 addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.archive.openindex}")));
@@ -1673,26 +1667,6 @@ iWidget *makePreferences_Widget(void) {
1673 } 1667 }
1674 /* User Interface. */ { 1668 /* User Interface. */ {
1675 appendTwoColumnPage_(tabs, "${heading.prefs.interface}", '2', &headings, &values); 1669 appendTwoColumnPage_(tabs, "${heading.prefs.interface}", '2', &headings, &values);
1676#if defined (iPlatformApple) || defined (iPlatformMSys)
1677 addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.ostheme}")));
1678 addChild_Widget(values, iClob(makeToggle_Widget("prefs.ostheme")));
1679#endif
1680 addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.theme}")));
1681 iWidget *themes = new_Widget();
1682 /* Themes. */ {
1683 setId_Widget(addChild_Widget(themes, iClob(new_LabelWidget("${prefs.theme.black}", "theme.set arg:0"))), "prefs.theme.0");
1684 setId_Widget(addChild_Widget(themes, iClob(new_LabelWidget("${prefs.theme.dark}", "theme.set arg:1"))), "prefs.theme.1");
1685 setId_Widget(addChild_Widget(themes, iClob(new_LabelWidget("${prefs.theme.light}", "theme.set arg:2"))), "prefs.theme.2");
1686 setId_Widget(addChild_Widget(themes, iClob(new_LabelWidget("${prefs.theme.white}", "theme.set arg:3"))), "prefs.theme.3");
1687 }
1688 addChildFlags_Widget(values, iClob(themes), arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag);
1689 /* Accents. */
1690 iWidget *accent = new_Widget(); {
1691 setId_Widget(addChild_Widget(accent, iClob(new_LabelWidget("${prefs.accent.teal}", "accent.set arg:0"))), "prefs.accent.0");
1692 setId_Widget(addChild_Widget(accent, iClob(new_LabelWidget("${prefs.accent.orange}", "accent.set arg:1"))), "prefs.accent.1");
1693 }
1694 addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.accent}")));
1695 addChildFlags_Widget(values, iClob(accent), arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag);
1696#if defined (LAGRANGE_ENABLE_CUSTOM_FRAME) 1670#if defined (LAGRANGE_ENABLE_CUSTOM_FRAME)
1697 addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.customframe}"))); 1671 addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.customframe}")));
1698 addChild_Widget(values, iClob(makeToggle_Widget("prefs.customframe"))); 1672 addChild_Widget(values, iClob(makeToggle_Widget("prefs.customframe")));
@@ -1717,6 +1691,27 @@ iWidget *makePreferences_Widget(void) {
1717 } 1691 }
1718 /* Colors. */ { 1692 /* Colors. */ {
1719 appendTwoColumnPage_(tabs, "${heading.prefs.colors}", '3', &headings, &values); 1693 appendTwoColumnPage_(tabs, "${heading.prefs.colors}", '3', &headings, &values);
1694 makeTwoColumnHeading_("${heading.prefs.uitheme}", headings, values);
1695#if defined (iPlatformApple) || defined (iPlatformMSys)
1696 addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.ostheme}")));
1697 addChild_Widget(values, iClob(makeToggle_Widget("prefs.ostheme")));
1698#endif
1699 addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.theme}")));
1700 iWidget *themes = new_Widget();
1701 /* Themes. */ {
1702 setId_Widget(addChild_Widget(themes, iClob(new_LabelWidget("${prefs.theme.black}", "theme.set arg:0"))), "prefs.theme.0");
1703 setId_Widget(addChild_Widget(themes, iClob(new_LabelWidget("${prefs.theme.dark}", "theme.set arg:1"))), "prefs.theme.1");
1704 setId_Widget(addChild_Widget(themes, iClob(new_LabelWidget("${prefs.theme.light}", "theme.set arg:2"))), "prefs.theme.2");
1705 setId_Widget(addChild_Widget(themes, iClob(new_LabelWidget("${prefs.theme.white}", "theme.set arg:3"))), "prefs.theme.3");
1706 }
1707 addChildFlags_Widget(values, iClob(themes), arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag);
1708 /* Accents. */
1709 iWidget *accent = new_Widget(); {
1710 setId_Widget(addChild_Widget(accent, iClob(new_LabelWidget("${prefs.accent.teal}", "accent.set arg:0"))), "prefs.accent.0");
1711 setId_Widget(addChild_Widget(accent, iClob(new_LabelWidget("${prefs.accent.orange}", "accent.set arg:1"))), "prefs.accent.1");
1712 }
1713 addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.accent}")));
1714 addChildFlags_Widget(values, iClob(accent), arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag);
1720 makeTwoColumnHeading_("${heading.prefs.pagecontent}", headings, values); 1715 makeTwoColumnHeading_("${heading.prefs.pagecontent}", headings, values);
1721 for (int i = 0; i < 2; ++i) { 1716 for (int i = 0; i < 2; ++i) {
1722 const iBool isDark = (i == 0); 1717 const iBool isDark = (i == 0);
@@ -1749,14 +1744,15 @@ iWidget *makePreferences_Widget(void) {
1749 } 1744 }
1750 addChildFlags_Widget(values, iClob(sats), arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag); 1745 addChildFlags_Widget(values, iClob(sats), arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag);
1751 } 1746 }
1752 /* Layout. */ { 1747 /* Fonts. */ {
1753 setId_Widget(appendTwoColumnPage_(tabs, "${heading.prefs.style}", '4', &headings, &values), "prefs.page.style"); 1748 setId_Widget(appendTwoColumnPage_(tabs, "${heading.prefs.fonts}", '4', &headings, &values), "prefs.page.fonts");
1754 makeTwoColumnHeading_("${heading.prefs.fonts}", headings, values);
1755 /* Fonts. */ { 1749 /* Fonts. */ {
1756 addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.headingfont}"))); 1750 addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.headingfont}")));
1757 addFontButtons_(values, "headingfont"); 1751 addFontButtons_(values, "headingfont");
1758 addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.font}"))); 1752 addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.font}")));
1759 addFontButtons_(values, "font"); 1753 addFontButtons_(values, "font");
1754 addChild_Widget(headings, iClob(makePadding_Widget(bigGap)));
1755 addChild_Widget(values, iClob(makePadding_Widget(bigGap)));
1760 addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.mono}"))); 1756 addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.mono}")));
1761 iWidget *mono = new_Widget(); { 1757 iWidget *mono = new_Widget(); {
1762 iWidget *tog; 1758 iWidget *tog;
@@ -1788,11 +1784,18 @@ iWidget *makePreferences_Widget(void) {
1788 updateSize_LabelWidget((iLabelWidget *) tog); 1784 updateSize_LabelWidget((iLabelWidget *) tog);
1789 } 1785 }
1790 addChildFlags_Widget(values, iClob(boldLink), arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag); 1786 addChildFlags_Widget(values, iClob(boldLink), arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag);
1791 iInputWidget *customFont = new_InputWidget(0); 1787 addChild_Widget(headings, iClob(makePadding_Widget(bigGap)));
1792 setHint_InputWidget(customFont, "${hint.prefs.userfont}"); 1788 addChild_Widget(values, iClob(makePadding_Widget(bigGap)));
1793 addPrefsInputWithHeading_(headings, values, "prefs.userfont", iClob(customFont)); 1789 /* Custom font. */ {
1794 } 1790 iInputWidget *customFont = new_InputWidget(0);
1795 makeTwoColumnHeading_("${heading.prefs.paragraph}", headings, values); 1791 setHint_InputWidget(customFont, "${hint.prefs.userfont}");
1792 addPrefsInputWithHeading_(headings, values, "prefs.userfont", iClob(customFont));
1793 }
1794 }
1795 }
1796 /* Style. */ {
1797 setId_Widget(appendTwoColumnPage_(tabs, "${heading.prefs.style}", '5', &headings, &values), "prefs.page.style");
1798// makeTwoColumnHeading_("${heading.prefs.paragraph}", headings, values);
1796 addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.linewidth}"))); 1799 addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.linewidth}")));
1797 iWidget *widths = new_Widget(); 1800 iWidget *widths = new_Widget();
1798 /* Line widths. */ { 1801 /* Line widths. */ {
@@ -1812,14 +1815,20 @@ iWidget *makePreferences_Widget(void) {
1812 addChildFlags_Widget(values, iClob(quote), arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag); 1815 addChildFlags_Widget(values, iClob(quote), arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag);
1813 addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.biglede}"))); 1816 addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.biglede}")));
1814 addChild_Widget(values, iClob(makeToggle_Widget("prefs.biglede"))); 1817 addChild_Widget(values, iClob(makeToggle_Widget("prefs.biglede")));
1818 addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.plaintext.wrap}")));
1819 addChild_Widget(values, iClob(makeToggle_Widget("prefs.plaintext.wrap")));
1820 addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.collapsepreonload}")));
1821 addChild_Widget(values, iClob(makeToggle_Widget("prefs.collapsepreonload")));
1815// makeTwoColumnHeading_("${heading.prefs.widelayout}", headings, values); 1822// makeTwoColumnHeading_("${heading.prefs.widelayout}", headings, values);
1816 addChild_Widget(headings, iClob(makePadding_Widget(bigGap))); 1823 addChild_Widget(headings, iClob(makePadding_Widget(bigGap)));
1817 addChild_Widget(values, iClob(makePadding_Widget(bigGap))); 1824 addChild_Widget(values, iClob(makePadding_Widget(bigGap)));
1818 addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.sideicon}"))); 1825 addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.sideicon}")));
1819 addChild_Widget(values, iClob(makeToggle_Widget("prefs.sideicon"))); 1826 addChild_Widget(values, iClob(makeToggle_Widget("prefs.sideicon")));
1827 addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.centershort}")));
1828 addChild_Widget(values, iClob(makeToggle_Widget("prefs.centershort")));
1820 } 1829 }
1821 /* Network. */ { 1830 /* Network. */ {
1822 appendTwoColumnPage_(tabs, "${heading.prefs.network}", '5', &headings, &values); 1831 appendTwoColumnPage_(tabs, "${heading.prefs.network}", '6', &headings, &values);
1823 addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.decodeurls}"))); 1832 addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.decodeurls}")));
1824 addChild_Widget(values, iClob(makeToggle_Widget("prefs.decodeurls"))); 1833 addChild_Widget(values, iClob(makeToggle_Widget("prefs.decodeurls")));
1825 /* Cache size. */ { 1834 /* Cache size. */ {
@@ -1855,7 +1864,7 @@ iWidget *makePreferences_Widget(void) {
1855 /* Keybindings. */ 1864 /* Keybindings. */
1856 if (deviceType_App() == desktop_AppDeviceType) { 1865 if (deviceType_App() == desktop_AppDeviceType) {
1857 iBindingsWidget *bind = new_BindingsWidget(); 1866 iBindingsWidget *bind = new_BindingsWidget();
1858 appendFramelessTabPage_(tabs, iClob(bind), "${heading.prefs.keys}", '6', KMOD_PRIMARY); 1867 appendFramelessTabPage_(tabs, iClob(bind), "${heading.prefs.keys}", '7', KMOD_PRIMARY);
1859 } 1868 }
1860 addChild_Widget(dlg, iClob(makePadding_Widget(gap_UI))); 1869 addChild_Widget(dlg, iClob(makePadding_Widget(gap_UI)));
1861 updatePreferencesLayout_Widget(dlg); 1870 updatePreferencesLayout_Widget(dlg);