From 0f6f33c4c3d51a3d8bcaab6e556a708ebde59a73 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 21 Oct 2024 21:44:57 +0200 Subject: [PATCH] infoicons: add getHeightRel() to get relative height Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/94a5fcb66d44bd4ea13d9affa711e6db9bdbd760 Author: vanhofen 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 --- src/gui/infoicons.cpp | 13 +++++++++++++ src/gui/infoicons.h | 1 + 2 files changed, 14 insertions(+) diff --git a/src/gui/infoicons.cpp b/src/gui/infoicons.cpp index c830362ab..b7cdf9db2 100644 --- a/src/gui/infoicons.cpp +++ b/src/gui/infoicons.cpp @@ -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"); diff --git a/src/gui/infoicons.h b/src/gui/infoicons.h index 730f8c939..7484cd088 100644 --- a/src/gui/infoicons.h +++ b/src/gui/infoicons.h @@ -78,6 +78,7 @@ class CInfoIcons void enableInfoIcons(bool enable); void switchInfoIconsOnOff(); void saveIconstate(); + int getHeightRel(); bool getStatus(void) { return status; } };