Commit cebc592f authored by Stepan Salenikovich's avatar Stepan Salenikovich Committed by gerrit2

welcome text: use style class instead of color

Set the style of the text we want to be a lighter color using
the "dim-label" class instead of setting the color to gray
explicitly. This will make it compatible with alternative themes
where gray might not work.

Change-Id: I63814649463fe7ed9449e09f3bac87b2832b75e7
Tuleap: #41
parent 58cfc15c
......@@ -99,14 +99,12 @@ ring_welcome_view_init(RingWelcomeView *self)
gtk_box_pack_start(GTK_BOX(self), label_welcome_text, FALSE, TRUE, 0);
/* RingID explanation */
auto explanation = g_strdup_printf("<span fgcolor=\"gray\">%s</span>",
C_("Do not translate \"RingID\"", "This is your RingID.\nCopy and share it with your friends!"));
auto label_explanation = gtk_label_new(NULL);
gtk_label_set_markup(GTK_LABEL(label_explanation), explanation);
auto label_explanation = gtk_label_new(C_("Do not translate \"RingID\"", "This is your RingID.\nCopy and share it with your friends!"));
auto context = gtk_widget_get_style_context(label_explanation);
gtk_style_context_add_class(context, GTK_STYLE_CLASS_DIM_LABEL);
gtk_label_set_justify(GTK_LABEL(label_explanation), GTK_JUSTIFY_CENTER);
gtk_label_set_selectable(GTK_LABEL(label_explanation), TRUE);
gtk_widget_set_margin_top(label_explanation, 20);
/* we migth need to hide the label if a RING account doesn't exist */
gtk_widget_set_no_show_all(label_explanation, TRUE);
gtk_box_pack_start(GTK_BOX(self), label_explanation, FALSE, TRUE, 0);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment