[gnome-control-center/wip/every-detail-matters-round1] power: Scale row subtitles to 0.9
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/every-detail-matters-round1] power: Scale row subtitles to 0.9
- Date: Mon, 10 Jun 2019 20:09:22 +0000 (UTC)
commit d5079f38ebaf1c7ad7b0c15a1168d6e368ecc1b7
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Mon Jun 10 16:26:21 2019 -0300
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
panels/power/cc-power-panel.c | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/panels/power/cc-power-panel.c b/panels/power/cc-power-panel.c
index 5a70ed9e1..facbb7435 100644
--- a/panels/power/cc-power-panel.c
+++ b/panels/power/cc-power-panel.c
@@ -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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]