summaryrefslogtreecommitdiff
path: root/src/ui/util.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-09-21 11:05:04 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-09-21 11:05:04 +0300
commitbbba0d93270cc8a4ca71295cb1e0ab99e86e320d (patch)
treeefba4f61cbae25173d11548d1fe21e7d038598a7 /src/ui/util.c
parent9721a5f46bd2e3b1cc564cf615ef716658ef9c1a (diff)
Document theme color saturation preference
Diffstat (limited to 'src/ui/util.c')
-rw-r--r--src/ui/util.c29
1 files changed, 21 insertions, 8 deletions
diff --git a/src/ui/util.c b/src/ui/util.c
index 52107d81..c341a11d 100644
--- a/src/ui/util.c
+++ b/src/ui/util.c
@@ -843,9 +843,6 @@ static void expandInputFieldWidth_(iInputWidget *input) {
843 iWidget *page = as_Widget(input)->parent->parent->parent->parent; /* tabs > page > values > input */ 843 iWidget *page = as_Widget(input)->parent->parent->parent->parent; /* tabs > page > values > input */
844 as_Widget(input)->rect.size.x = 844 as_Widget(input)->rect.size.x =
845 right_Rect(bounds_Widget(page)) - left_Rect(bounds_Widget(constAs_Widget(input))); 845 right_Rect(bounds_Widget(page)) - left_Rect(bounds_Widget(constAs_Widget(input)));
846 printf("expand to %s, %d - %d\n", cstr_String(id_Widget(page)),
847 right_Rect(bounds_Widget(page)), left_Rect(bounds_Widget(constAs_Widget(input))));
848 fflush(stdout);
849} 846}
850 847
851iWidget *makePreferences_Widget(void) { 848iWidget *makePreferences_Widget(void) {
@@ -881,18 +878,34 @@ iWidget *makePreferences_Widget(void) {
881 /* Layout. */ { 878 /* Layout. */ {
882 appendTwoColumnPage_(tabs, "Layout", &headings, &values); 879 appendTwoColumnPage_(tabs, "Layout", &headings, &values);
883 addChild_Widget(headings, iClob(makeHeading_Widget("Line width:"))); 880 addChild_Widget(headings, iClob(makeHeading_Widget("Line width:")));
884 addChild_Widget(values, iClob(new_LabelWidget("Normal", 0, 0, NULL))); 881 iWidget *widths = new_Widget();
885 addChild_Widget(headings, iClob(makeHeading_Widget("First paragaph:"))); 882 /* Line widths. */ {
886 addChild_Widget(values, iClob(new_LabelWidget("Emphasized", 0, 0, NULL))); 883 addChild_Widget(widths, iClob(new_LabelWidget("\u20132", 0, 0, "linewidth.set arg:-2")));
884 addChild_Widget(widths, iClob(new_LabelWidget("\u20131", 0, 0, "linewidth.set arg:-1")));
885 addChild_Widget(widths, iClob(new_LabelWidget("Normal", 0, 0, "linewidth.set arg:0")));
886 addChild_Widget(widths, iClob(new_LabelWidget("+1", 0, 0, "linewidth.set arg:1")));
887 addChild_Widget(widths, iClob(new_LabelWidget("+2", 0, 0, "linewidth.set arg:2")));
888 addChild_Widget(widths, iClob(new_LabelWidget("Window", 0, 0, "linewidth.set arg:1000")));
889 }
890 addChildFlags_Widget(values, iClob(widths), arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag);
891 addChild_Widget(headings, iClob(makeHeading_Widget("Big 1st paragaph:")));
892 addChild_Widget(values, iClob(makeToggle_Widget("prefs.biglede")));
887 } 893 }
888 /* Colors. */ { 894 /* Colors. */ {
889 appendTwoColumnPage_(tabs, "Colors", &headings, &values); 895 appendTwoColumnPage_(tabs, "Colors", &headings, &values);
890 addChild_Widget(headings, iClob(makeHeading_Widget("Saturation:")));
891 addChild_Widget(values, iClob(new_LabelWidget("Full", 0, 0, 0)));
892 addChild_Widget(headings, iClob(makeHeading_Widget("Dark theme:"))); 896 addChild_Widget(headings, iClob(makeHeading_Widget("Dark theme:")));
893 addChild_Widget(values, iClob(new_LabelWidget("Colorful", 0, 0, 0))); 897 addChild_Widget(values, iClob(new_LabelWidget("Colorful", 0, 0, 0)));
894 addChild_Widget(headings, iClob(makeHeading_Widget("Light theme:"))); 898 addChild_Widget(headings, iClob(makeHeading_Widget("Light theme:")));
895 addChild_Widget(values, iClob(new_LabelWidget("White", 0, 0, 0))); 899 addChild_Widget(values, iClob(new_LabelWidget("White", 0, 0, 0)));
900 addChild_Widget(headings, iClob(makeHeading_Widget("Saturation:")));
901 iWidget *sats = new_Widget();
902 /* Saturation levels. */ {
903 addChild_Widget(sats, iClob(new_LabelWidget("Full", 0, 0, "saturation.set arg:100")));
904 addChild_Widget(sats, iClob(new_LabelWidget("Reduced", 0, 0, "saturation.set arg:66")));
905 addChild_Widget(sats, iClob(new_LabelWidget("Minimal", 0, 0, "saturation.set arg:33")));
906 addChild_Widget(sats, iClob(new_LabelWidget("Monochrome", 0, 0, "saturation.set arg:0")));
907 }
908 addChildFlags_Widget(values, iClob(sats), arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag);
896 } 909 }
897 /* Proxies. */ { 910 /* Proxies. */ {
898 appendTwoColumnPage_(tabs, "Proxies", &headings, &values); 911 appendTwoColumnPage_(tabs, "Proxies", &headings, &values);