1
0
Fork 0
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:
Dave Davenport 2015-10-05 18:22:01 +02:00
parent 77cdc8d7c4
commit 01aa2e32cc

View file

@ -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;