mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-09 07:14:18 +01:00
Changed the browser to use bold fonts for branches. Hardcoded for now.
This commit is contained in:
@@ -532,17 +532,17 @@ paintItem(WMList *lPtr, int index, Drawable d, char *text, int state,
|
|||||||
XClearArea(scr->display, d, x, y, width, height, False);
|
XClearArea(scr->display, d, x, y, width, height, False);
|
||||||
|
|
||||||
if (text) {
|
if (text) {
|
||||||
/* Avoid overlaping... */
|
/* Avoid overlaping... */
|
||||||
|
WMFont *font = (state & WLDSIsBranch) ? scr->boldFont : scr->normalFont;
|
||||||
int textLen = strlen(text);
|
int textLen = strlen(text);
|
||||||
int widthC = (state & WLDSIsBranch) ? width-20 : width-8;
|
int widthC = (state & WLDSIsBranch) ? width-20 : width-8;
|
||||||
if (WMWidthOfString(scr->normalFont, text, textLen) > widthC) {
|
if (WMWidthOfString(font, text, textLen) > widthC) {
|
||||||
char *textBuf = createTruncatedString(scr->normalFont,
|
char *textBuf = createTruncatedString(font, text, &textLen, widthC);
|
||||||
text, &textLen, widthC);
|
W_PaintText(view, d, font, x+4, y, widthC,
|
||||||
W_PaintText(view, d, scr->normalFont, x+4, y, widthC,
|
|
||||||
WALeft, WMColorGC(scr->black), False, textBuf, textLen);
|
WALeft, WMColorGC(scr->black), False, textBuf, textLen);
|
||||||
wfree(textBuf);
|
wfree(textBuf);
|
||||||
} else {
|
} else {
|
||||||
W_PaintText(view, d, scr->normalFont, x+4, y, widthC,
|
W_PaintText(view, d, font, x+4, y, widthC,
|
||||||
WALeft, WMColorGC(scr->black), False, text, textLen);
|
WALeft, WMColorGC(scr->black), False, text, textLen);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user