summaryrefslogtreecommitdiff
path: root/src/ui/util.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-02-24 18:03:43 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-02-24 18:03:43 +0200
commit8daaf356fc76eea35c714e36689f76d23fd2d2a2 (patch)
tree8f1673c6defefcd4d298c5390188be6249702844 /src/ui/util.c
parentfd17eeda7afc59a3e6613aeb28727248732351e9 (diff)
Preferences: Dropdown styling
Diffstat (limited to 'src/ui/util.c')
-rw-r--r--src/ui/util.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/ui/util.c b/src/ui/util.c
index d255bde4..5cdac391 100644
--- a/src/ui/util.c
+++ b/src/ui/util.c
@@ -1151,13 +1151,10 @@ static void addFontButtons_(iWidget *parent, const char *id) {
1151 pushBack_Array(items, 1151 pushBack_Array(items,
1152 &(iMenuItem){ fontNames[i], 0, 0, format_CStr("!%s.set arg:%d", id, i) }); 1152 &(iMenuItem){ fontNames[i], 0, 0, format_CStr("!%s.set arg:%d", id, i) });
1153 } 1153 }
1154// addRadioButton_(parent,
1155// format_CStr("prefs.%s.%u", id, i),
1156// fontNames[i],
1157// format_CStr("%s.set arg:%u", id, i));
1158 iLabelWidget *button = makeMenuButton_LabelWidget("Source Sans Pro", data_Array(items), size_Array(items)); 1154 iLabelWidget *button = makeMenuButton_LabelWidget("Source Sans Pro", data_Array(items), size_Array(items));
1155// setFrameColor_Widget(findChild_Widget(as_Widget(button), "menu"), uiBackgroundSelected_ColorId);
1159 setId_Widget(as_Widget(button), format_CStr("prefs.%s", id)); 1156 setId_Widget(as_Widget(button), format_CStr("prefs.%s", id));
1160 addChild_Widget(parent, iClob(button)); 1157 addChildFlags_Widget(parent, iClob(button), alignLeft_WidgetFlag);
1161 delete_Array(items); 1158 delete_Array(items);
1162} 1159}
1163 1160
@@ -1229,9 +1226,11 @@ iWidget *makePreferences_Widget(void) {
1229 { "High Contrast", 0, 0, format_CStr("doctheme.%s.set arg:%d", mode, highContrast_GmDocumentTheme) }, 1226 { "High Contrast", 0, 0, format_CStr("doctheme.%s.set arg:%d", mode, highContrast_GmDocumentTheme) },
1230 }; 1227 };
1231 addChild_Widget(headings, iClob(makeHeading_Widget(isDark ? "Dark theme:" : "Light theme:"))); 1228 addChild_Widget(headings, iClob(makeHeading_Widget(isDark ? "Dark theme:" : "Light theme:")));
1232 setId_Widget(addChild_Widget(values, 1229 iLabelWidget *button =
1233 iClob(makeMenuButton_LabelWidget( 1230 makeMenuButton_LabelWidget(themes[1].label, themes, iElemCount(themes));
1234 themes[0].label, themes, iElemCount(themes)))), 1231// setFrameColor_Widget(findChild_Widget(as_Widget(button), "menu"),
1232// uiBackgroundSelected_ColorId);
1233 setId_Widget(addChildFlags_Widget(values, iClob(button), alignLeft_WidgetFlag),
1235 format_CStr("prefs.doctheme.%s", mode)); 1234 format_CStr("prefs.doctheme.%s", mode));
1236 } 1235 }
1237 addChild_Widget(headings, iClob(makeHeading_Widget("Saturation:"))); 1236 addChild_Widget(headings, iClob(makeHeading_Widget("Saturation:")));