From 2bc184e5f0b852c14337ad172a488bbf1e2cda3f Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Mon, 27 Apr 2015 09:54:33 +0200 Subject: [PATCH] CComponentsInfoBox: add switch to enable gradient for info box Signed-off-by: Thilo Graf Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/7016a86ca21214c4f7fc1fc04001a59b090c1e45 Author: [CST] Focus Date: 2015-04-27 (Mon, 27 Apr 2015) ------------------ This commit was generated by Migit --- src/gui/components/cc_item_infobox.cpp | 4 ++++ src/gui/components/cc_item_infobox.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gui/components/cc_item_infobox.cpp b/src/gui/components/cc_item_infobox.cpp index 1d659e541..676a1db3a 100644 --- a/src/gui/components/cc_item_infobox.cpp +++ b/src/gui/components/cc_item_infobox.cpp @@ -109,6 +109,10 @@ void CComponentsInfoBox::paintPicture() pic->setColorBody(col_body); + //set gradient behavior of pic object + if (col_body_gradient) + pic->doPaintBg(false); + //fit icon into frame pic->setYPos(y+(height/2-pic->getHeight()/2)); diff --git a/src/gui/components/cc_item_infobox.h b/src/gui/components/cc_item_infobox.h index 7a8c5c616..6a86a6dc6 100644 --- a/src/gui/components/cc_item_infobox.h +++ b/src/gui/components/cc_item_infobox.h @@ -83,7 +83,8 @@ class CComponentsInfoBox : public CComponentsText void setPicture(const std::string& picture_name); ///set property: path or name of displayed image, parameter as const char* void setPicture(const char* picture_name); - + ///set property: gradient behavior + void enableGradient(bool enable) { col_body_gradient = enable; } ///paint item void paint(bool do_save_bg = CC_SAVE_SCREEN_YES); };