mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 00:11:08 +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:
@@ -16,7 +16,7 @@
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public
|
||||
License along with this program; if not, write to the
|
||||
@@ -113,7 +113,7 @@ void CComponentsDetailLine::paint(bool do_save_bg)
|
||||
{
|
||||
/* vertical item mark | */
|
||||
{CC_FBDATA_TYPE_LINE, x+width-thickness-sw, y_mark_top, thickness, h_mark_top, col_body, 0, 0, NULL, NULL},
|
||||
{CC_FBDATA_TYPE_LINE, x+width-sw, y_mark_top+sw, sw, h_mark_top, col_shadow, 0, 0, NULL, NULL},
|
||||
{CC_FBDATA_TYPE_LINE, x+width-sw, y_mark_top+sw, sw, h_mark_top-sw, col_shadow, 0, 0, NULL, NULL},
|
||||
{CC_FBDATA_TYPE_LINE, x+width-thickness, y_mark_top+h_mark_top, thickness, sw, col_shadow, 0, 0, NULL, NULL},
|
||||
|
||||
/* horizontal item line - */
|
||||
@@ -130,7 +130,7 @@ void CComponentsDetailLine::paint(bool do_save_bg)
|
||||
|
||||
/* vertical info mark | */
|
||||
{CC_FBDATA_TYPE_LINE, x+width-thickness-sw, y_mark_down, thickness, h_mark_down, col_body, 0, 0, NULL, NULL},
|
||||
{CC_FBDATA_TYPE_LINE, x+width-sw, y_mark_down+sw, sw, h_mark_down, col_shadow, 0, 0, NULL, NULL},
|
||||
{CC_FBDATA_TYPE_LINE, x+width-sw, y_mark_down+sw, sw, h_mark_down-sw, col_shadow, 0, 0, NULL, NULL},
|
||||
{CC_FBDATA_TYPE_LINE, x+width-thickness, y_mark_down+h_mark_down,thickness, sw, col_shadow, 0, 0, NULL, NULL},
|
||||
};
|
||||
|
||||
@@ -140,24 +140,6 @@ void CComponentsDetailLine::paint(bool do_save_bg)
|
||||
paintFbItems(do_save_bg);
|
||||
}
|
||||
|
||||
//remove painted fb items from screen
|
||||
void CComponentsDetailLine::kill()
|
||||
{
|
||||
//save current colors
|
||||
fb_pixel_t c_tmp1, c_tmp2;
|
||||
c_tmp1 = col_body;
|
||||
c_tmp2 = col_shadow;
|
||||
|
||||
//set background color
|
||||
col_body = col_shadow = COL_BACKGROUND;
|
||||
|
||||
//paint with background and restore, set last used colors
|
||||
paint(CC_SAVE_SCREEN_NO);
|
||||
col_body = c_tmp1;
|
||||
col_shadow = c_tmp2;
|
||||
firstPaint = true;
|
||||
}
|
||||
|
||||
//synchronize colors for details line
|
||||
//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