mirror of
https://github.com/NickHu/sway
synced 2024-12-26 21:58:30 +01:00
Fix separator height calculation
Fixes #1796 Also rearranged this code to more closely mirror the similar code above so future discrepancies are easier to spot.
This commit is contained in:
parent
84243a708e
commit
5785170421
1 changed files with 3 additions and 3 deletions
|
@ -159,9 +159,9 @@ static uint32_t render_status_block(cairo_t *cairo,
|
|||
if (config->sep_symbol) {
|
||||
get_text_size(cairo, config->font, &sep_width, &sep_height,
|
||||
output->scale, false, "%s", config->sep_symbol);
|
||||
uint32_t _ideal_surface_height = ws_vertical_padding * 2
|
||||
+ sep_height;
|
||||
if (_ideal_surface_height > surface_height) {
|
||||
uint32_t _ideal_height = sep_height + ws_vertical_padding * 2;
|
||||
uint32_t _ideal_surface_height = _ideal_height / output->scale;
|
||||
if (surface_height < _ideal_surface_height) {
|
||||
return _ideal_surface_height;
|
||||
}
|
||||
if (sep_width > block->separator_block_width) {
|
||||
|
|
Loading…
Reference in a new issue