[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: style, color and font changes: now or after RC1/beta2?
From:       Maks Orlovich <mo002j () mail ! rochester ! edu>
Date:       2002-01-28 1:40:23
[Download RAW message or body]

On Saturday 26 January 2002 09:23 am, Aaron J. Seigo wrote:
> hi...
>
> i understand that CVS is to be tagged on monday for an RC/beta ... i have a
> patch for kapplication that i posted earlier that makes it listen to the Qt
> style/color/font change msgs instead of the KIPC one... the changes are
> minimal ... i've been using them for a while now and it works rather
> nicely...
>
> unfortunately, for these changes to work as expected w/kcontrol the font,
> colour and style kcms need to be updated. the style kcm already has been
> updated in CVS (and continues to be worked on), but the font and colour
> kcms have yet to be touched...

Hmm, how about just using the bits that apply to style only, as in the 
attached subset of your patch?

Thanks,
Maks Orlovich



["kapp.diff" (text/x-diff)]

Index: kapplication.cpp
===================================================================
RCS file: /home/kde/kdelibs/kdecore/kapplication.cpp,v
retrieving revision 1.505
diff -u -3 -p -r1.505 kapplication.cpp
--- kapplication.cpp	2002/01/26 19:29:55	1.505
+++ kapplication.cpp	2002/01/28 01:31:37
@@ -696,7 +696,7 @@ void KApplication::init(bool GUIenabled)
   if( KProcessController::theKProcessController == 0 )
       (void) new KProcessController();
   
-  QApplication::setDesktopSettingsAware( false );
+  QApplication::setDesktopSettingsAware( true );
 
   KApp = this;
 
@@ -739,7 +739,6 @@ void KApplication::init(bool GUIenabled)
         }
 
     }
-    kdisplaySetStyle();
     kdisplaySetFont();
 //    kdisplaySetPalette(); done by kdisplaySetStyle
     propagateSettings(SETTINGS_QT);
@@ -1446,7 +1445,6 @@ bool KApplication::x11EventFilter( XEven
             switch (id)
             {
             case KIPC::StyleChanged:
-                KGlobal::config()->reparseConfiguration();
                 kdisplaySetStyle();
                 break;
 
@@ -1535,36 +1533,8 @@ void KApplication::disableStyles()
 
 void KApplication::applyGUIStyle()
 {
-    if ( !useStyles ) return;
-
-    KSimpleConfig pConfig(d->styleFile , true );
-    QString oldGroup = pConfig.group();
-    pConfig.setGroup("KDE");
-    QString styleStr = pConfig.readEntry("WidgetStyle",
-                                          QPixmap::defaultDepth() > 8 ? "HighColor" : "Default");
-
-#if 0
-    // default style is not yet ported - currently looking into it
-    if(styleStr == "Default"){
-        pKStyle = new KDEStyle;
-        setStyle(pKStyle);
-        styleHandle=0;
-    }
-    else
-#endif
-        if(styleStr == "Windows 95"){
-        setStyle("Windows");
-    }
-    else if(styleStr == "Qt SGI"){
-        setStyle("SGI");
-    }
-    else {
-        QStyle* sp = QStyleFactory::create( styleStr );
-	if ( !sp )
-	    sp = QStyleFactory::create( *(QStyleFactory::keys().begin()) );
-        setStyle(sp);
-    }
-
+    if (useStyles)
+        QApplication::x11_apply_settings();
     // Reread palette from config file.
     kdisplaySetPalette();
 }
@@ -1729,30 +1699,11 @@ void KApplication::propagateSettings(Set
     KConfigBase* config = KGlobal::config();
     KConfigGroupSaver saver( config, "KDE" );
 
-    int num = config->readNumEntry("CursorBlinkRate", QApplication::cursorFlashTime());
-    if (num < 200)
-        num = 200;
-    if (num > 2000)
-        num = 2000;
-    QApplication::setCursorFlashTime(num);
-    num = config->readNumEntry("DoubleClickInterval", QApplication::doubleClickInterval());
-    QApplication::setDoubleClickInterval(num);
-    num = config->readNumEntry("StartDragTime", QApplication::startDragTime());
+    int num = config->readNumEntry("StartDragTime", QApplication::startDragTime());
     QApplication::setStartDragTime(num);
     num = config->readNumEntry("StartDragDist", QApplication::startDragDistance());
     QApplication::setStartDragDistance(num);
-    num = config->readNumEntry("WheelScrollLines", QApplication::wheelScrollLines());
-    QApplication::setWheelScrollLines(num);
-
-    bool b = config->readBoolEntry("EffectAnimateMenu", false);
-    QApplication::setEffectEnabled( Qt::UI_AnimateMenu, b);
-    b = config->readBoolEntry("EffectFadeMenu", false);
-    QApplication::setEffectEnabled( Qt::UI_FadeMenu, b);
-    b = config->readBoolEntry("EffectAnimateCombo", false);
-    QApplication::setEffectEnabled( Qt::UI_AnimateCombo, b);
-    b = config->readBoolEntry("EffectAnimateTooltip", false);
-    QApplication::setEffectEnabled( Qt::UI_AnimateTooltip, b);
-    b = config->readBoolEntry("EffectFadeTooltip", false);
+    bool b = config->readBoolEntry("EffectFadeTooltip", false);
     QApplication::setEffectEnabled( Qt::UI_FadeTooltip, b);
     if(config->readBoolEntry("EffectNoTooltip", false))
         QToolTip::setGloballyEnabled(false);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic