entry: don't blindly center the text area in the allocated height

Since top/bottom borders might be different.
This commit is contained in:
Cosimo Cecchi 2012-01-30 14:05:16 -05:00
parent 8275a20026
commit 3ca795d447

View File

@ -3228,7 +3228,7 @@ gtk_entry_get_text_area_size (GtkEntry *entry,
*x = borders.left;
if (y)
*y = frame_height / 2 - (req_height - borders.top - borders.bottom) / 2;
*y = floor ((frame_height - req_height) / 2) + borders.top;
if (width)
*width = allocation.width - borders.left - borders.right;