summaryrefslogtreecommitdiff
path: root/src/Font.cc
diff options
context:
space:
mode:
authorScott Moynes <smoynes@nexus.carleton.ca>2002-10-16 22:33:34 +0000
committerScott Moynes <smoynes@nexus.carleton.ca>2002-10-16 22:33:34 +0000
commit402e229e76dfd8b4cda8b7cf1fccaec5acf7570c (patch)
tree0fb7bf734aeeb8440692b38b2496d8a604695217 /src/Font.cc
parentbe127cb4c6682ec1fa8e28e1668d8e332be69ac8 (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/Font.cc')
-rw-r--r--src/Font.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/Font.cc b/src/Font.cc
index fd7a0fbe..e2649f10 100644
--- a/src/Font.cc
+++ b/src/Font.cc
@@ -48,7 +48,8 @@ string BFont::_fallback_font = "fixed";
#ifdef XFT
BFont::BFont(Display *d, BScreen *screen, const string &family, int size,
- bool bold, bool italic, bool shadow, bool antialias) :
+ bool bold, bool italic, bool shadow, unsigned char offset,
+ unsigned char tint, bool antialias) :
_display(d),
_screen(screen),
_family(family),
@@ -58,6 +59,8 @@ BFont::BFont(Display *d, BScreen *screen, const string &family, int size,
_italic(italic),
_antialias(antialias),
_shadow(shadow),
+ _offset(offset),
+ _tint(tint),
_xftfont(0),
_font(0),
_fontset(0),
@@ -267,7 +270,7 @@ void BFont::drawString(Drawable d, int x, int y, const BColor &color,
c.color.red = 0;
c.color.green = 0;
c.color.blue = 0;
- c.color.alpha = 0x40 | 0x40 << 8; // transparent shadow
+ c.color.alpha = _tint | _tint << 8; // transparent shadow
c.pixel = BlackPixel(_display, _screen->getScreenNumber());
#ifdef XFT_UTF8
@@ -275,8 +278,9 @@ void BFont::drawString(Drawable d, int x, int y, const BColor &color,
#else
XftDrawString8(
#endif
- draw, &c, _xftfont, x + 1, _xftfont->ascent + y + 1,
- (XftChar8 *) string.c_str(), string.size());
+ draw, &c, _xftfont, x + _offset,
+ _xftfont->ascent + y + _offset, (XftChar8 *) string.c_str(),
+ string.size());
}
XftColor c;