Merge branch 'cst-next' of git://coolstreamtech.de/cst-public-gui-neutrino into ni/cst-next

Origin commit data
------------------
Commit: bc0419a53a
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-08-22 (Mon, 22 Aug 2016)
This commit is contained in:
vanhofen
2016-08-22 21:50:20 +02:00
5 changed files with 8 additions and 12 deletions

View File

@@ -100,7 +100,7 @@ void CComponentsButton::initVarButton( const int& x_pos, const int& y_pos, const
width = w;
height = h;
shadow = shadow_mode;
shadow_w = SHADOW_OFFSET;
shadow_w = SHADOW_OFFSET/2; //buttons are mostly small elements, so these elements should have a reasonable shadow width
cc_body_gradient_enable = CC_COLGRAD_OFF/*g_settings.gradiant*/; //TODO: gradient is prepared for use but disabled at the moment till some other parts of gui parts are provide gradient
setColBodyGradient(cc_body_gradient_enable/*CColorGradient::gradientLight2Dark*/, CFrameBuffer::gradientVertical, CColorGradient::light);
@@ -113,7 +113,7 @@ void CComponentsButton::initVarButton( const int& x_pos, const int& y_pos, const
fr_thickness = 0; //TODO: parts of the GUI still don't use framed buttons
append_x_offset = 6;
append_y_offset = 0;
corner_rad = 0;
corner_rad = RADIUS_SMALL;
cc_btn_capt_col = cc_body_gradient_enable ? COL_BUTTON_TEXT_ENABLED : COL_MENUFOOT_TEXT;
cc_btn_capt_disable_col = cc_body_gradient_enable ? COL_BUTTON_TEXT_DISABLED : COL_MENUCONTENTINACTIVE_TEXT;

View File

@@ -117,7 +117,7 @@ void CComponentsFooter::setButtonLabels(const struct button_label_s * const cont
//footer as primary container (in this context '=this') and the parent for the button label container (chain object),
//button label container (chain object) itself is concurrent the parent object for button objects.
if (chain == NULL){
chain = new CComponentsFrmChain(x_chain, CC_CENTERED, w_chain, height, 0, CC_DIR_X, this);
chain = new CComponentsFrmChain(x_chain, CC_CENTERED, w_chain, height, 0, CC_DIR_X, this, CC_SHADOW_OFF, COL_MENUCONTENT_PLUS_6, col_body);
chain->setCorner(this->corner_rad, this->corner_type);
chain->doPaintBg(false);
}

View File

@@ -168,14 +168,10 @@ void CComponentsWindow::initWindowSize()
if (cc_parent)
return;
if (width == 0)
width = frameBuffer->getScreenWidth();
else if ((unsigned)width > frameBuffer->getScreenWidth())
if (width == 0 || (unsigned)width > frameBuffer->getScreenWidth())
width = frameBuffer->getScreenWidth();
if (height == 0)
height = frameBuffer->getScreenHeight();
else if((unsigned)height > frameBuffer->getScreenHeight())
if (height == 0 || (unsigned)height > frameBuffer->getScreenHeight())
height = frameBuffer->getScreenHeight();
}
@@ -223,7 +219,7 @@ void CComponentsWindow::initFooter()
ccw_footer->setPos(0, cc_yr + height - ccw_footer->getHeight()- fr_thickness);
ccw_footer->setWidth(width-2*fr_thickness);
ccw_footer->enableShadow(false/*shadow*/);
ccw_footer->setCorner(corner_rad-fr_thickness/2, CORNER_BOTTOM);
ccw_footer->setCorner(corner_rad-fr_thickness, CORNER_BOTTOM);
ccw_footer->setButtonFont(ccw_button_font);
ccw_footer->setColorBody(ccw_col_footer);
ccw_footer->doPaintBg(true);