1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-06 05:44:11 +01:00

Changed the browser to use bold fonts for branches. Hardcoded for now.

This commit is contained in:
dan
1999-11-02 21:17:07 +00:00
parent a5203640f6
commit d425538578

View File

@@ -532,17 +532,17 @@ paintItem(WMList *lPtr, int index, Drawable d, char *text, int state,
XClearArea(scr->display, d, x, y, width, height, False);
if (text) {
/* Avoid overlaping... */
/* Avoid overlaping... */
WMFont *font = (state & WLDSIsBranch) ? scr->boldFont : scr->normalFont;
int textLen = strlen(text);
int widthC = (state & WLDSIsBranch) ? width-20 : width-8;
if (WMWidthOfString(scr->normalFont, text, textLen) > widthC) {
char *textBuf = createTruncatedString(scr->normalFont,
text, &textLen, widthC);
W_PaintText(view, d, scr->normalFont, x+4, y, widthC,
if (WMWidthOfString(font, text, textLen) > widthC) {
char *textBuf = createTruncatedString(font, text, &textLen, widthC);
W_PaintText(view, d, font, x+4, y, widthC,
WALeft, WMColorGC(scr->black), False, textBuf, textLen);
wfree(textBuf);
} 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);
}
}