diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-10-18 09:07:21 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-10-18 09:07:21 +0300 |
commit | baf4f8d5b02952e4adfcf60acdd1ac904c132c89 (patch) | |
tree | 6a468ffdf3de63ec2f94508f5dbcd94a8ee6d1ac /src/ui/util.c | |
parent | 3fb04c28f22475814708f69022eae5220d542108 (diff) |
Preferences: ANSI escape flags
FG color and font style escapes can be enabled separately. FG color remains enabled by default like before.
Diffstat (limited to 'src/ui/util.c')
-rw-r--r-- | src/ui/util.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/ui/util.c b/src/ui/util.c index 3b146155..e3759f09 100644 --- a/src/ui/util.c +++ b/src/ui/util.c | |||
@@ -2549,7 +2549,21 @@ iWidget *makePreferences_Widget(void) { | |||
2549 | addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.font.monodoc}"))); | 2549 | addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.font.monodoc}"))); |
2550 | addFontButtons_(values, "monodoc"); | 2550 | addFontButtons_(values, "monodoc"); |
2551 | addDialogPadding_(headings, values); | 2551 | addDialogPadding_(headings, values); |
2552 | addDialogToggle_(headings, values, "${prefs.gemtext.ansi}", "prefs.gemtext.ansi"); | 2552 | addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.gemtext.ansi}"))); |
2553 | iWidget *ansi = new_Widget(); { | ||
2554 | iWidget *tog; | ||
2555 | setTextCStr_LabelWidget( | ||
2556 | addChild_Widget(ansi, tog = iClob(makeToggle_Widget("prefs.gemtext.ansi.fg"))), | ||
2557 | "${prefs.gemtext.ansi.fg}"); | ||
2558 | setFlags_Widget(tog, fixedWidth_WidgetFlag, iFalse); | ||
2559 | updateSize_LabelWidget((iLabelWidget *) tog); | ||
2560 | setTextCStr_LabelWidget( | ||
2561 | addChild_Widget(ansi, tog = iClob(makeToggle_Widget("prefs.gemtext.ansi.fontstyle"))), | ||
2562 | "${prefs.gemtext.ansi.fontstyle}"); | ||
2563 | setFlags_Widget(tog, fixedWidth_WidgetFlag, iFalse); | ||
2564 | updateSize_LabelWidget((iLabelWidget *) tog); | ||
2565 | } | ||
2566 | addChildFlags_Widget(values, iClob(ansi), arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag); | ||
2553 | addDialogToggle_(headings, values, "${prefs.font.smooth}", "prefs.font.smooth"); | 2567 | addDialogToggle_(headings, values, "${prefs.font.smooth}", "prefs.font.smooth"); |
2554 | addDialogPadding_(headings, values); | 2568 | addDialogPadding_(headings, values); |
2555 | addFontButtons_(values, "ui"); | 2569 | addFontButtons_(values, "ui"); |