CComponents: move variable cc_gradientData, paintGradient into base class

Variable now usable via g_settings in all subclasses. enable/disable.
TODO: gradient type handling


Origin commit data
------------------
Branch: ni/coolstream
Commit: 64c84fb490
Author: Thilo Graf <dbt@novatux.de>
Date: 2014-09-20 (Sat, 20 Sep 2014)



------------------
This commit was generated by Migit
This commit is contained in:
2014-09-20 21:34:43 +02:00
committed by [CST] Focus
parent fdbad36872
commit 404c0e2b94
7 changed files with 21 additions and 15 deletions

View File

@@ -64,6 +64,8 @@ CComponents::CComponents() : COSDFader(g_settings.theme.menu_Content_alpha)
frameBuffer = CFrameBuffer::getInstance();
v_fbdata.clear();
saved_screen.pixbuf = NULL;
gradientBuf = NULL;
paintGradient = false;
}
CComponents::~CComponents()
@@ -200,7 +202,7 @@ void CComponents::paintFbItems(bool do_save_bg)
}
else {
if(cc_allow_paint) {
if ((v_fbdata[i].fbdata_type == CC_FBDATA_TYPE_BOX) && (v_fbdata[i].data != NULL)) {
if (paintGradient && (v_fbdata[i].fbdata_type == CC_FBDATA_TYPE_BOX) && (v_fbdata[i].data != NULL)) {
// color gradient
gradientData_t *gradientData = static_cast<gradientData_t*> (v_fbdata[i].data);
if (gradientData->boxBuf == NULL)
@@ -314,3 +316,9 @@ void CComponents::setFrameThickness(const int& thickness, const int& thickness_s
if (fr_thickness_sel != thickness_sel)
fr_thickness_sel = thickness_sel;
}
void CComponents::setPaintGradient(bool do_paint_gradient)
{
paintGradient = g_settings.gradiant ? do_paint_gradient : false;
}