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

List:       kde-commits
Subject:    kdebase/kcontrol/krdb
From:       Craig Drummond <craig () kde ! org>
Date:       2004-04-08 23:51:45
Message-ID: 20040408235145.E62C299F5 () office ! kde ! org
[Download RAW message or body]

CVS commit by craig: 

Save Xft settings to xrdb


  M +32 -3     krdb.cpp   1.56
  M +4 -3      krdb.h   1.4


--- kdebase/kcontrol/krdb/krdb.cpp  #1.55:1.56
@@ -402,4 +402,5 @@ void runRdb( uint flags )
   bool exportQtColors   = flags & KRdbExportQtColors;
   bool exportQtSettings = flags & KRdbExportQtSettings;
+  bool exportXftSettings = flags & KRdbExportXftSettings;
 
   KConfig kglobals("kdeglobals", true, false);
@@ -481,4 +482,32 @@ void runRdb( uint flags )
     contents += "Xcursor.size: " + size + '\n';
 
+  if (exportXftSettings)
+  {
+    kglobals.setGroup("General");
+
+    QString hintStyle(kglobals.readEntry("XftHintStyle", "hintmedium")),
+            subPixel(kglobals.readEntry("XftSubPixel"));
+
+    contents += "Xft.antialias: ";
+    if(QSettings().readBoolEntry("/qt/useXft"))
+      contents += "1";
+    else
+      contents += "0";
+
+    contents += "\nXft.hinting: ";
+    if(hintStyle.isEmpty())
+      contents += "-1";
+    else
+    {
+      if(hintStyle!="hintnone")
+        contents += "1";
+      else
+        contents += "0";
+      contents += "\nXft.hintstyle: " + hintStyle + '\n';
+    }
+    if(!subPixel.isEmpty())
+      contents += "Xft.rgba: " + subPixel + '\n';
+  }
+
   if (contents.length() > 0)
     tmp.writeBlock( contents.latin1(), contents.length() );

--- kdebase/kcontrol/krdb/krdb.h  #1.3:1.4
@@ -25,5 +25,6 @@ enum KRdbAction
    KRdbExportColors     = 0x0001,   // Export colors to non-(KDE/Qt) apps
    KRdbExportQtColors   = 0x0002,   // Export KDE's colors to qtrc
-   KRdbExportQtSettings = 0x0004    // Export all possible qtrc settings, excluding colors
+   KRdbExportQtSettings  = 0x0004,   // Export all possible qtrc settings, excluding colors
+   KRdbExportXftSettings = 0x0008    // Export KDE's Xft (anti-alias) settings
 };
 


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

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