From 1d3c0b607f9ab017b896e32fb0a38dac7b0d7f6c Mon Sep 17 00:00:00 2001 From: "syd%netscape.com" Date: Tue, 20 Apr 1999 21:34:34 +0000 Subject: [PATCH] For Unix only (Gtk+): make the default rendering mode Gfx. The Gtk+ implementation is buggy, and we'll eventually be going in this direction anyway of using gfx to render controls. Need to take out this #ifdef eventually for Win and Mac. To enable the native widgets, edit ~/.mozilla/prefs50.js, and add the line user_pref("nglayout.widget.mode", 1);. git-svn-id: svn://10.0.0.236/trunk@28312 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/base/nsPresContext.cpp | 15 ++++++++++++++- mozilla/layout/base/src/nsPresContext.cpp | 15 ++++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/mozilla/layout/base/nsPresContext.cpp b/mozilla/layout/base/nsPresContext.cpp index 1304a9668a7..70e3ddb1d27 100644 --- a/mozilla/layout/base/nsPresContext.cpp +++ b/mozilla/layout/base/nsPresContext.cpp @@ -189,7 +189,20 @@ nsPresContext::GetUserPreferences() if (NS_OK == mPrefs->GetIntPref("nglayout.widget.mode", &prefInt)) { mWidgetRenderingMode = (enum nsWidgetRendering)prefInt; // bad cast - } + } else +#if defined XP_UNIX + // XXX for Unix only (Gtk+) -- make the default rendering mode Gfx. The + // Gtk+ implementation is buggy, and we'll eventually be going in this + // direction anyway of using gfx to render controls. Need to take out + // this #ifdef eventually for Win and Mac. + // + // To enable native widgets, edit ~/.mozilla/prefs50.js, and add the + // line user_pref("nglayout.widget.mode", 1);. Syd 4/20/99 + + mWidgetRenderingMode = eWidgetRendering_Gfx; +#else + mWidgetRenderingMode = eWidgetRendering_Native; +#endif PRBool usePrefColors = PR_TRUE; #ifdef _WIN32 diff --git a/mozilla/layout/base/src/nsPresContext.cpp b/mozilla/layout/base/src/nsPresContext.cpp index 1304a9668a7..70e3ddb1d27 100644 --- a/mozilla/layout/base/src/nsPresContext.cpp +++ b/mozilla/layout/base/src/nsPresContext.cpp @@ -189,7 +189,20 @@ nsPresContext::GetUserPreferences() if (NS_OK == mPrefs->GetIntPref("nglayout.widget.mode", &prefInt)) { mWidgetRenderingMode = (enum nsWidgetRendering)prefInt; // bad cast - } + } else +#if defined XP_UNIX + // XXX for Unix only (Gtk+) -- make the default rendering mode Gfx. The + // Gtk+ implementation is buggy, and we'll eventually be going in this + // direction anyway of using gfx to render controls. Need to take out + // this #ifdef eventually for Win and Mac. + // + // To enable native widgets, edit ~/.mozilla/prefs50.js, and add the + // line user_pref("nglayout.widget.mode", 1);. Syd 4/20/99 + + mWidgetRenderingMode = eWidgetRendering_Gfx; +#else + mWidgetRenderingMode = eWidgetRendering_Native; +#endif PRBool usePrefColors = PR_TRUE; #ifdef _WIN32