Check height in surface local coordinates and rename some variables.
This commit is contained in:
parent
1a0d367f22
commit
7dfc0409eb
|
@ -159,9 +159,10 @@ static uint32_t render_status_block(cairo_t *cairo,
|
||||||
if (config->sep_symbol) {
|
if (config->sep_symbol) {
|
||||||
get_text_size(cairo, config->font, &sep_width, &sep_height,
|
get_text_size(cairo, config->font, &sep_width, &sep_height,
|
||||||
output->scale, false, "%s", config->sep_symbol);
|
output->scale, false, "%s", config->sep_symbol);
|
||||||
uint32_t _ideal_height = sep_height + ws_vertical_padding * 2;
|
uint32_t _ideal_surface_height = ws_vertical_padding * 2
|
||||||
if (_ideal_height * output->scale > height) {
|
+ sep_height;
|
||||||
return _ideal_height;
|
if (_ideal_surface_height > surface_height) {
|
||||||
|
return _ideal_surface_height;
|
||||||
}
|
}
|
||||||
if (sep_width > block->separator_block_width) {
|
if (sep_width > block->separator_block_width) {
|
||||||
block->separator_block_width = sep_width + margin * 2;
|
block->separator_block_width = sep_width + margin * 2;
|
||||||
|
|
Loading…
Reference in a new issue