Change hbars to make last char in-/decrease vertically
This commit is contained in:
@@ -67,6 +67,7 @@ v.0.5dev (ongoing development)
|
||||
+ hd44780 driver: add lineaddress option to support ST7036 (Malte Poeggel)
|
||||
+ lcdproc: Retrieve per CPU usage statistics on FreeBSD (M. Dolze)
|
||||
* Change drivers to start in background by default: bayrad, CFontz, ea65, glk
|
||||
* imon driver: Change hbars to make last char in-/decrease vertically
|
||||
|
||||
v.0.5.2
|
||||
* fix switching on/off the Load screen in lcdproc client using the menu
|
||||
|
||||
@@ -399,6 +399,16 @@ MODULE_EXPORT void imon_hbar (Driver *drvthis, int x, int y, int len, int promil
|
||||
if (x + pos > p->width)
|
||||
return;
|
||||
|
||||
#ifndef IMON_HBARS_OLD
|
||||
if (pixels >= p->cellwidth ) {
|
||||
/* write a "full" block to the screen... */
|
||||
imon_chr(drvthis, x+pos, y, IMON_CHAR_BLOCK_FILLED);
|
||||
}
|
||||
else if (pixels >= 1) {
|
||||
/* write a partial block, albeit vertically... */
|
||||
imon_chr(drvthis, x+pos, y, pixels * p->cellheight / p->cellwidth);
|
||||
}
|
||||
#else
|
||||
if (pixels >= p->cellwidth * 3/4) {
|
||||
/* write a "full" block to the screen... */
|
||||
imon_chr(drvthis, x+pos, y, IMON_CHAR_BLOCK_FILLED);
|
||||
@@ -413,6 +423,7 @@ MODULE_EXPORT void imon_hbar (Driver *drvthis, int x, int y, int len, int promil
|
||||
imon_chr(drvthis, x+pos, y, '>');
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
; // write nothing (not even a space)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user