mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 08:51:10 +02:00
* CComponentsInfoBox: Optimize display
- 'only body paint' can be switched off
This commit is contained in:
@@ -209,7 +209,7 @@ CComponentsInfoBox::CComponentsInfoBox(const int x_pos, const int y_pos, const i
|
||||
}
|
||||
|
||||
#define INFOBOX_ITEMS_COUNT 3
|
||||
void CComponentsInfoBox::paint(bool do_save_bg)
|
||||
void CComponentsInfoBox::paint(bool do_save_bg, bool fullPaint)
|
||||
{
|
||||
clear();
|
||||
rad = RADIUS_LARGE;
|
||||
@@ -221,8 +221,8 @@ void CComponentsInfoBox::paint(bool do_save_bg)
|
||||
{x+fr_thickness, y+fr_thickness, width-2*fr_thickness, height-2*fr_thickness, col_body, rad, NULL, NULL, false, 0},
|
||||
};
|
||||
|
||||
if (firstPaint) {
|
||||
int start = (shadow) ? 0 : 1;
|
||||
if (firstPaint) {
|
||||
if (do_save_bg) {
|
||||
v_infobox_val.clear();
|
||||
for(int i = start; i < INFOBOX_ITEMS_COUNT; i++) {
|
||||
@@ -231,13 +231,19 @@ void CComponentsInfoBox::paint(bool do_save_bg)
|
||||
fbdata[i].pixbuf = NULL;
|
||||
}
|
||||
}
|
||||
// paint infobox full
|
||||
paintFbItems((comp_fbdata_t*)&fbdata[start], INFOBOX_ITEMS_COUNT - start, false);
|
||||
firstPaint = false;
|
||||
}
|
||||
else {
|
||||
if (fullPaint)
|
||||
// paint infobox full
|
||||
paintFbItems((comp_fbdata_t*)&fbdata[start], INFOBOX_ITEMS_COUNT - start, false);
|
||||
else
|
||||
// paint body only
|
||||
paintFbItems((comp_fbdata_t*)&fbdata[INFOBOX_ITEMS_COUNT - 1], 1, false);
|
||||
}
|
||||
}
|
||||
|
||||
//restore infobox
|
||||
void CComponentsInfoBox::restore(bool clear_)
|
||||
|
@@ -101,7 +101,7 @@ class CComponentsInfoBox : public CComponents
|
||||
CComponentsInfoBox( const int x_pos, const int y_pos, const int w, const int h, bool has_shadow = true,
|
||||
fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, fb_pixel_t color_body = COL_MENUCONTENTDARK_PLUS_0,fb_pixel_t color_shadow = COL_MENUCONTENTDARK_PLUS_0);
|
||||
|
||||
void paint(bool do_save_bg = true);
|
||||
void paint(bool do_save_bg = true, bool fullPaint = false);
|
||||
void hide();
|
||||
void restore(bool clear_);
|
||||
void setColor(fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow){col_frame = color_frame; col_body = color_body; col_shadow = color_shadow;};
|
||||
|
Reference in New Issue
Block a user