[epiphany] ephy-toolbar: Do not hardcode title style of a web-app
- From: Yosef Or Boczko <yoseforb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] ephy-toolbar: Do not hardcode title style of a web-app
- Date: Sun, 1 Sep 2013 22:38:57 +0000 (UTC)
commit c7fd65d7534b600cc135a5b680973b4ea80eb09d
Author: Yosef Or Boczko <yoseforb gmail com>
Date: Mon Sep 2 01:37:39 2013 +0300
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
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 8a8b190..01a3f1c 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]