mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 09:21:09 +02:00
infoviewer_bb: always show hdd fill level for a more uniform view; ...
mark undetected hdd fill level with a small line over the progressbar.
this avoids a "whole" in footer when gradient is active
Origin commit data
------------------
Branch: ni/coolstream
Commit: 96cb7f8b9b
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-12-11 (Mon, 11 Dec 2017)
Origin message was:
------------------
- infoviewer_bb: always show hdd fill level for a more uniform view; ...
mark undetected hdd fill level with a small line over the progressbar.
this avoids a "whole" in footer when gradient is active
------------------
This commit was generated by Migit
This commit is contained in:
@@ -689,24 +689,28 @@ void CInfoViewerBB::showIcon_Tuner()
|
||||
|
||||
void CInfoViewerBB::showSysfsHdd()
|
||||
{
|
||||
if (g_settings.infobar_show_sysfs_hdd) {
|
||||
//sysFS info
|
||||
if (g_settings.infobar_show_sysfs_hdd)
|
||||
{
|
||||
// sysfs info
|
||||
int percent = 0;
|
||||
uint64_t t, u;
|
||||
if (get_fs_usage("/", t, u))
|
||||
percent = (int)((u * 100ULL) / t);
|
||||
showBarSys(percent);
|
||||
|
||||
// hdd info
|
||||
showBarHdd(cHddStat::getInstance()->getPercent());
|
||||
}
|
||||
}
|
||||
|
||||
void CInfoViewerBB::showBarSys(int percent)
|
||||
{
|
||||
if (is_visible){
|
||||
if (is_visible)
|
||||
{
|
||||
int sysscale_height = InfoHeightY_Info/4;
|
||||
sysscale->reset();
|
||||
sysscale->doPaintBg(false);
|
||||
sysscale->setDimensionsAll(bbIconMinX, BBarY + InfoHeightY_Info/2 - OFFSET_INNER_MIN - InfoHeightY_Info/4, hddwidth, InfoHeightY_Info/4);
|
||||
sysscale->setDimensionsAll(bbIconMinX, BBarY + InfoHeightY_Info/2 - OFFSET_INNER_MIN - sysscale_height, hddwidth, sysscale_height);
|
||||
sysscale->setValues(percent, 100);
|
||||
sysscale->paint();
|
||||
}
|
||||
@@ -714,15 +718,19 @@ void CInfoViewerBB::showBarSys(int percent)
|
||||
|
||||
void CInfoViewerBB::showBarHdd(int percent)
|
||||
{
|
||||
if (is_visible) {
|
||||
if (is_visible)
|
||||
{
|
||||
int hddscale_height = InfoHeightY_Info/4;
|
||||
hddscale->reset();
|
||||
hddscale->doPaintBg(false);
|
||||
if (percent >= 0){
|
||||
hddscale->setDimensionsAll(bbIconMinX, BBarY + InfoHeightY_Info/2 + OFFSET_INNER_MIN, hddwidth, InfoHeightY_Info/4);
|
||||
hddscale->setDimensionsAll(bbIconMinX, BBarY + InfoHeightY_Info/2 + OFFSET_INNER_MIN, hddwidth, hddscale_height);
|
||||
hddscale->setValues(percent, 100);
|
||||
hddscale->paint();
|
||||
}else {
|
||||
frameBuffer->paintBoxRel(bbIconMinX, BBarY + InfoHeightY_Info/2 + OFFSET_INNER_MIN, hddwidth, InfoHeightY_Info/4, COL_INFOBAR_BUTTONS_BACKGROUND);
|
||||
|
||||
if (percent < 0)
|
||||
{
|
||||
// mark undetected hdd fill level strike through
|
||||
frameBuffer->paintHLineRel(bbIconMinX, hddwidth, BBarY + InfoHeightY_Info/2 + OFFSET_INNER_MIN + hddscale_height/2, COL_INFOBAR_BUTTONS_BACKGROUND);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user