forked from AuroraMiddleware/gtk
Don't pass NULL to pango_context_get_metrics. Use
2005-01-09 Anders Carlsson <andersca@gnome.org> * gtk/gtkcellrenderertext.c: (get_size): * gtk/gtklabel.c: (gtk_label_size_request): * gtk/gtkprogressbar.c: (gtk_progress_bar_size_request): Don't pass NULL to pango_context_get_metrics. Use pango_context_get_language instead, which is way faster.
This commit is contained in:
parent
f589509f72
commit
b1167d1d11
@ -1,3 +1,11 @@
|
|||||||
|
2005-01-09 Anders Carlsson <andersca@gnome.org>
|
||||||
|
|
||||||
|
* gtk/gtkcellrenderertext.c: (get_size):
|
||||||
|
* gtk/gtklabel.c: (gtk_label_size_request):
|
||||||
|
* gtk/gtkprogressbar.c: (gtk_progress_bar_size_request):
|
||||||
|
Don't pass NULL to pango_context_get_metrics. Use
|
||||||
|
pango_context_get_language instead, which is way faster.
|
||||||
|
|
||||||
2005-01-08 Matthias Clasen <mclasen@redhat.com>
|
2005-01-08 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* configure.in: Bump version
|
* configure.in: Bump version
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
2005-01-09 Anders Carlsson <andersca@gnome.org>
|
||||||
|
|
||||||
|
* gtk/gtkcellrenderertext.c: (get_size):
|
||||||
|
* gtk/gtklabel.c: (gtk_label_size_request):
|
||||||
|
* gtk/gtkprogressbar.c: (gtk_progress_bar_size_request):
|
||||||
|
Don't pass NULL to pango_context_get_metrics. Use
|
||||||
|
pango_context_get_language instead, which is way faster.
|
||||||
|
|
||||||
2005-01-08 Matthias Clasen <mclasen@redhat.com>
|
2005-01-08 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* configure.in: Bump version
|
* configure.in: Bump version
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
2005-01-09 Anders Carlsson <andersca@gnome.org>
|
||||||
|
|
||||||
|
* gtk/gtkcellrenderertext.c: (get_size):
|
||||||
|
* gtk/gtklabel.c: (gtk_label_size_request):
|
||||||
|
* gtk/gtkprogressbar.c: (gtk_progress_bar_size_request):
|
||||||
|
Don't pass NULL to pango_context_get_metrics. Use
|
||||||
|
pango_context_get_language instead, which is way faster.
|
||||||
|
|
||||||
2005-01-08 Matthias Clasen <mclasen@redhat.com>
|
2005-01-08 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* configure.in: Bump version
|
* configure.in: Bump version
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
2005-01-09 Anders Carlsson <andersca@gnome.org>
|
||||||
|
|
||||||
|
* gtk/gtkcellrenderertext.c: (get_size):
|
||||||
|
* gtk/gtklabel.c: (gtk_label_size_request):
|
||||||
|
* gtk/gtkprogressbar.c: (gtk_progress_bar_size_request):
|
||||||
|
Don't pass NULL to pango_context_get_metrics. Use
|
||||||
|
pango_context_get_language instead, which is way faster.
|
||||||
|
|
||||||
2005-01-08 Matthias Clasen <mclasen@redhat.com>
|
2005-01-08 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* configure.in: Bump version
|
* configure.in: Bump version
|
||||||
|
@ -1436,7 +1436,7 @@ get_size (GtkCellRenderer *cell,
|
|||||||
gint char_width;
|
gint char_width;
|
||||||
|
|
||||||
context = pango_layout_get_context (layout);
|
context = pango_layout_get_context (layout);
|
||||||
metrics = pango_context_get_metrics (context, widget->style->font_desc, NULL);
|
metrics = pango_context_get_metrics (context, widget->style->font_desc, pango_context_get_language (context));
|
||||||
|
|
||||||
char_width = pango_font_metrics_get_approximate_char_width (metrics);
|
char_width = pango_font_metrics_get_approximate_char_width (metrics);
|
||||||
pango_font_metrics_unref (metrics);
|
pango_font_metrics_unref (metrics);
|
||||||
|
@ -2024,7 +2024,8 @@ gtk_label_size_request (GtkWidget *widget,
|
|||||||
gint char_width, digit_width, char_pixels, w;
|
gint char_width, digit_width, char_pixels, w;
|
||||||
|
|
||||||
context = pango_layout_get_context (label->layout);
|
context = pango_layout_get_context (label->layout);
|
||||||
metrics = pango_context_get_metrics (context, widget->style->font_desc, NULL);
|
metrics = pango_context_get_metrics (context, widget->style->font_desc,
|
||||||
|
pango_context_get_language (context));
|
||||||
|
|
||||||
char_width = pango_font_metrics_get_approximate_char_width (metrics);
|
char_width = pango_font_metrics_get_approximate_char_width (metrics);
|
||||||
digit_width = pango_font_metrics_get_approximate_digit_width (metrics);
|
digit_width = pango_font_metrics_get_approximate_digit_width (metrics);
|
||||||
|
@ -523,7 +523,7 @@ gtk_progress_bar_size_request (GtkWidget *widget,
|
|||||||
|
|
||||||
/* The minimum size for ellipsized text is ~ 3 chars */
|
/* The minimum size for ellipsized text is ~ 3 chars */
|
||||||
context = pango_layout_get_context (layout);
|
context = pango_layout_get_context (layout);
|
||||||
metrics = pango_context_get_metrics (context, widget->style->font_desc, NULL);
|
metrics = pango_context_get_metrics (context, widget->style->font_desc, pango_context_get_language (context));
|
||||||
|
|
||||||
char_width = pango_font_metrics_get_approximate_char_width (metrics);
|
char_width = pango_font_metrics_get_approximate_char_width (metrics);
|
||||||
pango_font_metrics_unref (metrics);
|
pango_font_metrics_unref (metrics);
|
||||||
|
Loading…
Reference in New Issue
Block a user