diff options
author | Michael Vetter <jubalh@iodoru.org> | 2022-04-04 23:38:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-04 23:38:31 +0200 |
commit | db154f226e85525832f58a0af8346f417f9fc739 (patch) | |
tree | f95d2847b68ebfa5449265582f7216769b3b2145 | |
parent | 91650d20fc242af25750bb780f55d17cc83c7c12 (diff) | |
parent | 4217105ff0ebaef3c11de9d4a00bef2629dfc59b (diff) | |
download | profani-tty-db154f226e85525832f58a0af8346f417f9fc739.tar.gz |
Merge pull request #1674 from paulfertser/allow-bold-for-default-colours
Allow bold for default colours
-rw-r--r-- | src/config/theme.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/config/theme.c b/src/config/theme.c index 39f3d00c..38eb3f2e 100644 --- a/src/config/theme.c +++ b/src/config/theme.c @@ -666,20 +666,21 @@ theme_get_bkgnd(void) static void _theme_prep_fgnd(char* setting, GString* lookup_str, gboolean* bold) { - gchar* val = g_key_file_get_string(theme, "colours", setting, NULL); - if (!val) { - char* def = g_hash_table_lookup(defaults, setting); - g_string_append(lookup_str, def); + gchar* conf_str = g_key_file_get_string(theme, "colours", setting, NULL); + gchar* val = conf_str; + + if (!val) + val = g_hash_table_lookup(defaults, setting); + + if (g_str_has_prefix(val, "bold_")) { + g_string_append(lookup_str, &val[5]); + *bold = TRUE; } else { - if (g_str_has_prefix(val, "bold_")) { - g_string_append(lookup_str, &val[5]); - *bold = TRUE; - } else { - g_string_append(lookup_str, val); - *bold = FALSE; - } + g_string_append(lookup_str, val); + *bold = FALSE; } - g_free(val); + + g_free(conf_str); } char* |