infoicons: add getHeightRel() to get relative height

Origin commit data
------------------
Branch: ni/coolstream
Commit: 94a5fcb66d
Author: vanhofen <vanhofen@gmx.de>
Date: 2024-10-21 (Mon, 21 Oct 2024)

Origin message was:
------------------
- infoicons: add getHeightRel() to get relative height

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2024-10-21 21:44:57 +02:00
parent 311c29efc4
commit 0f6f33c4c3
2 changed files with 14 additions and 0 deletions

View File

@@ -306,6 +306,19 @@ void CInfoIcons::enableInfoIcons(bool enable)
}
}
int CInfoIcons::getHeightRel()
{
if (is_painted)
{
if (g_settings.mode_icons_background)
return y + height + OFFSET_SHADOW;
else
return y + height;
}
else
return y;
}
void CInfoIcons::saveIconstate()
{
std::ofstream file("/var/etc/infoicons");

View File

@@ -78,6 +78,7 @@ class CInfoIcons
void enableInfoIcons(bool enable);
void switchInfoIconsOnOff();
void saveIconstate();
int getHeightRel();
bool getStatus(void) { return status; }
};