summaryrefslogtreecommitdiff
path: root/src/ui/util.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-03-05 22:53:10 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-03-05 22:53:10 +0200
commit78dcb6d388155454cfd042072419eb03080ad57d (patch)
tree73c0eb31abfa00c999ec500e3c9f8ebcf335913c /src/ui/util.c
parentb9d8c68236b14bda918e3089f5965fdfd60ecba4 (diff)
UI color tuning; menu item backgrounds
Diffstat (limited to 'src/ui/util.c')
-rw-r--r--src/ui/util.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/ui/util.c b/src/ui/util.c
index e8bb95d8..df44cc80 100644
--- a/src/ui/util.c
+++ b/src/ui/util.c
@@ -478,7 +478,7 @@ iWidget *makeMenu_Widget(iWidget *parent, const iMenuItem *items, size_t n) {
478 iLabelWidget *label = addChildFlags_Widget( 478 iLabelWidget *label = addChildFlags_Widget(
479 menu, 479 menu,
480 iClob(newKeyMods_LabelWidget(item->label, item->key, item->kmods, item->command)), 480 iClob(newKeyMods_LabelWidget(item->label, item->key, item->kmods, item->command)),
481 frameless_WidgetFlag | alignLeft_WidgetFlag | drawKey_WidgetFlag | itemFlags); 481 noBackground_WidgetFlag | frameless_WidgetFlag | alignLeft_WidgetFlag | drawKey_WidgetFlag | itemFlags);
482 haveIcons |= checkIcon_LabelWidget(label); 482 haveIcons |= checkIcon_LabelWidget(label);
483 updateSize_LabelWidget(label); /* drawKey was set */ 483 updateSize_LabelWidget(label); /* drawKey was set */
484 } 484 }
@@ -1284,7 +1284,7 @@ static void addFontButtons_(iWidget *parent, const char *id) {
1284 &(iMenuItem){ fontNames[i], 0, 0, format_CStr("!%s.set arg:%d", id, i) }); 1284 &(iMenuItem){ fontNames[i], 0, 0, format_CStr("!%s.set arg:%d", id, i) });
1285 } 1285 }
1286 iLabelWidget *button = makeMenuButton_LabelWidget("Source Sans Pro", data_Array(items), size_Array(items)); 1286 iLabelWidget *button = makeMenuButton_LabelWidget("Source Sans Pro", data_Array(items), size_Array(items));
1287// setFrameColor_Widget(findChild_Widget(as_Widget(button), "menu"), uiBackgroundSelected_ColorId); 1287 setBackgroundColor_Widget(findChild_Widget(as_Widget(button), "menu"), uiBackgroundMenu_ColorId);
1288 setId_Widget(as_Widget(button), format_CStr("prefs.%s", id)); 1288 setId_Widget(as_Widget(button), format_CStr("prefs.%s", id));
1289 addChildFlags_Widget(parent, iClob(button), alignLeft_WidgetFlag); 1289 addChildFlags_Widget(parent, iClob(button), alignLeft_WidgetFlag);
1290 delete_Array(items); 1290 delete_Array(items);
@@ -1371,6 +1371,7 @@ iWidget *makePreferences_Widget(void) {
1371 makeMenuButton_LabelWidget(themes[1].label, themes, iElemCount(themes)); 1371 makeMenuButton_LabelWidget(themes[1].label, themes, iElemCount(themes));
1372// setFrameColor_Widget(findChild_Widget(as_Widget(button), "menu"), 1372// setFrameColor_Widget(findChild_Widget(as_Widget(button), "menu"),
1373// uiBackgroundSelected_ColorId); 1373// uiBackgroundSelected_ColorId);
1374 setBackgroundColor_Widget(findChild_Widget(as_Widget(button), "menu"), uiBackgroundMenu_ColorId);
1374 setId_Widget(addChildFlags_Widget(values, iClob(button), alignLeft_WidgetFlag), 1375 setId_Widget(addChildFlags_Widget(values, iClob(button), alignLeft_WidgetFlag),
1375 format_CStr("prefs.doctheme.%s", mode)); 1376 format_CStr("prefs.doctheme.%s", mode));
1376 } 1377 }
@@ -1390,13 +1391,9 @@ iWidget *makePreferences_Widget(void) {
1390 /* Fonts. */ { 1391 /* Fonts. */ {
1391 iWidget *fonts; 1392 iWidget *fonts;
1392 addChild_Widget(headings, iClob(makeHeading_Widget("Heading font:"))); 1393 addChild_Widget(headings, iClob(makeHeading_Widget("Heading font:")));
1393// fonts = new_Widget();
1394 addFontButtons_(values, "headingfont"); 1394 addFontButtons_(values, "headingfont");
1395// addChildFlags_Widget(values, iClob(fonts), 0); //arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag);
1396 addChild_Widget(headings, iClob(makeHeading_Widget("Body font:"))); 1395 addChild_Widget(headings, iClob(makeHeading_Widget("Body font:")));
1397// fonts = new_Widget();
1398 addFontButtons_(values, "font"); 1396 addFontButtons_(values, "font");
1399// addChildFlags_Widget(values, iClob(fonts), 0); //arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag);
1400 addChild_Widget(headings, iClob(makeHeading_Widget("Monospace body:"))); 1397 addChild_Widget(headings, iClob(makeHeading_Widget("Monospace body:")));
1401 iWidget *mono = new_Widget(); 1398 iWidget *mono = new_Widget();
1402 /* TODO: Needs labels! */ 1399 /* TODO: Needs labels! */