diff options
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/util.c | 47 |
1 files changed, 25 insertions, 22 deletions
diff --git a/src/ui/util.c b/src/ui/util.c index 870d1cad..98bcef90 100644 --- a/src/ui/util.c +++ b/src/ui/util.c | |||
@@ -1887,6 +1887,7 @@ iWidget *makePreferences_Widget(void) { | |||
1887 | setBackgroundColor_Widget(findChild_Widget(tabs, "tabs.buttons"), uiBackgroundSidebar_ColorId); | 1887 | setBackgroundColor_Widget(findChild_Widget(tabs, "tabs.buttons"), uiBackgroundSidebar_ColorId); |
1888 | setId_Widget(tabs, "prefs.tabs"); | 1888 | setId_Widget(tabs, "prefs.tabs"); |
1889 | iWidget *headings, *values; | 1889 | iWidget *headings, *values; |
1890 | const int lineGap = lineHeight_Text(uiLabel_FontId); | ||
1890 | /* General preferences. */ { | 1891 | /* General preferences. */ { |
1891 | appendTwoColumnPage_(tabs, "${heading.prefs.general}", '1', &headings, &values); | 1892 | appendTwoColumnPage_(tabs, "${heading.prefs.general}", '1', &headings, &values); |
1892 | #if defined (LAGRANGE_DOWNLOAD_EDIT) | 1893 | #if defined (LAGRANGE_DOWNLOAD_EDIT) |
@@ -1895,34 +1896,28 @@ iWidget *makePreferences_Widget(void) { | |||
1895 | #endif | 1896 | #endif |
1896 | addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.searchurl}"))); | 1897 | addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.searchurl}"))); |
1897 | setId_Widget(addChild_Widget(values, iClob(new_InputWidget(0))), "prefs.searchurl"); | 1898 | setId_Widget(addChild_Widget(values, iClob(new_InputWidget(0))), "prefs.searchurl"); |
1898 | addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.hoverlink}"))); | 1899 | addChild_Widget(headings, iClob(makePadding_Widget(lineGap))); |
1899 | addChild_Widget(values, iClob(makeToggle_Widget("prefs.hoverlink"))); | 1900 | addChild_Widget(values, iClob(makePadding_Widget(lineGap))); |
1900 | addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.centershort}"))); | ||
1901 | addChild_Widget(values, iClob(makeToggle_Widget("prefs.centershort"))); | ||
1902 | addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.collapsepreonload}"))); | 1901 | addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.collapsepreonload}"))); |
1903 | addChild_Widget(values, iClob(makeToggle_Widget("prefs.collapsepreonload"))); | 1902 | addChild_Widget(values, iClob(makeToggle_Widget("prefs.collapsepreonload"))); |
1904 | makeTwoColumnHeading_("${heading.prefs.scrolling}", headings, values); | 1903 | addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.plaintext.wrap}"))); |
1905 | addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.smoothscroll}"))); | 1904 | addChild_Widget(values, iClob(makeToggle_Widget("prefs.plaintext.wrap"))); |
1906 | addChild_Widget(values, iClob(makeToggle_Widget("prefs.smoothscroll"))); | 1905 | addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.centershort}"))); |
1907 | addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.imageloadscroll}"))); | 1906 | addChild_Widget(values, iClob(makeToggle_Widget("prefs.centershort"))); |
1908 | addChild_Widget(values, iClob(makeToggle_Widget("prefs.imageloadscroll"))); | 1907 | addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.hoverlink}"))); |
1909 | if (deviceType_App() == phone_AppDeviceType) { | 1908 | addChild_Widget(values, iClob(makeToggle_Widget("prefs.hoverlink"))); |
1910 | addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.hidetoolbarscroll}"))); | 1909 | addChild_Widget(headings, iClob(makePadding_Widget(lineGap))); |
1911 | addChild_Widget(values, iClob(makeToggle_Widget("prefs.hidetoolbarscroll"))); | 1910 | addChild_Widget(values, iClob(makePadding_Widget(lineGap))); |
1912 | } | ||
1913 | } | ||
1914 | /* Window. */ { | ||
1915 | appendTwoColumnPage_(tabs, "${heading.prefs.interface}", '2', &headings, &values); | ||
1916 | /* UI languages. */ { | 1911 | /* UI languages. */ { |
1917 | iArray *uiLangs = collectNew_Array(sizeof(iMenuItem)); | 1912 | iArray *uiLangs = collectNew_Array(sizeof(iMenuItem)); |
1918 | const iMenuItem langItems[] = { | 1913 | const iMenuItem langItems[] = { |
1919 | // { "${lang.de} - de", 0, 0, "uilang id:de" }, | 1914 | // { "${lang.de} - de", 0, 0, "uilang id:de" }, |
1920 | { "${lang.en} - en", 0, 0, "uilang id:en" }, | 1915 | { "${lang.en} - en", 0, 0, "uilang id:en" }, |
1921 | { "${lang.es} - es", 0, 0, "uilang id:es" }, | 1916 | { "${lang.es} - es", 0, 0, "uilang id:es" }, |
1922 | { "${lang.fi} - fi", 0, 0, "uilang id:fi" }, | 1917 | { "${lang.fi} - fi", 0, 0, "uilang id:fi" }, |
1923 | { "${lang.ru} - ru", 0, 0, "uilang id:ru" }, | 1918 | { "${lang.ru} - ru", 0, 0, "uilang id:ru" }, |
1924 | { "${lang.zh.hans} - zh", 0, 0, "uilang id:zh_Hans" }, | 1919 | { "${lang.zh.hans} - zh", 0, 0, "uilang id:zh_Hans" }, |
1925 | }; | 1920 | }; |
1926 | pushBackN_Array(uiLangs, langItems, iElemCount(langItems)); | 1921 | pushBackN_Array(uiLangs, langItems, iElemCount(langItems)); |
1927 | //sort_Array(uiLangs, cmp_MenuItem_); | 1922 | //sort_Array(uiLangs, cmp_MenuItem_); |
1928 | /* TODO: Add an arrange flag for resizing parent to widest child. */ | 1923 | /* TODO: Add an arrange flag for resizing parent to widest child. */ |
@@ -1946,9 +1941,10 @@ iWidget *makePreferences_Widget(void) { | |||
1946 | size_Array(uiLangs))), | 1941 | size_Array(uiLangs))), |
1947 | alignLeft_WidgetFlag), | 1942 | alignLeft_WidgetFlag), |
1948 | "prefs.uilang"); | 1943 | "prefs.uilang"); |
1949 | addChild_Widget(headings, iClob(makePadding_Widget(gap_UI))); | ||
1950 | addChild_Widget(values, iClob(makePadding_Widget(gap_UI))); | ||
1951 | } | 1944 | } |
1945 | } | ||
1946 | /* User Interface. */ { | ||
1947 | appendTwoColumnPage_(tabs, "${heading.prefs.interface}", '2', &headings, &values); | ||
1952 | #if defined (iPlatformApple) || defined (iPlatformMSys) | 1948 | #if defined (iPlatformApple) || defined (iPlatformMSys) |
1953 | addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.ostheme}"))); | 1949 | addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.ostheme}"))); |
1954 | addChild_Widget(values, iClob(makeToggle_Widget("prefs.ostheme"))); | 1950 | addChild_Widget(values, iClob(makeToggle_Widget("prefs.ostheme"))); |
@@ -1973,6 +1969,15 @@ iWidget *makePreferences_Widget(void) { | |||
1973 | addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.customframe}"))); | 1969 | addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.customframe}"))); |
1974 | addChild_Widget(values, iClob(makeToggle_Widget("prefs.customframe"))); | 1970 | addChild_Widget(values, iClob(makeToggle_Widget("prefs.customframe"))); |
1975 | #endif | 1971 | #endif |
1972 | makeTwoColumnHeading_("${heading.prefs.scrolling}", headings, values); | ||
1973 | addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.smoothscroll}"))); | ||
1974 | addChild_Widget(values, iClob(makeToggle_Widget("prefs.smoothscroll"))); | ||
1975 | addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.imageloadscroll}"))); | ||
1976 | addChild_Widget(values, iClob(makeToggle_Widget("prefs.imageloadscroll"))); | ||
1977 | if (deviceType_App() == phone_AppDeviceType) { | ||
1978 | addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.hidetoolbarscroll}"))); | ||
1979 | addChild_Widget(values, iClob(makeToggle_Widget("prefs.hidetoolbarscroll"))); | ||
1980 | } | ||
1976 | makeTwoColumnHeading_("${heading.prefs.sizing}", headings, values); | 1981 | makeTwoColumnHeading_("${heading.prefs.sizing}", headings, values); |
1977 | addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.uiscale}"))); | 1982 | addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.uiscale}"))); |
1978 | setId_Widget(addChild_Widget(values, iClob(new_InputWidget(8))), "prefs.uiscale"); | 1983 | setId_Widget(addChild_Widget(values, iClob(new_InputWidget(8))), "prefs.uiscale"); |
@@ -2057,8 +2062,6 @@ iWidget *makePreferences_Widget(void) { | |||
2057 | addChildFlags_Widget(values, iClob(quote), arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag); | 2062 | addChildFlags_Widget(values, iClob(quote), arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag); |
2058 | addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.biglede}"))); | 2063 | addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.biglede}"))); |
2059 | addChild_Widget(values, iClob(makeToggle_Widget("prefs.biglede"))); | 2064 | addChild_Widget(values, iClob(makeToggle_Widget("prefs.biglede"))); |
2060 | addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.plaintext.wrap}"))); | ||
2061 | addChild_Widget(values, iClob(makeToggle_Widget("prefs.plaintext.wrap"))); | ||
2062 | } | 2065 | } |
2063 | /* Network. */ { | 2066 | /* Network. */ { |
2064 | appendTwoColumnPage_(tabs, "${heading.prefs.network}", '5', &headings, &values); | 2067 | appendTwoColumnPage_(tabs, "${heading.prefs.network}", '5', &headings, &values); |