[gtk+/gtk-3-12] entry: consider ascent and descent when requesting height
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-12] entry: consider ascent and descent when requesting height
- Date: Sat, 12 Apr 2014 16:02:11 +0000 (UTC)
commit 0ffc8a1eec44f62ec9bafb5e2eef51718f0b25b5
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Fri Apr 11 12:13:11 2014 -0700
entry: consider ascent and descent when requesting height
Commit d05191a010bcd9871b0155a785989192967c692b change the height
requisition to be completely dependent on the PangoLayout, but that
breaks when the font has special characters with different metrics.
Use the maximum between the two instead.
https://bugzilla.gnome.org/show_bug.cgi?id=728054
gtk/gtkentry.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index dc9756f..3fd1939 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -3452,6 +3452,7 @@ gtk_entry_get_preferred_height_and_baseline_for_width (GtkWidget *widget,
_gtk_entry_get_borders (entry, &borders);
pango_layout_get_pixel_size (layout, NULL, &height);
+ height = MAX (height, PANGO_PIXELS (priv->ascent + priv->descent));
height += borders.top + borders.bottom;
baseline = pango_layout_get_baseline (layout) / PANGO_SCALE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]