Add inlinepixbufs.h so that it gets generated.
2001-09-21 Alex Graveley <alex@ximian.com> * src/Makefile.am (metacity_SOURCES): Add inlinepixbufs.h so that it gets generated. * src/frames.c (meta_frames_style_set): Update for new opaque PangoFontMetrics.
This commit is contained in:
parent
dad1b107f5
commit
38a878171a
@ -1,3 +1,11 @@
|
|||||||
|
2001-09-21 Alex Graveley <alex@ximian.com>
|
||||||
|
|
||||||
|
* src/Makefile.am (metacity_SOURCES): Add inlinepixbufs.h so
|
||||||
|
that it gets generated.
|
||||||
|
|
||||||
|
* src/frames.c (meta_frames_style_set): Update for new opaque
|
||||||
|
PangoFontMetrics.
|
||||||
|
|
||||||
2001-09-17 Havoc Pennington <hp@pobox.com>
|
2001-09-17 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
* src/ui.c (meta_ui_init): add hackaround for the warning about
|
* src/ui.c (meta_ui_init): add hackaround for the warning about
|
||||||
|
@ -21,6 +21,7 @@ metacity_SOURCES= \
|
|||||||
frame.h \
|
frame.h \
|
||||||
frames.c \
|
frames.c \
|
||||||
frames.h \
|
frames.h \
|
||||||
|
inlinepixbufs.h \
|
||||||
keybindings.c \
|
keybindings.c \
|
||||||
keybindings.h \
|
keybindings.h \
|
||||||
main.c \
|
main.c \
|
||||||
|
10
src/frames.c
10
src/frames.c
@ -458,18 +458,22 @@ meta_frames_style_set (GtkWidget *widget,
|
|||||||
*(frames->props) = props;
|
*(frames->props) = props;
|
||||||
|
|
||||||
{
|
{
|
||||||
PangoFontMetrics metrics;
|
PangoFontMetrics *metrics;
|
||||||
PangoFont *font;
|
PangoFont *font;
|
||||||
PangoLanguage *lang;
|
PangoLanguage *lang;
|
||||||
|
|
||||||
font = pango_context_load_font (gtk_widget_get_pango_context (widget),
|
font = pango_context_load_font (gtk_widget_get_pango_context (widget),
|
||||||
widget->style->font_desc);
|
widget->style->font_desc);
|
||||||
lang = pango_context_get_language (gtk_widget_get_pango_context (widget));
|
lang = pango_context_get_language (gtk_widget_get_pango_context (widget));
|
||||||
pango_font_get_metrics (font, lang, &metrics);
|
metrics = pango_font_get_metrics (font, lang);
|
||||||
|
|
||||||
g_object_unref (G_OBJECT (font));
|
g_object_unref (G_OBJECT (font));
|
||||||
|
|
||||||
frames->text_height = PANGO_PIXELS (metrics.ascent + metrics.descent);
|
frames->text_height =
|
||||||
|
PANGO_PIXELS (pango_font_metrics_get_ascent (metrics) +
|
||||||
|
pango_font_metrics_get_descent (metrics));
|
||||||
|
|
||||||
|
pango_font_metrics_unref (metrics);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Queue a draw/resize on all frames */
|
/* Queue a draw/resize on all frames */
|
||||||
|
Loading…
Reference in New Issue
Block a user