mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
components: rework classes
- outsourced some classes cc_item.cpp/h, cc_draw.cpp/h - added extra methodes for simple use of some basic components extra.cpp/h - rework clock handling: use timer class, reworked members for enable/disable clock with external timer events, tryed to fix some display issues related with infoclock and time osd clock in moviebrowser, channellist, menuus - reworked hide/kill handling, removed parameter for hide(), try to use cached backgrounds for other constallations, paint cache, image cache (all beta) - reworked shadow/frame handling, add shadow modes for left/right arrangement, TODO: repaint for existant instances required - reworked color gradient assignment (beta) ... Note: I had a data crash in my local git tree and i tryed to restore my historie, but most was lost. Therefore here the commit is large
This commit is contained in:
@@ -40,11 +40,11 @@ CComponentsButton::CComponentsButton( const int& x_pos, const int& y_pos, const
|
||||
CComponentsForm* parent,
|
||||
bool selected,
|
||||
bool enabled,
|
||||
bool has_shadow,
|
||||
int shadow_mode,
|
||||
fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow)
|
||||
{
|
||||
cc_btn_capt_locale = NONEXISTANT_LOCALE;
|
||||
initVarButton(x_pos, y_pos, w, h, caption, icon_name, parent, selected, enabled, has_shadow, color_frame, color_body, color_shadow);
|
||||
initVarButton(x_pos, y_pos, w, h, caption, icon_name, parent, selected, enabled, shadow_mode, color_frame, color_body, color_shadow);
|
||||
}
|
||||
|
||||
CComponentsButton::CComponentsButton( const int& x_pos, const int& y_pos, const int& w, const int& h,
|
||||
@@ -52,11 +52,11 @@ CComponentsButton::CComponentsButton( const int& x_pos, const int& y_pos, const
|
||||
CComponentsForm* parent,
|
||||
bool selected,
|
||||
bool enabled,
|
||||
bool has_shadow,
|
||||
int shadow_mode,
|
||||
fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow)
|
||||
{
|
||||
cc_btn_capt_locale = caption_locale;
|
||||
initVarButton(x_pos, y_pos, w, h, g_Locale->getText(cc_btn_capt_locale), icon_name, parent, selected, enabled, has_shadow, color_frame, color_body, color_shadow);
|
||||
initVarButton(x_pos, y_pos, w, h, g_Locale->getText(cc_btn_capt_locale), icon_name, parent, selected, enabled, shadow_mode, color_frame, color_body, color_shadow);
|
||||
}
|
||||
|
||||
CComponentsButton::CComponentsButton( const int& x_pos, const int& y_pos, const int& w, const int& h,
|
||||
@@ -64,11 +64,11 @@ CComponentsButton::CComponentsButton( const int& x_pos, const int& y_pos, const
|
||||
CComponentsForm* parent,
|
||||
bool selected,
|
||||
bool enabled,
|
||||
bool has_shadow,
|
||||
int shadow_mode,
|
||||
fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow)
|
||||
{
|
||||
string _icon_name = icon_name == NULL ? "" : string(icon_name);
|
||||
initVarButton(x_pos, y_pos, w, h, caption, _icon_name, parent, selected, enabled, has_shadow, color_frame, color_body, color_shadow);
|
||||
initVarButton(x_pos, y_pos, w, h, caption, _icon_name, parent, selected, enabled, shadow_mode, color_frame, color_body, color_shadow);
|
||||
}
|
||||
|
||||
CComponentsButton::CComponentsButton( const int& x_pos, const int& y_pos, const int& w, const int& h,
|
||||
@@ -76,12 +76,12 @@ CComponentsButton::CComponentsButton( const int& x_pos, const int& y_pos, const
|
||||
CComponentsForm* parent,
|
||||
bool selected,
|
||||
bool enabled,
|
||||
bool has_shadow,
|
||||
int shadow_mode,
|
||||
fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow)
|
||||
{
|
||||
string _icon_name = icon_name == NULL ? "" : string(icon_name);
|
||||
cc_btn_capt_locale = caption_locale;
|
||||
initVarButton(x_pos, y_pos, w, h, g_Locale->getText(cc_btn_capt_locale), _icon_name, parent, selected, enabled, has_shadow, color_frame, color_body, color_shadow);
|
||||
initVarButton(x_pos, y_pos, w, h, g_Locale->getText(cc_btn_capt_locale), _icon_name, parent, selected, enabled, shadow_mode, color_frame, color_body, color_shadow);
|
||||
}
|
||||
|
||||
void CComponentsButton::initVarButton( const int& x_pos, const int& y_pos, const int& w, const int& h,
|
||||
@@ -90,7 +90,7 @@ void CComponentsButton::initVarButton( const int& x_pos, const int& y_pos, const
|
||||
CComponentsForm* parent,
|
||||
bool selected,
|
||||
bool enabled,
|
||||
bool has_shadow,
|
||||
int shadow_mode,
|
||||
fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow)
|
||||
{
|
||||
cc_item_type = CC_ITEMTYPE_BUTTON;
|
||||
@@ -99,13 +99,13 @@ void CComponentsButton::initVarButton( const int& x_pos, const int& y_pos, const
|
||||
y = y_pos;
|
||||
width = w;
|
||||
height = h;
|
||||
shadow = has_shadow;
|
||||
shadow = shadow_mode;
|
||||
shadow_w = SHADOW_OFFSET;
|
||||
|
||||
col_body_gradient = false/*g_settings.gradiant*/; //gradient is prepared for use but disabled at the moment till some other parts of gui parts are provide gradient
|
||||
cc_body_gradient_enable = false/*g_settings.gradiant*/; //gradient is prepared for use but disabled at the moment till some other parts of gui parts are provide gradient
|
||||
setColBodyGradient(CColorGradient::gradientLight2Dark, CFrameBuffer::gradientVertical, CColorGradient::light);
|
||||
col_frame = color_frame;
|
||||
col_body = col_body_gradient? COL_DARK_GRAY : color_body;
|
||||
col_body = cc_body_gradient_enable? COL_DARK_GRAY : color_body;
|
||||
col_shadow = color_shadow;
|
||||
|
||||
cc_item_enabled = enabled;
|
||||
@@ -115,8 +115,8 @@ void CComponentsButton::initVarButton( const int& x_pos, const int& y_pos, const
|
||||
append_y_offset = 0;
|
||||
corner_rad = 0;
|
||||
|
||||
cc_btn_capt_col = col_body_gradient ? COL_BUTTON_TEXT_ENABLED : COL_INFOBAR_SHADOW_TEXT;
|
||||
cc_btn_capt_disable_col = col_body_gradient ? COL_BUTTON_TEXT_DISABLED : COL_MENUCONTENTINACTIVE_TEXT;
|
||||
cc_btn_capt_col = cc_body_gradient_enable ? COL_BUTTON_TEXT_ENABLED : COL_INFOBAR_SHADOW_TEXT;
|
||||
cc_btn_capt_disable_col = cc_body_gradient_enable ? COL_BUTTON_TEXT_DISABLED : COL_MENUCONTENTINACTIVE_TEXT;
|
||||
cc_btn_icon_obj = NULL;
|
||||
cc_btn_capt_obj = NULL;
|
||||
cc_btn_dy_font = CNeutrinoFonts::getInstance();
|
||||
@@ -174,7 +174,7 @@ void CComponentsButton::initCaption()
|
||||
if (cc_btn_capt_obj == NULL){
|
||||
cc_btn_capt_obj = new CComponentsLabel();
|
||||
cc_btn_capt_obj->doPaintBg(false);
|
||||
cc_btn_capt_obj->enableTboxSaveScreen(save_tbox_screen);
|
||||
cc_btn_capt_obj->enableTboxSaveScreen(cc_txt_save_screen);
|
||||
addCCItem(cc_btn_capt_obj);
|
||||
}
|
||||
}else{
|
||||
|
Reference in New Issue
Block a user