mirror of
https://github.com/swaywm/sway.git
synced 2024-11-10 12:33:50 +01:00
Add margin to short_text handling.
Add a 3xscale margin matching other spacing in swaybar as part of short text width calculations
This commit is contained in:
parent
94dc57f3c5
commit
4b892a79aa
@ -453,10 +453,10 @@ static uint32_t render_status_line_i3bar(cairo_t *cairo,
|
|||||||
struct i3bar_block *block;
|
struct i3bar_block *block;
|
||||||
bool use_short_text = false;
|
bool use_short_text = false;
|
||||||
|
|
||||||
// TODO: Add margin here?
|
|
||||||
double reserved_width =
|
double reserved_width =
|
||||||
predict_workspace_buttons_length(cairo, output) +
|
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 =
|
double predicted_full_pos =
|
||||||
predict_status_line_pos(cairo, output, *x);
|
predict_status_line_pos(cairo, output, *x);
|
||||||
|
Loading…
Reference in New Issue
Block a user