mirror of
https://github.com/gryf/wmaker.git
synced 2026-10-12 13:02:30 +02:00
Changed the browser to use bold fonts for branches. Hardcoded for now.
This commit is contained in:
1 parent
a5203640f6
commit
d425538578
1 file changed
+5
-5
+5
-5
@@ -533,16 +533,16 @@ paintItem(WMList *lPtr, int index, Drawable d, char *text, int state,
|
|||||||
|
|
||||||
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