mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 15:32:52 +02:00
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:
@@ -140,7 +140,7 @@ void CComponents::paintFbItems(bool do_save_bg)
|
||||
frameBuffer->paintBoxFrame(v_fbdata[i].x, v_fbdata[i].y, v_fbdata[i].dx, v_fbdata[i].dy, v_fbdata[i].frame_thickness, v_fbdata[i].color, v_fbdata[i].r);
|
||||
else if (fbtype == CC_FBDATA_TYPE_BACKGROUND)
|
||||
frameBuffer->paintBackgroundBoxRel(x, y, v_fbdata[i].dx, v_fbdata[i].dy);
|
||||
else if( allowPaint(i) )
|
||||
else if( allowPaint(i) || fbtype == CC_FBDATA_TYPE_LINE)
|
||||
frameBuffer->paintBoxRel(v_fbdata[i].x, v_fbdata[i].y, v_fbdata[i].dx, v_fbdata[i].dy, v_fbdata[i].color, v_fbdata[i].r, corner_type);
|
||||
}
|
||||
}
|
||||
@@ -170,6 +170,16 @@ inline void CComponents::hide()
|
||||
is_painted = false;
|
||||
}
|
||||
|
||||
//erase rendered objects
|
||||
void CComponents::kill()
|
||||
{
|
||||
for(size_t i =0; i< v_fbdata.size() ;i++)
|
||||
frameBuffer->paintBackgroundBoxRel(v_fbdata[i].x, v_fbdata[i].y, v_fbdata[i].dx, v_fbdata[i].dy);
|
||||
clear();
|
||||
firstPaint = true;
|
||||
is_painted = false;
|
||||
}
|
||||
|
||||
//clean old screen buffer
|
||||
inline void CComponents::clear()
|
||||
{
|
||||
|
Reference in New Issue
Block a user