[gimp/wip/animation: 146/197] plug-ins: style a bit the title labels for animation levels.



commit 2f4fbfa3803de989b312796ed35c1b9e2e30e8fb
Author: Jehan <jehan girinstud io>
Date:   Mon May 29 00:40:55 2017 +0200

    plug-ins: style a bit the title labels for animation levels.

 .../widgets/animation-editable-label.c             |    5 +++++
 .../widgets/animation-editable-label.h             |    2 ++
 plug-ins/animation-play/widgets/animation-xsheet.c |   19 +++++++++++++++++++
 3 files changed, 26 insertions(+), 0 deletions(-)
---
diff --git a/plug-ins/animation-play/widgets/animation-editable-label.c 
b/plug-ins/animation-play/widgets/animation-editable-label.c
index 91efdd3..f8023bf 100644
--- a/plug-ins/animation-play/widgets/animation-editable-label.c
+++ b/plug-ins/animation-play/widgets/animation-editable-label.c
@@ -302,3 +302,8 @@ animation_editable_label_get_text (AnimationEditableLabel *label)
   return label->priv->text;
 }
 
+GtkWidget *
+animation_editable_label_get_label (AnimationEditableLabel *label)
+{
+  return label->priv->label;
+}
diff --git a/plug-ins/animation-play/widgets/animation-editable-label.h 
b/plug-ins/animation-play/widgets/animation-editable-label.h
index 630e4ef..7c4d8b9 100644
--- a/plug-ins/animation-play/widgets/animation-editable-label.h
+++ b/plug-ins/animation-play/widgets/animation-editable-label.h
@@ -59,4 +59,6 @@ void          animation_editable_label_show_icon   (AnimationEditableLabel *labe
 
 const gchar * animation_editable_label_get_text    (AnimationEditableLabel *label);
 
+GtkWidget   * animation_editable_label_get_label   (AnimationEditableLabel *label);
+
 #endif /* __ANIMATION_EDITABLE_LABEL_H__ */
diff --git a/plug-ins/animation-play/widgets/animation-xsheet.c 
b/plug-ins/animation-play/widgets/animation-xsheet.c
index 8651baa..674d950 100755
--- a/plug-ins/animation-play/widgets/animation-xsheet.c
+++ b/plug-ins/animation-play/widgets/animation-xsheet.c
@@ -462,6 +462,8 @@ animation_xsheet_add_headers (AnimationXSheet *xsheet,
                               gint             level)
 {
   const gchar    *title;
+  GtkRcStyle     *rc_style;
+  GtkWidget      *label;
   GtkWidget      *frame;
   GtkWidget      *toolbar;
   GtkWidget      *image;
@@ -486,6 +488,23 @@ animation_xsheet_add_headers (AnimationXSheet *xsheet,
                     xsheet);
   gtk_widget_show (frame);
 
+  /* Style a bit the title label. */
+  label = animation_editable_label_get_label (ANIMATION_EDITABLE_LABEL (frame));
+  rc_style = gtk_widget_get_modifier_style (label);
+
+  if (! rc_style->font_desc)
+    {
+      PangoContext         *context;
+      PangoFontDescription *font_desc;
+
+      context = gtk_widget_get_pango_context (label);
+      font_desc = pango_context_get_font_description (context);
+
+      rc_style->font_desc = pango_font_description_copy (font_desc);
+    }
+  pango_font_description_set_weight (rc_style->font_desc, PANGO_WEIGHT_BOLD);
+  gtk_widget_modify_style (label, rc_style);
+
   /* Adding a add-track [+] button. */
   toolbar = gtk_toolbar_new ();
   xsheet->priv->add_buttons = g_list_insert (xsheet->priv->add_buttons,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]