From 402e229e76dfd8b4cda8b7cf1fccaec5acf7570c Mon Sep 17 00:00:00 2001 From: Scott Moynes Date: Wed, 16 Oct 2002 22:33:34 +0000 Subject: Allow for customizing of the dropShadows. If xft.flags: shadow then you can specify the tint with xft.shadow.tint: which should be a number 0 to 255. xft.shadow.offset: will specify how many pixels to add in positioning. Also, try to fix the inheritence in the pressed button borders. Need a style to test this --- src/Screen.cc | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/Screen.cc') diff --git a/src/Screen.cc b/src/Screen.cc index 4d15e28b..f691cf6e 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -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 -- cgit v1.2.3