[mutter/wip/cb2eb3: 44/55] preview-widget: Don't override settings for the pango layout
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/cb2eb3: 44/55] preview-widget: Don't override settings for the pango layout
- Date: Wed, 1 Oct 2014 15:51:07 +0000 (UTC)
commit f80a5d892f5fe1c15234d5556da35123be4d8680
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri May 4 13:30:25 2012 -0400
preview-widget: Don't override settings for the pango layout
This is now in CSS. Remove the now unused meta_gtk_widget_get_font_desc
as well.
src/ui/preview-widget.c | 34 ++--------------------------------
src/ui/theme-private.h | 7 -------
src/ui/theme.c | 22 ----------------------
3 files changed, 2 insertions(+), 61 deletions(-)
---
diff --git a/src/ui/preview-widget.c b/src/ui/preview-widget.c
index 2fdc487..5747f94 100644
--- a/src/ui/preview-widget.c
+++ b/src/ui/preview-widget.c
@@ -128,38 +128,8 @@ ensure_info (MetaPreview *preview)
widget = GTK_WIDGET (preview);
if (preview->layout == NULL)
- {
- PangoFontDescription *font_desc;
- double scale;
- PangoAttrList *attrs;
- PangoAttribute *attr;
-
- if (preview->theme)
- scale = meta_theme_get_title_scale (preview->theme,
- preview->type,
- preview->flags);
- else
- scale = 1.0;
-
- preview->layout = gtk_widget_create_pango_layout (widget,
- preview->title);
-
- font_desc = meta_gtk_widget_get_font_desc (widget, scale, NULL);
-
- attrs = pango_attr_list_new ();
-
- attr = pango_attr_size_new (pango_font_description_get_size (font_desc));
- attr->start_index = 0;
- attr->end_index = G_MAXINT;
-
- pango_attr_list_insert (attrs, attr);
-
- pango_layout_set_attributes (preview->layout, attrs);
-
- pango_attr_list_unref (attrs);
-
- pango_font_description_free (font_desc);
- }
+ preview->layout = gtk_widget_create_pango_layout (widget,
+ preview->title);
if (!preview->borders_cached)
{
diff --git a/src/ui/theme-private.h b/src/ui/theme-private.h
index f87625e..2e276a7 100644
--- a/src/ui/theme-private.h
+++ b/src/ui/theme-private.h
@@ -1104,13 +1104,6 @@ gboolean meta_theme_replace_constants (MetaTheme *theme,
int n_tokens,
GError **err);
-/* random stuff */
-
-PangoFontDescription* meta_gtk_widget_get_font_desc (GtkWidget *widget,
- double scale,
- const PangoFontDescription *override);
-
-
/* Enum converters */
MetaGtkColorComponent meta_color_component_from_string (const char *str);
const char* meta_color_component_to_string (MetaGtkColorComponent component);
diff --git a/src/ui/theme.c b/src/ui/theme.c
index f8f15d6..7c886b0 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -5431,28 +5431,6 @@ meta_theme_lookup_color_constant (MetaTheme *theme,
}
-PangoFontDescription*
-meta_gtk_widget_get_font_desc (GtkWidget *widget,
- double scale,
- const PangoFontDescription *override)
-{
- GtkStyleContext *style;
- PangoFontDescription *font_desc;
-
- g_return_val_if_fail (gtk_widget_get_realized (widget), NULL);
-
- style = gtk_widget_get_style_context (widget);
- font_desc = pango_font_description_copy (gtk_style_context_get_font (style, 0));
-
- if (override)
- pango_font_description_merge (font_desc, override, TRUE);
-
- pango_font_description_set_size (font_desc,
- MAX (pango_font_description_get_size (font_desc) * scale, 1));
-
- return font_desc;
-}
-
MetaGtkColorComponent
meta_color_component_from_string (const char *str)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]