mirror of
https://github.com/swaywm/sway.git
synced 2026-03-30 11:10:59 -04:00
parent
45f14fcb24
commit
54444e7587
3 changed files with 9 additions and 2 deletions
|
|
@ -61,6 +61,13 @@ static void render_block(struct window *window, struct config *config, struct st
|
|||
int textwidth = width;
|
||||
double block_width = width;
|
||||
|
||||
if (block->min_width_str) {
|
||||
int w, h;
|
||||
get_text_size(window->cairo, window->font, &w, &h,
|
||||
window->scale, block->markup, "%s", block->min_width_str);
|
||||
block->min_width = w;
|
||||
}
|
||||
|
||||
if (width < block->min_width) {
|
||||
width = block->min_width;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue