--- kdelibs-3.4.2/kdefx/kstyle.cpp.theme_by_distro 2005-05-23 14:15:42.000000000 +0200 +++ kdelibs-3.4.2/kdefx/kstyle.cpp 2005-09-07 15:22:46.000000000 +0200 @@ -28,7 +28,7 @@ #endif #include "kstyle.h" - +#include <qfile.h> #include <qapplication.h> #include <qbitmap.h> #include <qcleanuphandler.h> @@ -50,7 +50,6 @@ #include <kpixmap.h> #include <kpixmapeffect.h> #include <kimageeffect.h> - #ifdef Q_WS_X11 # include <X11/Xlib.h> # ifdef HAVE_XRENDER @@ -186,7 +185,7 @@ KStyle::KStyle( KStyleFlags flags, KStyl d->etchDisabledText = settings.readBoolEntry("/KStyle/Settings/EtchDisabledText", true); d->menuAltKeyNavigation = settings.readBoolEntry("/KStyle/Settings/MenuAltKeyNavigation", true); d->scrollablePopupmenus = settings.readBoolEntry("/KStyle/Settings/ScrollablePopupMenus", false); - d->menuDropShadow = settings.readBoolEntry("/KStyle/Settings/MenuDropShadow", false); + d->menuDropShadow = settings.readBoolEntry("/KStyle/Settings/MenuDropShadow", true); d->menuHandler = NULL; if (useMenuTransparency) { @@ -237,8 +236,38 @@ KStyle::~KStyle() QString KStyle::defaultStyle() { + bool disco = false; + QFile file( "/etc/sysconfig/system" ); + if( file.exists()) + { + if ( file.open( IO_ReadOnly ) ) { + QTextStream stream( &file ); + QString line; + while ( !stream.atEnd() ) + { + line = stream.readLine(); // line of text excluding '\n' + if( line.contains("META_CLASS=PowerPack")!=0) + { + break; + } + else if( line.contains("META_CLASS=desktop")!=0) + { + disco = true; + break; + } + else if( line.contains("META_CLASS=server")!=0) + { + break; + } + } + file.close(); + } + } if (QPixmap::defaultDepth() > 8) - return QString("plastik"); + if( disco ) + return QString("plastik"); + else + return QString("galaxy"); else return QString("light, 3rd revision"); }