Hardcoded css style checks on GTK Theme instead of XGD_CURRENT_DESKTOP

Bug #1302077 reported by Leo Iannacone
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nautilus (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Hi all!

In nautilus : debian/patches/ubuntu_titlebar_css.patch

you have defined some style override in order to fit (if I understood correctly) nautilus in Unity window decoration.

But, instead to check if it's Unity the current window manager, you do this:

+ settings = gtk_settings_get_default();
+ g_object_get(settings, "gtk-theme-name", &theme_name, NULL);
+
+ if (g_strcmp0(theme_name, "Ambiance") == 0 || g_strcmp0(theme_name, "Radiance") == 0)

Which means: if you change theme in a Unity session, Nautilus will not override style. And also: if you use those themes in any window manager, nautilus makes the override.

You should check XDS_CURRENT_DESKTOP == 'Unity' instead to look for which Theme is in use.

Related branches

Revision history for this message
Leo Iannacone (l3on) wrote :

An this should be moved into themes:

+ css_string = "GtkButton#toolbar-button {padding: 9px;}";
+ toolbar_override_css (button, "toolbar-button", css_string);
+

description: updated
Revision history for this message
Martin Pitt (pitti) wrote :

Uploaded, thanks!

Changed in nautilus (Ubuntu):
status: New → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

Timm Lunn says this is going to cause regressions with the hicontrast theme. I reverted the merge. He said he'll follow up here to explain the details.

Changed in nautilus (Ubuntu):
status: Fix Committed → Confirmed
Revision history for this message
Tim Lunn (darkxst) wrote :

Leo this will cause regressions, particularly for users of the high contrast theme.

The overrides should be only applied to Radiance/Ambiance so you should check that in addition to XDG_CURRENT_DESKTOP.

Or if you can make the actual Radiance/Ambiance themes behave properly then this patch can be dropped. However nautilus uses a completely non-standard implementation of header bars so I didnt want to mess with that.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.