[gtk+/wip/entry-css-cleanups: 3/11] entry: don't blindly center the text area in the allocated height
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/entry-css-cleanups: 3/11] entry: don't blindly center the text area in the allocated height
- Date: Mon, 30 Jan 2012 22:41:24 +0000 (UTC)
commit 0b99aca3e4ff5e99894de67000ff2521702455c0
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Mon Jan 30 14:05:16 2012 -0500
entry: don't blindly center the text area in the allocated height
Since top/bottom borders might be different.
gtk/gtkentry.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 4f0d909..f094fd2 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]