forked from AuroraMiddleware/gtk
Use new pango_context_get_metrics() to fix problems with font lists in
Tue Jun 26 11:06:34 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkclist.c gtk/gtkentry.c gtk/gtkspinbutton.c: Use new pango_context_get_metrics() to fix problems with font lists in descriptions. (#56184, reported by Jonas Borgström)
This commit is contained in:
parent
bd2b9eebaf
commit
671b3b0eb0
@ -1,3 +1,10 @@
|
|||||||
|
Tue Jun 26 11:06:34 2001 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkclist.c gtk/gtkentry.c gtk/gtkspinbutton.c:
|
||||||
|
Use new pango_context_get_metrics() to fix problems
|
||||||
|
with font lists in descriptions. (#56184, reported by
|
||||||
|
Jonas Borgström)
|
||||||
|
|
||||||
Tue Jun 26 10:04:30 2001 Tim Janik <timj@gtk.org>
|
Tue Jun 26 10:04:30 2001 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gtk/gtkiconfactory.c:
|
* gtk/gtkiconfactory.c:
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
Tue Jun 26 11:06:34 2001 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkclist.c gtk/gtkentry.c gtk/gtkspinbutton.c:
|
||||||
|
Use new pango_context_get_metrics() to fix problems
|
||||||
|
with font lists in descriptions. (#56184, reported by
|
||||||
|
Jonas Borgström)
|
||||||
|
|
||||||
Tue Jun 26 10:04:30 2001 Tim Janik <timj@gtk.org>
|
Tue Jun 26 10:04:30 2001 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gtk/gtkiconfactory.c:
|
* gtk/gtkiconfactory.c:
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
Tue Jun 26 11:06:34 2001 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkclist.c gtk/gtkentry.c gtk/gtkspinbutton.c:
|
||||||
|
Use new pango_context_get_metrics() to fix problems
|
||||||
|
with font lists in descriptions. (#56184, reported by
|
||||||
|
Jonas Borgström)
|
||||||
|
|
||||||
Tue Jun 26 10:04:30 2001 Tim Janik <timj@gtk.org>
|
Tue Jun 26 10:04:30 2001 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gtk/gtkiconfactory.c:
|
* gtk/gtkiconfactory.c:
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
Tue Jun 26 11:06:34 2001 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkclist.c gtk/gtkentry.c gtk/gtkspinbutton.c:
|
||||||
|
Use new pango_context_get_metrics() to fix problems
|
||||||
|
with font lists in descriptions. (#56184, reported by
|
||||||
|
Jonas Borgström)
|
||||||
|
|
||||||
Tue Jun 26 10:04:30 2001 Tim Janik <timj@gtk.org>
|
Tue Jun 26 10:04:30 2001 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gtk/gtkiconfactory.c:
|
* gtk/gtkiconfactory.c:
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
Tue Jun 26 11:06:34 2001 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkclist.c gtk/gtkentry.c gtk/gtkspinbutton.c:
|
||||||
|
Use new pango_context_get_metrics() to fix problems
|
||||||
|
with font lists in descriptions. (#56184, reported by
|
||||||
|
Jonas Borgström)
|
||||||
|
|
||||||
Tue Jun 26 10:04:30 2001 Tim Janik <timj@gtk.org>
|
Tue Jun 26 10:04:30 2001 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gtk/gtkiconfactory.c:
|
* gtk/gtkiconfactory.c:
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
Tue Jun 26 11:06:34 2001 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkclist.c gtk/gtkentry.c gtk/gtkspinbutton.c:
|
||||||
|
Use new pango_context_get_metrics() to fix problems
|
||||||
|
with font lists in descriptions. (#56184, reported by
|
||||||
|
Jonas Borgström)
|
||||||
|
|
||||||
Tue Jun 26 10:04:30 2001 Tim Janik <timj@gtk.org>
|
Tue Jun 26 10:04:30 2001 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gtk/gtkiconfactory.c:
|
* gtk/gtkiconfactory.c:
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
Tue Jun 26 11:06:34 2001 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkclist.c gtk/gtkentry.c gtk/gtkspinbutton.c:
|
||||||
|
Use new pango_context_get_metrics() to fix problems
|
||||||
|
with font lists in descriptions. (#56184, reported by
|
||||||
|
Jonas Borgström)
|
||||||
|
|
||||||
Tue Jun 26 10:04:30 2001 Tim Janik <timj@gtk.org>
|
Tue Jun 26 10:04:30 2001 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gtk/gtkiconfactory.c:
|
* gtk/gtkiconfactory.c:
|
||||||
|
@ -3026,14 +3026,12 @@ gtk_clist_set_row_height (GtkCList *clist,
|
|||||||
{
|
{
|
||||||
PangoContext *context = gtk_widget_get_pango_context (widget);
|
PangoContext *context = gtk_widget_get_pango_context (widget);
|
||||||
PangoFontMetrics metrics;
|
PangoFontMetrics metrics;
|
||||||
PangoFont *font = pango_context_load_font (context, widget->style->font_desc);
|
|
||||||
|
|
||||||
pango_font_get_metrics (font,
|
pango_context_get_metrics (context,
|
||||||
|
widget->style->font_desc,
|
||||||
pango_context_get_language (context),
|
pango_context_get_language (context),
|
||||||
&metrics);
|
&metrics);
|
||||||
|
|
||||||
g_object_unref (G_OBJECT (font));
|
|
||||||
|
|
||||||
if (!GTK_CLIST_ROW_HEIGHT_SET(clist))
|
if (!GTK_CLIST_ROW_HEIGHT_SET(clist))
|
||||||
clist->row_height = PANGO_PIXELS (metrics.ascent + metrics.descent);
|
clist->row_height = PANGO_PIXELS (metrics.ascent + metrics.descent);
|
||||||
}
|
}
|
||||||
|
@ -1035,7 +1035,6 @@ gtk_entry_size_request (GtkWidget *widget,
|
|||||||
{
|
{
|
||||||
GtkEntry *entry;
|
GtkEntry *entry;
|
||||||
PangoFontMetrics metrics;
|
PangoFontMetrics metrics;
|
||||||
PangoFont *font;
|
|
||||||
gint xborder, yborder;
|
gint xborder, yborder;
|
||||||
PangoContext *context;
|
PangoContext *context;
|
||||||
|
|
||||||
@ -1045,16 +1044,12 @@ gtk_entry_size_request (GtkWidget *widget,
|
|||||||
|
|
||||||
entry = GTK_ENTRY (widget);
|
entry = GTK_ENTRY (widget);
|
||||||
|
|
||||||
/* hackish for now, get metrics
|
|
||||||
*/
|
|
||||||
context = gtk_widget_get_pango_context (widget);
|
context = gtk_widget_get_pango_context (widget);
|
||||||
font = pango_context_load_font (context, widget->style->font_desc);
|
pango_context_get_metrics (context,
|
||||||
pango_font_get_metrics (font,
|
widget->style->font_desc,
|
||||||
pango_context_get_language (context),
|
pango_context_get_language (context),
|
||||||
&metrics);
|
&metrics);
|
||||||
|
|
||||||
g_object_unref (G_OBJECT (font));
|
|
||||||
|
|
||||||
entry->ascent = metrics.ascent;
|
entry->ascent = metrics.ascent;
|
||||||
entry->descent = metrics.descent;
|
entry->descent = metrics.descent;
|
||||||
|
|
||||||
|
@ -569,18 +569,15 @@ gtk_spin_button_size_request (GtkWidget *widget,
|
|||||||
{
|
{
|
||||||
PangoContext *context;
|
PangoContext *context;
|
||||||
PangoFontMetrics metrics;
|
PangoFontMetrics metrics;
|
||||||
PangoFont *font;
|
|
||||||
gint width;
|
gint width;
|
||||||
gint w;
|
gint w;
|
||||||
int string_len;
|
int string_len;
|
||||||
|
|
||||||
context = gtk_widget_get_pango_context (widget);
|
context = gtk_widget_get_pango_context (widget);
|
||||||
font = pango_context_load_font (context,
|
pango_context_get_metrics (context,
|
||||||
widget->style->font_desc);
|
widget->style->font_desc,
|
||||||
pango_font_get_metrics (font,
|
|
||||||
pango_context_get_language (context),
|
pango_context_get_language (context),
|
||||||
&metrics);
|
&metrics);
|
||||||
g_object_unref (G_OBJECT (font));
|
|
||||||
|
|
||||||
/* Get max of MIN_SPIN_BUTTON_WIDTH, size of upper, size of lower */
|
/* Get max of MIN_SPIN_BUTTON_WIDTH, size of upper, size of lower */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user