mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-25 13:55:34 -05:00
When element is to high, don't y center.
This commit is contained in:
parent
77cdc8d7c4
commit
01aa2e32cc
1 changed files with 6 additions and 1 deletions
|
@ -272,7 +272,12 @@ static void texbox_update ( textbox *tb )
|
||||||
int tw = textbox_get_font_width ( tb );
|
int tw = textbox_get_font_width ( tb );
|
||||||
x = ( ( tb->w - tw - 2 * SIDE_MARGIN ) ) / 2;
|
x = ( ( tb->w - tw - 2 * SIDE_MARGIN ) ) / 2;
|
||||||
}
|
}
|
||||||
y = ( ( tb->h - textbox_get_font_height ( tb ) ) ) / 2;
|
short fh = textbox_get_font_height ( tb );
|
||||||
|
if(fh > tb->h) {
|
||||||
|
y=0;
|
||||||
|
}else {
|
||||||
|
y = ( ( tb->h - fh ) ) / 2;
|
||||||
|
}
|
||||||
|
|
||||||
// Set ARGB
|
// Set ARGB
|
||||||
Color col = tb->color_bg;
|
Color col = tb->color_bg;
|
||||||
|
|
Loading…
Reference in a new issue