CComponentsItem: move initBodyGradient() into base class

This provides functinality for all sub classes too


Origin commit data
------------------
Commit: 581405e076
Author: Thilo Graf <dbt@novatux.de>
Date: 2014-09-20 (Sat, 20 Sep 2014)
This commit is contained in:
2014-09-20 21:34:58 +02:00
committed by [CST] Focus
parent b73e09fe81
commit efdceca857
4 changed files with 18 additions and 17 deletions

View File

@@ -389,17 +389,6 @@ void CComponentsHeader::initCaption()
}
}
void CComponentsHeader::initGradient()
{
if (cc_gradientBuf == NULL) {
CColorGradient ccGradient;
cc_gradientBuf = ccGradient.gradientOneColor(col_body, NULL, height, CColorGradient::gradientLight2Dark, CColorGradient::light);
}
cc_gradientData.gradientBuf = cc_gradientBuf;
cc_gradientData.direction = CFrameBuffer::gradientVertical;
cc_gradientData.mode = CFrameBuffer::pbrg_noOption;
}
void CComponentsHeader::initCCItems()
{
//set size
@@ -413,10 +402,6 @@ void CComponentsHeader::initCCItems()
//init text
initCaption();
//init color gradient
if (col_body_gradient)
initGradient();
}
void CComponentsHeader::paint(bool do_save_bg)