mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 00:11:08 +02:00
CComponentsWindow: add return value to addWindowCCItem(), fix footer color
- return value of addWindowCCItem() = current id of added body item
- assignment of footer color was missing
Origin commit data
------------------
Commit: 4bd3173d41
Author: Thilo Graf <dbt@novatux.de>
Date: 2015-12-28 (Mon, 28 Dec 2015)
This commit is contained in:
@@ -154,6 +154,7 @@ void CComponentsWindow::initVarWindow( const int& x_pos, const int& y_pos, const
|
||||
ccw_w_sidebar = 40;
|
||||
ccw_col_head = COL_MENUCONTENT_PLUS_0;
|
||||
ccw_col_head_text = COL_MENUHEAD_TEXT;
|
||||
ccw_col_footer = COL_INFOBAR_SHADOW_PLUS_1;
|
||||
|
||||
page_scroll_mode = PG_SCROLL_M_OFF; //permanent disabled here, only in body used!
|
||||
|
||||
@@ -217,6 +218,7 @@ void CComponentsWindow::initFooter()
|
||||
ccw_footer->setWidth(width-2*fr_thickness);
|
||||
ccw_footer->enableShadow(shadow);
|
||||
ccw_footer->setCorner(corner_rad, CORNER_BOTTOM);
|
||||
ccw_footer->setColorBody(ccw_col_footer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -359,10 +361,11 @@ void CComponentsWindow::enableSidebar(const int& sidbar_type)
|
||||
initCCWItems();
|
||||
}
|
||||
|
||||
void CComponentsWindow::addWindowItem(CComponentsItem* cc_Item)
|
||||
int CComponentsWindow::addWindowItem(CComponentsItem* cc_Item)
|
||||
{
|
||||
if (ccw_body)
|
||||
ccw_body->addCCItem(cc_Item);
|
||||
return ccw_body->addCCItem(cc_Item);
|
||||
return -1;
|
||||
}
|
||||
|
||||
void CComponentsWindow::setCurrentPage(const u_int8_t& current_page)
|
||||
|
@@ -87,6 +87,8 @@ class CComponentsWindow : public CComponentsForm
|
||||
fb_pixel_t ccw_col_head;
|
||||
///header text color
|
||||
fb_pixel_t ccw_col_head_text;
|
||||
///footer bg color
|
||||
fb_pixel_t ccw_col_footer;
|
||||
|
||||
///initialze header object
|
||||
void initHeader();
|
||||
@@ -146,7 +148,7 @@ class CComponentsWindow : public CComponentsForm
|
||||
fb_pixel_t color_shadow = COL_MENUCONTENTDARK_PLUS_0);
|
||||
|
||||
///add item to body object, also usable is addCCItem() to add items to the windo object
|
||||
void addWindowItem(CComponentsItem* cc_Item);
|
||||
int addWindowItem(CComponentsItem* cc_Item);
|
||||
|
||||
///allow/disallow paint a footer, default true, see also ccw_show_footer, showHeader()
|
||||
void showFooter(bool show = true){ccw_show_footer = show; initCCWItems();};
|
||||
@@ -186,6 +188,9 @@ class CComponentsWindow : public CComponentsForm
|
||||
///returns a pointer to the internal footer object, use this to get access to footer properities
|
||||
CComponentsFooter* getFooterObject(){return ccw_footer;};
|
||||
|
||||
///set background to footer
|
||||
void setWindowFooterColor(const fb_pixel_t& color){ccw_col_footer = color;}
|
||||
|
||||
///returns a pointer to the internal left side bar object, use this to get access to left sidebar properities
|
||||
CComponentsFrmChain* getLeftSidebarObject(){return ccw_left_sidebar;};
|
||||
///returns a pointer to the internal right side bar object, use this to get access to right sidebar properities
|
||||
|
Reference in New Issue
Block a user