mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 07:51:11 +02:00
CComponents: fix missing save of background in paint_bg=false mode
Exit in initVarItem() on !paint_bg was too early.
Origin commit data
------------------
Branch: ni/coolstream
Commit: 9ae72bf02d
Author: Thilo Graf <dbt@novatux.de>
Date: 2013-05-12 (Sun, 12 May 2013)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -83,6 +83,7 @@ void CComponents::initVarBasic()
|
|||||||
//paint framebuffer stuff and fill buffer
|
//paint framebuffer stuff and fill buffer
|
||||||
void CComponents::paintFbItems(bool do_save_bg)
|
void CComponents::paintFbItems(bool do_save_bg)
|
||||||
{
|
{
|
||||||
|
//save background before first paint, do_save_bg must be true
|
||||||
if (firstPaint && do_save_bg) {
|
if (firstPaint && do_save_bg) {
|
||||||
for(size_t i=0; i<v_fbdata.size(); i++){
|
for(size_t i=0; i<v_fbdata.size(); i++){
|
||||||
if (v_fbdata[i].fbdata_type == CC_FBDATA_TYPE_BGSCREEN){
|
if (v_fbdata[i].fbdata_type == CC_FBDATA_TYPE_BGSCREEN){
|
||||||
@@ -110,6 +111,8 @@ void CComponents::paintFbItems(bool do_save_bg)
|
|||||||
#ifdef DEBUG_CC
|
#ifdef DEBUG_CC
|
||||||
printf(" [CComponents]\n [%s - %d], fbdata_[%d] \n x = %d\n y = %d\n dx = %d\n dy = %d\n", __FUNCTION__, __LINE__, i, v_fbdata[i].x, v_fbdata[i].y, v_fbdata[i].dx, v_fbdata[i].dy);
|
printf(" [CComponents]\n [%s - %d], fbdata_[%d] \n x = %d\n y = %d\n dx = %d\n dy = %d\n", __FUNCTION__, __LINE__, i, v_fbdata[i].x, v_fbdata[i].y, v_fbdata[i].dx, v_fbdata[i].dy);
|
||||||
#endif
|
#endif
|
||||||
|
//some elements can be assembled from lines and must be handled as one unit (see details line),
|
||||||
|
//so all individual backgrounds of boxes must be saved and painted in "firstpaint mode"
|
||||||
if (firstPaint){
|
if (firstPaint){
|
||||||
|
|
||||||
if (do_save_bg && fbtype == CC_FBDATA_TYPE_LINE)
|
if (do_save_bg && fbtype == CC_FBDATA_TYPE_LINE)
|
||||||
@@ -121,7 +124,9 @@ void CComponents::paintFbItems(bool do_save_bg)
|
|||||||
else
|
else
|
||||||
firstPaint = false;
|
firstPaint = false;
|
||||||
}
|
}
|
||||||
if (fbtype != CC_FBDATA_TYPE_BGSCREEN){
|
|
||||||
|
//paint all fb relevant basic parts (frame and body) with all specified properties, paint_bg must be true
|
||||||
|
if (fbtype != CC_FBDATA_TYPE_BGSCREEN && paint_bg){
|
||||||
if (fbtype == CC_FBDATA_TYPE_FRAME) {
|
if (fbtype == CC_FBDATA_TYPE_FRAME) {
|
||||||
if (v_fbdata[i].frame_thickness > 0)
|
if (v_fbdata[i].frame_thickness > 0)
|
||||||
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);
|
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);
|
||||||
|
@@ -67,9 +67,6 @@ void CComponentsItem::paintInit(bool do_save_bg)
|
|||||||
{
|
{
|
||||||
clear();
|
clear();
|
||||||
|
|
||||||
if(!paint_bg)
|
|
||||||
return;
|
|
||||||
|
|
||||||
int sw = shadow ? shadow_w : 0;
|
int sw = shadow ? shadow_w : 0;
|
||||||
int th = fr_thickness;
|
int th = fr_thickness;
|
||||||
fb_pixel_t col_frame_cur = col_frame;
|
fb_pixel_t col_frame_cur = col_frame;
|
||||||
|
Reference in New Issue
Block a user