summaryrefslogtreecommitdiff
path: root/ted.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-08-05 22:32:24 -0400
committerpommicket <pommicket@gmail.com>2023-08-05 22:32:24 -0400
commit93023da1f9ed1e40d4e4317d20dbf8398017eee7 (patch)
tree365204b8560d8e03d0487c0428dac0c88e47c9cd /ted.c
parent61fcf4a14199486cc8bd7538ca236ac8fb93c0bb (diff)
start dynamic menus
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) {