From 33ec56ad6f9e75aaed50ae645d7e612cdce055cb Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 15 Sep 2013 20:39:54 +0200 Subject: [PATCH] CComponents: remove member setCornerRadius(), setCorner() replaces this function, 2nd parameter sets type --- src/gui/audioplayer.cpp | 4 ++-- src/gui/bedit/bouqueteditor_channels.cpp | 2 +- src/gui/bedit/bouqueteditor_chanselect.cpp | 2 +- src/gui/channellist.cpp | 3 +-- src/gui/components/cc.h | 2 -- src/gui/components/cc_frm_button.cpp | 3 +-- src/gui/components/cc_frm_clock.cpp | 3 +-- src/gui/components/cc_frm_header.cpp | 9 +++------ src/gui/components/cc_frm_signalbars.cpp | 4 ++-- src/gui/infoviewer.cpp | 2 +- src/gui/volumebar.cpp | 6 ++---- src/gui/widget/menue.cpp | 2 +- 12 files changed, 16 insertions(+), 26 deletions(-) diff --git a/src/gui/audioplayer.cpp b/src/gui/audioplayer.cpp index c40a822ea..f8df608cb 100644 --- a/src/gui/audioplayer.cpp +++ b/src/gui/audioplayer.cpp @@ -1645,7 +1645,7 @@ void CAudioPlayerGui::paintHead() return; CComponentsHeader header(m_x, m_y + m_title_height, m_width, m_theight, LOCALE_AUDIOPLAYER_HEAD, NEUTRINO_ICON_MP3); - header.setCornerRadius(RADIUS_MID); + header.setCorner(RADIUS_MID); if (m_inetmode) header.setCaption(LOCALE_INETRADIO_NAME); @@ -1922,7 +1922,7 @@ void CAudioPlayerGui::paintItemID3DetailsLine (int pos) // paint id3 infobox if (ibox == NULL) ibox = new CComponentsInfoBox(m_x, ypos2, m_width, m_info_height); - ibox->setCornerRadius(RADIUS_LARGE); + ibox->setCorner(RADIUS_LARGE); ibox->setYPos(ypos2); ibox->setColorBody(COL_MENUCONTENTDARK_PLUS_0); ibox->paint(false); diff --git a/src/gui/bedit/bouqueteditor_channels.cpp b/src/gui/bedit/bouqueteditor_channels.cpp index 8b0f4a2ac..049eb9036 100644 --- a/src/gui/bedit/bouqueteditor_channels.cpp +++ b/src/gui/bedit/bouqueteditor_channels.cpp @@ -249,7 +249,7 @@ void CBEChannelWidget::initItem2DetailsLine (int pos, int /*ch_index*/) #if 0 ibox->paint(false,true); #endif - ibox->setCornerRadius(RADIUS_LARGE); + ibox->setCorner(RADIUS_LARGE); ibox->setShadowOnOff(CC_SHADOW_OFF); } } diff --git a/src/gui/bedit/bouqueteditor_chanselect.cpp b/src/gui/bedit/bouqueteditor_chanselect.cpp index 56bf80e6d..f3a02fde3 100644 --- a/src/gui/bedit/bouqueteditor_chanselect.cpp +++ b/src/gui/bedit/bouqueteditor_chanselect.cpp @@ -259,7 +259,7 @@ void CBEChannelSelectWidget::initItem2DetailsLine (int pos, int /*ch_index*/) if (ibox){ ibox->setDimensionsAll(x, ypos2, width, info_height); ibox->setFrameThickness(2); - ibox->setCornerRadius(RADIUS_LARGE); + ibox->setCorner(RADIUS_LARGE); ibox->setShadowOnOff(CC_SHADOW_OFF); } } diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 78a26a227..4f6b7ad08 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -2108,8 +2108,7 @@ void CChannelList::paintHead() } headerClock->setClockFont(g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]); - headerClock->setCornerRadius(RADIUS_LARGE); - headerClock->setCornerType(CORNER_TOP_RIGHT); + headerClock->setCorner(RADIUS_LARGE, CORNER_TOP_RIGHT); headerClock->setYPos(y); headerClock->setHeight(theight); headerClock->setTextColor(COL_MENUHEAD_TEXT); diff --git a/src/gui/components/cc.h b/src/gui/components/cc.h index ecfb9d87d..fa7c455b7 100644 --- a/src/gui/components/cc.h +++ b/src/gui/components/cc.h @@ -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 diff --git a/src/gui/components/cc_frm_button.cpp b/src/gui/components/cc_frm_button.cpp index 7b79202da..c43c7fe8a 100644 --- a/src/gui/components/cc_frm_button.cpp +++ b/src/gui/components/cc_frm_button.cpp @@ -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); } } diff --git a/src/gui/components/cc_frm_clock.cpp b/src/gui/components/cc_frm_clock.cpp index eda580c72..aecf77fb0 100644 --- a/src/gui/components/cc_frm_clock.cpp +++ b/src/gui/components/cc_frm_clock.cpp @@ -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); diff --git a/src/gui/components/cc_frm_header.cpp b/src/gui/components/cc_frm_header.cpp index 2278eedd3..554601fb9 100644 --- a/src/gui/components/cc_frm_header.cpp +++ b/src/gui/components/cc_frm_header.cpp @@ -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 diff --git a/src/gui/components/cc_frm_signalbars.cpp b/src/gui/components/cc_frm_signalbars.cpp index 506d61001..68359e1b0 100644 --- a/src/gui/components/cc_frm_signalbars.cpp +++ b/src/gui/components/cc_frm_signalbars.cpp @@ -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); } diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index 26894555d..4f9a740a7 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -1868,7 +1868,7 @@ void CInfoViewer::showInfoFile() //set some properties for info object infobar_txt->setDimensionsAll(xStart, yStart, width, height); - infobar_txt->setCornerRadius(RADIUS_SMALL); + infobar_txt->setCorner(RADIUS_SMALL); infobar_txt->setShadowOnOff(true); infobar_txt->setTextColor(COL_INFOBAR_TEXT); infobar_txt->setColorBody(COL_INFOBAR_PLUS_0); diff --git a/src/gui/volumebar.cpp b/src/gui/volumebar.cpp index b28e1b3cb..f2c1ade75 100644 --- a/src/gui/volumebar.cpp +++ b/src/gui/volumebar.cpp @@ -175,8 +175,7 @@ void CVolumeBar::initVolumeBarIcon() vb_icon->setPictureAlign(CC_ALIGN_HOR_CENTER | CC_ALIGN_VER_CENTER); vb_icon->setColorBody(col_body); - vb_icon->setCornerRadius(cornerRad()); - vb_icon->setCornerType(CORNER_LEFT); + vb_icon->setCorner(cornerRad(), CORNER_LEFT); //add icon to container addCCItem(vb_icon); @@ -210,8 +209,7 @@ void CVolumeBar::initVolumeBarDigit() vb_digit->setDimensionsAll(vb_digit_x, 0, vb_digit_w, height); vb_digit->setTextColor(COL_MENUCONTENT_TEXT); - vb_digit->setCornerRadius(cornerRad()); - vb_digit->setCornerType(CORNER_RIGHT); + vb_digit->setCorner(cornerRad(), CORNER_RIGHT); initVolumeBarDigitValue(); //add digit label to container diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index 3332192c4..e9a0b35b2 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -1161,7 +1161,7 @@ void CMenuWidget::paintHint(int pos) info_box->setFrameThickness(2); info_box->removeLineBreaks(str); info_box->setText(str, CTextBox::AUTO_WIDTH, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_HINT]); - info_box->setCornerRadius(RADIUS_LARGE); + info_box->setCorner(RADIUS_LARGE); info_box->syncSysColors(); info_box->setColorBody(COL_MENUCONTENTDARK_PLUS_0); info_box->setShadowOnOff(CC_SHADOW_ON);