diff options
author | Yosef Or Boczko <yoseforb@gmail.com> | 2013-09-02 06:37:39 +0800 |
---|---|---|
committer | Yosef Or Boczko <yoseforb@gmail.com> | 2013-09-02 06:37:39 +0800 |
commit | c7fd65d7534b600cc135a5b680973b4ea80eb09d (patch) | |
tree | 443436eef7ade6675afe7195f732ce327d62dd7a | |
parent | 8b9bfed919c6e105d40e5cd730469fa550281e5e (diff) | |
download | gsoc2013-epiphany-c7fd65d7534b600cc135a5b680973b4ea80eb09d.tar gsoc2013-epiphany-c7fd65d7534b600cc135a5b680973b4ea80eb09d.tar.gz gsoc2013-epiphany-c7fd65d7534b600cc135a5b680973b4ea80eb09d.tar.bz2 gsoc2013-epiphany-c7fd65d7534b600cc135a5b680973b4ea80eb09d.tar.lz gsoc2013-epiphany-c7fd65d7534b600cc135a5b680973b4ea80eb09d.tar.xz gsoc2013-epiphany-c7fd65d7534b600cc135a5b680973b4ea80eb09d.tar.zst gsoc2013-epiphany-c7fd65d7534b600cc135a5b680973b4ea80eb09d.zip |
ephy-toolbar: Do not hardcode title style of a web-app
Let the css theme define the title style.
https://bugzilla.gnome.org/show_bug.cgi?id=707246
-rw-r--r-- | src/ephy-toolbar.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/src/ephy-toolbar.c b/src/ephy-toolbar.c index 8a8b190ab..01a3f1c89 100644 --- a/src/ephy-toolbar.c +++ b/src/ephy-toolbar.c @@ -87,26 +87,13 @@ close_button_clicked (GtkButton *button, gpointer data) } static void -smallify_boldify_label (GtkWidget *label) -{ - PangoAttrList *attrs; - - attrs = pango_attr_list_new (); - pango_attr_list_insert (attrs, pango_attr_scale_new (PANGO_SCALE_MEDIUM)); - pango_attr_list_insert (attrs, pango_attr_weight_new (PANGO_WEIGHT_BOLD)); - gtk_label_set_attributes (GTK_LABEL (label), attrs); - pango_attr_list_unref (attrs); - - gtk_style_context_add_class (gtk_widget_get_style_context (label), GTK_STYLE_CLASS_DIM_LABEL); -} - -static void ephy_toolbar_constructed (GObject *object) { EphyToolbarPrivate *priv = EPHY_TOOLBAR (object)->priv; GtkActionGroup *action_group; GtkAction *action; GtkWidget *toolbar, *box, *button, *reload, *separator, *label; + GtkStyleContext *context; GtkSizeGroup *size; EphyEmbedShellMode mode; @@ -240,8 +227,9 @@ ephy_toolbar_constructed (GObject *object) /* The title of the window in web application - need * settings of padding same the location entry. */ label = gtk_label_new (NULL); - gtk_style_context_add_class (gtk_widget_get_style_context (label), "subtitle"); - smallify_boldify_label (label); + context = gtk_widget_get_style_context (label); + gtk_style_context_add_class (context, "title"); + gtk_style_context_add_class (context, "dim-label"); gtk_label_set_line_wrap (GTK_LABEL (label), FALSE); gtk_label_set_single_line_mode (GTK_LABEL (label), TRUE); gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END); |