]> Dogcows Code - chaz/openbox/blobdiff - src/Screen.cc
Allow for customizing of the dropShadows.
[chaz/openbox] / src / Screen.cc
index 4d15e28bc64bf0b59dac3835ccdab07fc8665cb9..f691cf6eb9ed23bbd0885cadff815417af9f6ac2 100644 (file)
@@ -2733,6 +2733,7 @@ BFont *BScreen::readDatabaseFont(const string &rbasename,
     bool bold = False;
     bool italic = False;
     bool dropShadow = False;
+
     if (style.getValue(rbasename + "xft.flags", s)) {
       if (s.find("bold") != string::npos)
         bold = True;
@@ -2742,8 +2743,21 @@ BFont *BScreen::readDatabaseFont(const string &rbasename,
         dropShadow = True;
     }
     
+    unsigned char offset = 1;
+    if (style.getValue(rbasename + "xft.shadow.offset", s)) {
+      offset = atoi(s.c_str()); //doesn't detect errors
+      if (offset > CHAR_MAX)
+        offset = 1;
+    }
+
+    unsigned char tint = 0x40;
+    if (style.getValue(rbasename + "xft.shadow.tint", s)) {
+      tint = atoi(s.c_str());
+    }
+
+    
     BFont *b = new BFont(blackbox->getXDisplay(), this, family, i, bold,
-                         italic, dropShadow, resource.aa_fonts);
+                         italic, dropShadow, offset, tint, resource.aa_fonts);
     if (b->valid())
       return b;
     else
This page took 0.020834 seconds and 4 git commands to generate.