diff options
| author | Scott Moynes <smoynes@nexus.carleton.ca> | 2002-10-16 22:33:34 +0000 |
|---|---|---|
| committer | Scott Moynes <smoynes@nexus.carleton.ca> | 2002-10-16 22:33:34 +0000 |
| commit | 402e229e76dfd8b4cda8b7cf1fccaec5acf7570c (patch) | |
| tree | 0fb7bf734aeeb8440692b38b2496d8a604695217 /src/Screen.cc | |
| parent | be127cb4c6682ec1fa8e28e1668d8e332be69ac8 (diff) | |
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
Diffstat (limited to 'src/Screen.cc')
| -rw-r--r-- | src/Screen.cc | 16 |
1 files changed, 15 insertions, 1 deletions
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 |
