summaryrefslogtreecommitdiff
path: root/ted.c
diff options
context:
space:
mode:
Diffstat (limited to 'ted.c')
-rw-r--r--ted.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ted.c b/ted.c
index f3cd7a3..10567eb 100644
--- a/ted.c
+++ b/ted.c
@@ -681,6 +681,11 @@ void ted_reload_all(Ted *ted) {
}
}
+float ted_get_menu_width(Ted *ted) {
+ const Settings *settings = ted_active_settings(ted);
+ return minf(settings->max_menu_width, ted->window_width - 2.0f * settings->padding);
+}
+
// load/reload configs
void ted_load_configs(Ted *ted) {