Backed out changeset 0f052f1a6a05 (bug 1272332)

This commit is contained in:
Dão Gottwald 2016-07-28 08:35:17 +02:00
Родитель 82923f20db
Коммит e08989c77b
2 изменённых файлов: 9 добавлений и 15 удалений

Просмотреть файл

@ -4569,7 +4569,6 @@ pref("gfx.apitrace.enabled",false);
pref("gfx.content.use-native-pushlayer", true);
#ifdef MOZ_WIDGET_GTK
pref("gfx.xrender.enabled",false);
pref("widget.allow-gtk-dark-theme", false);
#endif
#endif

Просмотреть файл

@ -1098,21 +1098,16 @@ nsLookAndFeel::Init()
// with wrong color theme, see Bug 972382
GtkSettings *settings = gtk_settings_get_for_screen(gdk_screen_get_default());
// Disable dark theme because it interacts poorly with widget styling in
// web content (see bug 1216658).
// To avoid triggering reload of theme settings unnecessarily, only set the
// setting when necessary.
const gchar* dark_setting = "gtk-application-prefer-dark-theme";
gboolean dark;
g_object_get(settings, dark_setting, &dark, nullptr);
bool allowDarkTheme = mozilla::Preferences::GetBool("widget.allow-gtk-dark-theme", false);
if (!allowDarkTheme) {
// Disable dark theme because it interacts poorly with widget styling in
// web content (see bug 1216658).
// To avoid triggering reload of theme settings unnecessarily, only set the
// setting when necessary.
const gchar* dark_setting = "gtk-application-prefer-dark-theme";
gboolean dark;
g_object_get(settings, dark_setting, &dark, nullptr);
if (dark) {
g_object_set(settings, dark_setting, FALSE, nullptr);
}
if (dark) {
g_object_set(settings, dark_setting, FALSE, nullptr);
}
GtkWidgetPath *path = gtk_widget_path_new();