summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-11-02 08:38:20 -0500
committerMatthias Clasen <mclasen@redhat.com>2020-11-02 08:38:20 -0500
commit14cbd13ef2c7982dcc41c703506298e4d0b8013f (patch)
tree73e1274132ac911b2ea9597e30cc5f442b4fa444
parentefc314196d639a6216add81b440495a556f2183e (diff)
downloadgtk+-14cbd13ef2c7982dcc41c703506298e4d0b8013f.tar.gz
gtk-demo: Use typographic style classes
We don't need to hardcode <u> in markup anymore. Use the heading style class instead.
-rw-r--r--demos/gtk-demo/drawingarea.c10
-rw-r--r--demos/gtk-demo/images.c30
2 files changed, 16 insertions, 24 deletions
diff --git a/demos/gtk-demo/drawingarea.c b/demos/gtk-demo/drawingarea.c
index 14b87f64d3..39254c67f5 100644
--- a/demos/gtk-demo/drawingarea.c
+++ b/demos/gtk-demo/drawingarea.c
@@ -325,9 +325,8 @@ do_drawingarea (GtkWidget *do_widget)
/*
* Create the groups area
*/
- label = gtk_label_new (NULL);
- gtk_label_set_markup (GTK_LABEL (label),
- "<u>Knockout groups</u>");
+ label = gtk_label_new ("Knockout groups");
+ gtk_widget_add_css_class (label, "heading");
gtk_box_append (GTK_BOX (vbox), label);
frame = gtk_frame_new (NULL);
@@ -344,9 +343,8 @@ do_drawingarea (GtkWidget *do_widget)
* Create the scribble area
*/
- label = gtk_label_new (NULL);
- gtk_label_set_markup (GTK_LABEL (label),
- "<u>Scribble area</u>");
+ label = gtk_label_new ("Scribble area");
+ gtk_widget_add_css_class (label, "heading");
gtk_box_append (GTK_BOX (vbox), label);
frame = gtk_frame_new (NULL);
diff --git a/demos/gtk-demo/images.c b/demos/gtk-demo/images.c
index 22177a7f5c..c8b8ed8fd3 100644
--- a/demos/gtk-demo/images.c
+++ b/demos/gtk-demo/images.c
@@ -346,9 +346,8 @@ do_images (GtkWidget *do_widget)
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
gtk_box_append (GTK_BOX (hbox), vbox);
- label = gtk_label_new (NULL);
- gtk_label_set_markup (GTK_LABEL (label),
- "<u>Image loaded from a file</u>");
+ label = gtk_label_new ("Image loaded from a file");
+ gtk_widget_add_css_class (label, "heading");
gtk_box_append (GTK_BOX (vbox), label);
frame = gtk_frame_new (NULL);
@@ -364,9 +363,8 @@ do_images (GtkWidget *do_widget)
/* Animation */
- label = gtk_label_new (NULL);
- gtk_label_set_markup (GTK_LABEL (label),
- "<u>Animation loaded from a file</u>");
+ label = gtk_label_new ("Animation loaded from a file");
+ gtk_widget_add_css_class (label, "heading");
gtk_box_append (GTK_BOX (vbox), label);
frame = gtk_frame_new (NULL);
@@ -380,9 +378,8 @@ do_images (GtkWidget *do_widget)
/* Symbolic icon */
- label = gtk_label_new (NULL);
- gtk_label_set_markup (GTK_LABEL (label),
- "<u>Symbolic themed icon</u>");
+ label = gtk_label_new ("Symbolic themed icon");
+ gtk_widget_add_css_class (label, "heading");
gtk_box_append (GTK_BOX (vbox), label);
frame = gtk_frame_new (NULL);
@@ -401,9 +398,8 @@ do_images (GtkWidget *do_widget)
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
gtk_box_append (GTK_BOX (hbox), vbox);
- label = gtk_label_new (NULL);
- gtk_label_set_markup (GTK_LABEL (label),
- "<u>Progressive image loading</u>");
+ label = gtk_label_new ("Progressive image loading");
+ gtk_widget_add_css_class (label, "heading");
gtk_box_append (GTK_BOX (vbox), label);
frame = gtk_frame_new (NULL);
@@ -424,9 +420,8 @@ do_images (GtkWidget *do_widget)
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
gtk_box_append (GTK_BOX (hbox), vbox);
- label = gtk_label_new (NULL);
- gtk_label_set_markup (GTK_LABEL (label),
- "<u>Displaying video</u>");
+ label = gtk_label_new ("Displaying video");
+ gtk_widget_add_css_class (label, "heading");
gtk_box_append (GTK_BOX (vbox), label);
frame = gtk_frame_new (NULL);
@@ -442,9 +437,8 @@ do_images (GtkWidget *do_widget)
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
gtk_box_append (GTK_BOX (hbox), vbox);
- label = gtk_label_new (NULL);
- gtk_label_set_markup (GTK_LABEL (label),
- "<u>GtkWidgetPaintable</u>");
+ label = gtk_label_new ("GtkWidgetPaintable");
+ gtk_widget_add_css_class (label, "heading");
gtk_box_append (GTK_BOX (vbox), label);
paintable = gtk_widget_paintable_new (do_widget);