mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 01:11:06 +02:00
CComponents/CComponentsItem: add advanced version of kill()
kill() allows now paint with defined colors over rendered objects
without restore of background. It's similar to paintBackgroundBoxRel()
known from CFrameBuffer, but with possiblity to define color,
default color is 0 like before (empty background).
Items with parent bindings use the background color of its parent
as default, but can also be ignored.
This function can be useful before repaint of items and/or,
if required, to have a clean background inside item containers.
Origin commit data
------------------
Branch: ni/coolstream
Commit: 6a2e701a7a
Author: Thilo Graf <dbt@novatux.de>
Date: 2014-05-05 (Mon, 05 May 2014)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -133,6 +133,22 @@ void CComponentsItem::hide(bool no_restore)
|
||||
hideCCItem(no_restore);
|
||||
}
|
||||
|
||||
//erase or paint over rendered objects
|
||||
void CComponentsItem::kill(const fb_pixel_t& bg_color, bool ignore_parent)
|
||||
{
|
||||
if(bg_color || cc_parent == NULL){
|
||||
CComponents::kill(bg_color);
|
||||
return;
|
||||
}
|
||||
|
||||
if (cc_parent){
|
||||
if(bg_color || ignore_parent)
|
||||
CComponents::kill(bg_color);
|
||||
else
|
||||
CComponents::kill(cc_parent->getColorBody());
|
||||
}
|
||||
}
|
||||
|
||||
//synchronize colors for forms
|
||||
//This is usefull if the system colors are changed during runtime
|
||||
//so you can ensure correct applied system colors in relevant objects with unchanged instances.
|
||||
|
Reference in New Issue
Block a user