CComponents: rework kill()

There was some problems with restore, hide, clean and save background of item parts,
seen in detailsline. kill() worked not really clean.
kill() works now as virtual member and uses paintBackgroundBoxRel().

In consequence of which:
-unnecessary members in subclasses removed.
-add some comments


Origin commit data
------------------
Branch: ni/coolstream
Commit: a4c3e08f77
Author: Thilo Graf <dbt@novatux.de>
Date: 2013-05-03 (Fri, 03 May 2013)



------------------
This commit was generated by Migit
This commit is contained in:
2013-05-03 19:51:57 +02:00
parent 3fed954162
commit 1d32a145d6
4 changed files with 25 additions and 51 deletions

View File

@@ -129,28 +129,6 @@ void CComponentsItem::hide(bool no_restore)
hideCCItem(no_restore);
}
//hide rendered objects
void CComponentsItem::kill()
{
//save current colors
fb_pixel_t c_tmp1, c_tmp2, c_tmp3;
c_tmp1 = col_body;
c_tmp2 = col_shadow;
c_tmp3 = col_frame;
//set background color
col_body = col_frame = col_shadow = COL_BACKGROUND;
//paint with background and restore last used colors
paint(CC_SAVE_SCREEN_NO);
col_body = c_tmp1;
col_shadow = c_tmp2;
col_frame = c_tmp3;
firstPaint = true;
is_painted = false;
}
//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.