]> Dogcows Code - chaz/openbox/blobdiff - src/Screen.cc
Ignore dot files in the styles directory.
[chaz/openbox] / src / Screen.cc
index 92f04532aee72ce751efd3dff6488abb22d567d9..eb93320638f98ba4b999d2994043b562646d1a49 100644 (file)
@@ -2314,7 +2314,8 @@ bool BScreen::parseMenuFile(FILE *file, Rootmenu *menu) {
       for (; it != end; ++it) {
         const string& fname = *it;
 
-        if (fname[fname.size()-1] == '~')
+        //ignore backups and dot files
+        if (fname[fname.size()-1] == '~' || fname[0] == '.')
           continue;
 
         string style = stylesdir;
@@ -2732,15 +2733,35 @@ BFont *BScreen::readDatabaseFont(const string &rbasename,
     string family = s;
     bool bold = False;
     bool italic = False;
+    bool dropShadow = False;
+
     if (style.getValue(rbasename + "xft.flags", s)) {
       if (s.find("bold") != string::npos)
         bold = True;
       if (s.find("italic") != string::npos)
         italic = True;
+      if (s.find("shadow") != string::npos)
+        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;
     }
+
+    int tint = 25;
+    if (style.getValue(rbasename + "xft.shadow.tint", s)) {
+      tint = atoi(s.c_str());
+    }
+
+    if (tint > 100) tint = 100;
+    if (tint < -100) tint = -100;
     
     BFont *b = new BFont(blackbox->getXDisplay(), this, family, i, bold,
-                         italic, resource.shadow_fonts, resource.aa_fonts);
+                         italic, dropShadow && resource.shadow_fonts, offset, 
+                         tint, resource.aa_fonts);
     if (b->valid())
       return b;
     else
This page took 0.0205 seconds and 4 git commands to generate.