power: Scale row subtitles to 0.9
This matches what the Mouse & Touchpad panel do, and fixes a small inconsistency with the panel. Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/issues/553
This commit is contained in:
parent
9b41718e4b
commit
be5d6bfba1
1 changed files with 7 additions and 0 deletions
|
@ -219,6 +219,7 @@ row_title_new (const gchar *title,
|
|||
const gchar *subtitle,
|
||||
GtkWidget **title_label)
|
||||
{
|
||||
PangoAttrList *attributes;
|
||||
GtkWidget *box, *label;
|
||||
|
||||
box = (GtkWidget *) g_object_new (GTK_TYPE_BOX,
|
||||
|
@ -245,6 +246,9 @@ row_title_new (const gchar *title,
|
|||
if (subtitle == NULL)
|
||||
return box;
|
||||
|
||||
attributes = pango_attr_list_new ();
|
||||
pango_attr_list_insert (attributes, pango_attr_scale_new (0.9));
|
||||
|
||||
label = (GtkWidget *) g_object_new (GTK_TYPE_LABEL,
|
||||
"ellipsize", PANGO_ELLIPSIZE_END,
|
||||
"halign", GTK_ALIGN_START,
|
||||
|
@ -253,11 +257,14 @@ row_title_new (const gchar *title,
|
|||
"use-underline", TRUE,
|
||||
"visible", TRUE,
|
||||
"xalign", 0.0,
|
||||
"attributes", attributes,
|
||||
NULL);
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (label),
|
||||
GTK_STYLE_CLASS_DIM_LABEL);
|
||||
gtk_container_add (GTK_CONTAINER (box), label);
|
||||
|
||||
pango_attr_list_unref (attributes);
|
||||
|
||||
return box;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue