aboutsummaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorYorick Peterse <git@yorickpeterse.com>2022-08-19 00:54:49 +0000
committerYorick Peterse <git@yorickpeterse.com>2022-08-20 20:16:32 +0000
commita0942f950df3b8826db4b1a3f149b7d0ed45adcf (patch)
treeb93f1026de15cc2096b89e3178e5b7a03aa2c6c7 /config.c
parentci: codespell: ignore ‘zar’ (user who contributed) (diff)
config: add setting for underline thickness
This adds an "underline-thickness" setting to the "main" section, similar to the existing "underline-offset" setting. This setting is used to specify a custom height for regular (= non-cursor) underlines. Fixes #1136
Diffstat (limited to 'config.c')
-rw-r--r--config.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/config.c b/config.c
index fbeab3e6..0ee01373 100644
--- a/config.c
+++ b/config.c
@@ -904,6 +904,9 @@ parse_section_main(struct context *ctx)
return true;
}
+ else if (strcmp(key, "underline-thickness") == 0)
+ return value_to_pt_or_px(ctx, &conf->underline_thickness);
+
else if (strcmp(key, "dpi-aware") == 0) {
if (strcmp(value, "auto") == 0)
conf->dpi_aware = DPI_AWARE_AUTO;
@@ -2833,6 +2836,7 @@ config_load(struct config *conf, const char *conf_path,
.vertical_letter_offset = {.pt = 0, .px = 0},
.use_custom_underline_offset = false,
.box_drawings_uses_font_glyphs = false,
+ .underline_thickness = {.pt = 0., .px = -1},
.dpi_aware = DPI_AWARE_AUTO, /* DPI-aware when scaling-factor == 1 */
.bell = {
.urgent = false,