CComponents: remove member setCornerRadius(),

setCorner() replaces this function, 2nd parameter sets type
This commit is contained in:
2013-09-15 20:39:54 +02:00
parent a9a1c5dd68
commit 33ec56ad6f
12 changed files with 16 additions and 26 deletions

View File

@@ -182,8 +182,6 @@ class CComponents
///Possible corner types are defined in CFrameBuffer (see: driver/framebuffer.h)
///Note: default values are given from settings
inline virtual void setCornerType(const int& type){corner_type = type;};
///set corner radius
inline virtual void setCornerRadius(const int& radius){corner_rad = radius;};
///set corner radius and type
inline virtual void setCorner(const int& radius, const int& type = CORNER_ALL){corner_rad = radius; corner_type = type;};
///get corner types

View File

@@ -164,8 +164,7 @@ void CComponentsButton::initCaption()
cc_btn_capt_obj->doPaintBg(false);
//corner of text item
cc_btn_capt_obj->setCornerRadius(corner_rad-fr_thickness);
cc_btn_capt_obj->setCornerType(corner_type);
cc_btn_capt_obj->setCorner(corner_rad-fr_thickness, corner_type);
}
}

View File

@@ -136,8 +136,7 @@ void CComponentsFrmClock::initCCLockItems()
lbl->doPaintBg(false);
//set corner properties of label item
lbl->setCornerRadius(corner_rad-fr_thickness);
lbl->setCornerType(corner_type);
lbl->setCorner(corner_rad-fr_thickness, corner_type);
//set text border to 0
lbl->setTextBorderWidth(0,0);

View File

@@ -184,13 +184,12 @@ void CComponentsHeader::initIcon()
cch_icon_obj->setPictureAlign(CC_ALIGN_HOR_CENTER | CC_ALIGN_VER_CENTER);
//set corner mode of icon item
cch_icon_obj->setCornerRadius(corner_rad-fr_thickness);
int cc_icon_corner_type = corner_type;
if (corner_type == CORNER_TOP_LEFT || corner_type == CORNER_TOP)
cc_icon_corner_type = CORNER_TOP_LEFT;
else
cc_icon_corner_type = CORNER_LEFT;
cch_icon_obj->setCornerType(cc_icon_corner_type);
cch_icon_obj->setCorner(corner_rad-fr_thickness, cc_icon_corner_type);
//global set width of icon object
cch_icon_w = cch_icon_obj->getWidth();
@@ -279,13 +278,12 @@ void CComponentsHeader::initButtons()
cch_btn_obj->addIcon(v_cch_btn);
//set corner mode of button item
cch_btn_obj->setCornerRadius(corner_rad-fr_thickness);
int cc_btn_corner_type = corner_type;
if (corner_type == CORNER_TOP_RIGHT || corner_type == CORNER_TOP)
cc_btn_corner_type = CORNER_TOP_RIGHT;
else
cc_btn_corner_type = CORNER_RIGHT;
cch_btn_obj->setCornerType(cc_btn_corner_type);
cch_btn_obj->setCorner(corner_rad-fr_thickness, cc_btn_corner_type);
//global adapt height
height = max(height, cch_btn_obj->getHeight());
@@ -331,8 +329,7 @@ void CComponentsHeader::initCaption()
cch_text_obj->setColorBody(col_body);
//corner of text item
cch_text_obj->setCornerRadius(corner_rad-fr_thickness);
cch_text_obj->setCornerType(corner_type);
cch_text_obj->setCorner(corner_rad-fr_thickness, corner_type);
/*
global adapt height not needed here again

View File

@@ -327,12 +327,12 @@ void CSignalBox::initSignalItems()
sbar->setDimensionsAll(sbar_x, fr_thickness, sbar_w, sbar_h);
sbar->setFrontEnd(sbx_frontend);
sbar->setCornerRadius(0);
sbar->setCorner(0);
sbar->setScaleHeight(scale_h);
snrbar->setDimensionsAll(sbar_x, CC_APPEND, sbar_w, sbar_h);
snrbar->setFrontEnd(sbx_frontend);
snrbar->setCornerRadius(0);
snrbar->setCorner(0);
snrbar->setScaleHeight(scale_h);
}