cosmetics

This commit is contained in:
Mathias Gumz 2013-06-22 09:45:48 +02:00
parent 34656ac622
commit 2efd4b8230
2 changed files with 8 additions and 9 deletions

View file

@ -91,10 +91,11 @@ typedef FontCache::iterator FontCacheIt;
void resetEffects(FbTk::Font& font) {
int nr_scr = DefaultScreen(FbTk::App::instance()->display());
font.setHalo(false);
font.setHaloColor(FbTk::Color("white", DefaultScreen(FbTk::App::instance()->display())));
font.setHaloColor(FbTk::Color("white", nr_scr));
font.setShadow(false);
font.setShadowColor(FbTk::Color("black", DefaultScreen(FbTk::App::instance()->display())));
font.setShadowColor(FbTk::Color("black", nr_scr));
font.setShadowOffY(2);
font.setShadowOffX(2);
}

View file

@ -67,7 +67,7 @@ bool XftFontImp::load(const std::string &name) {
for (int r = ROT0; r <= ROT270; r++) {
m_xftfonts_loaded[r] = false;
if (m_xftfonts[r] != 0) {
XftFontClose(App::instance()->display(), m_xftfonts[r]);
XftFontClose(disp, m_xftfonts[r]);
m_xftfonts[r] = 0;
}
}
@ -176,12 +176,10 @@ unsigned int XftFontImp::textWidth(const char* text, unsigned int len) const {
#ifdef HAVE_XFT_UTF8_STRING
if (m_utf8mode) {
XftTextExtentsUtf8(disp,
font,
(XftChar8 *)text, len,
&ginfo);
if (ginfo.xOff != 0)
XftTextExtentsUtf8(disp, font, (XftChar8 *)text, len, &ginfo);
if (ginfo.xOff != 0) {
return ginfo.xOff;
}
// the utf8 failed, try normal extents
}