summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-10-17 10:13:07 -0400
committerpommicket <pommicket@gmail.com>2023-10-17 10:13:07 -0400
commit13c10a7002fd25efc22d3f07f25f9bf693f83e89 (patch)
tree8fc2c1d5ba93d3dc0a8d05471b96d5978bffa212 /config.c
parent00fd503614571387750faac33069d1f2e500d59c (diff)
sort key actions (new config system seems to be working!)
Diffstat (limited to 'config.c')
-rw-r--r--config.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/config.c b/config.c
index 267e2cc..34e37b9 100644
--- a/config.c
+++ b/config.c
@@ -837,10 +837,6 @@ static void config_parse_line(ConfigReader *reader, Config *cfg, char *line, FIL
}
} break;
}
- if (streq(setting_any->name, "text-size")) {
- config_set_u16(cfg, &setting_text_size_dpi_aware, (u16)roundf((float)integer * ted_get_ui_scaling(ted)));
- }
-
} break;
}
}
@@ -854,6 +850,11 @@ static int key_action_qsort_cmp_combo(const void *av, const void *bv) {
return 0;
}
+void settings_finalize(Ted *ted, Settings *settings) {
+ arr_qsort(settings->key_actions, key_action_qsort_cmp_combo);
+ settings->text_size = clamp_u16((u16)roundf((float)settings->text_size_no_dpi * ted_get_ui_scaling(ted)), TEXT_SIZE_MIN, TEXT_SIZE_MAX);
+}
+
static void config_read_file(Ted *ted, const char *cfg_path, const char ***include_stack) {
// check for, e.g. %include ted.cfg inside ted.cfg
arr_foreach_ptr(*include_stack, const char *, p_include) {