summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-07-04 16:59:47 +0300
committermonsta <[email protected]>2016-07-04 17:01:21 +0300
commit3e4fd788cc7a0235d8d16048d95accce395cdc2b (patch)
treed481087cba9428e4d3d0d3250e7326ee97d2a28e
parentfbcfba29916477147da606eaf1064460b7f1976a (diff)
downloadmate-control-center-3e4fd788cc7a0235d8d16048d95accce395cdc2b.tar.bz2
mate-control-center-3e4fd788cc7a0235d8d16048d95accce395cdc2b.tar.xz
appearance: make theme name centered in GTK+3 too
-rw-r--r--capplets/appearance/appearance-themes.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/capplets/appearance/appearance-themes.c b/capplets/appearance/appearance-themes.c
index 65058610..9f8d35be 100644
--- a/capplets/appearance/appearance-themes.c
+++ b/capplets/appearance/appearance-themes.c
@@ -1073,7 +1073,20 @@ void themes_init(AppearanceData* data)
"wrap-mode", PANGO_WRAP_WORD_CHAR,
"wrap-width", gtk_icon_view_get_item_width (icon_view),
"width", gtk_icon_view_get_item_width (icon_view),
+#if GTK_CHECK_VERSION (3, 0, 0)
+ /* The xalign property should be 0.5 here, but due to a bug
+ * which was never fixed in GTK+2, it was set to 0.0.
+ * In GTK+3 the bug is fixed, so this workaround causes
+ * theme name to be left-aligned instead of being centered.
+ * So set it to 0.5 for GTK+3.
+ *
+ * The fix was applied in
+ * https://git.gnome.org/browse/gtk+/commit?id=09bf05b
+ */
+ "xalign", 0.5, "yalign", 0.0, NULL);
+#else
"xalign", 0.0, "yalign", 0.0, NULL);
+#endif
gtk_cell_layout_pack_end (GTK_CELL_LAYOUT (icon_view), renderer, FALSE);
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (icon_view), renderer,
"markup", COL_LABEL, NULL);