From 4b892a79aae47ef2a7a4776e959eca612e0df08b Mon Sep 17 00:00:00 2001 From: Dmitri Kourennyi Date: Mon, 1 Apr 2019 16:13:39 -0400 Subject: Add margin to short_text handling. Add a 3xscale margin matching other spacing in swaybar as part of short text width calculations --- swaybar/render.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'swaybar/render.c') diff --git a/swaybar/render.c b/swaybar/render.c index a0200f0d..e17c13a8 100644 --- a/swaybar/render.c +++ b/swaybar/render.c @@ -453,10 +453,10 @@ static uint32_t render_status_line_i3bar(cairo_t *cairo, struct i3bar_block *block; bool use_short_text = false; - // TODO: Add margin here? double reserved_width = predict_workspace_buttons_length(cairo, output) + - predict_binding_mode_indicator_length(cairo, output); + predict_binding_mode_indicator_length(cairo, output) + + 3 * output->scale; // require a bit of space for margin double predicted_full_pos = predict_status_line_pos(cairo, output, *x); -- cgit v1.2.3-54-g00ecf