From 3e4fd788cc7a0235d8d16048d95accce395cdc2b Mon Sep 17 00:00:00 2001 From: monsta Date: Mon, 4 Jul 2016 16:59:47 +0300 Subject: appearance: make theme name centered in GTK+3 too --- capplets/appearance/appearance-themes.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'capplets/appearance') 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); -- cgit v1.2.1