From 3eaa88141ff9ca8498d313e3fd32e89972440a0d Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 13 Jan 2022 19:35:11 +0100 Subject: [PATCH] cc_item: add signsl OnBeforePaintInit() --- src/gui/components/cc_item.cpp | 2 ++ src/gui/components/cc_item.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/gui/components/cc_item.cpp b/src/gui/components/cc_item.cpp index 7c2b8a864..d1b5d38b6 100644 --- a/src/gui/components/cc_item.cpp +++ b/src/gui/components/cc_item.cpp @@ -67,6 +67,8 @@ void CComponentsItem::initParent(CComponentsForm* parent) // If backround is not required, it's possible to override this with variable paint_bg=false, use doPaintBg(true/false) to set this! void CComponentsItem::paintInit(const bool &do_save_bg) { + OnBeforePaintInit(); + if (cc_parent) { //use defined background color and background images in dependency of focus mode if (cc_parent->hasFocus()){ diff --git a/src/gui/components/cc_item.h b/src/gui/components/cc_item.h index 356b2374f..79eb7124e 100644 --- a/src/gui/components/cc_item.h +++ b/src/gui/components/cc_item.h @@ -161,6 +161,9 @@ class CComponentsItem : public CComponents void setHeightP(const uint8_t& h_percent); ///set item width, parameter as uint8_t, as percent value related to current width of parent form or screen void setWidthP(const uint8_t& w_percent); + + ///signal on before init fb layers, called before init fb layers inside paintInit() + sigc::signal OnBeforePaintInit; }; #endif