bedit: remove multiple code from paintHead() method

Origin commit data
------------------
Branch: ni/coolstream
Commit: c651f6aa40
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-10-12 (Thu, 12 Oct 2017)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
2017-10-12 12:26:02 +02:00
parent 6a5e1fabb4
commit 07de0c3899
5 changed files with 16 additions and 20 deletions

View File

@@ -137,12 +137,7 @@ void CBEBouquetWidget::paintItems()
void CBEBouquetWidget::paintHead()
{
header.setCaption(LOCALE_BOUQUETLIST_HEAD);
header.setIcon(NEUTRINO_ICON_SETTINGS);
header.setDimensionsAll(x, y, width, header_height);
header.setCorner(RADIUS_LARGE, CORNER_TOP);
header.enableShadow(CC_SHADOW_RIGHT | CC_SHADOW_CORNER_TOP_RIGHT | CC_SHADOW_CORNER_BOTTOM_RIGHT, -1, true);
header.paint(CC_SAVE_SCREEN_NO);
CBEGlobals::paintHead(g_Locale->getText(LOCALE_BOUQUETLIST_HEAD), NEUTRINO_ICON_SETTINGS);
}
const struct button_label CBEBouquetWidgetButtons[] =

View File

@@ -142,13 +142,8 @@ void CBEChannelWidget::paintItems()
void CBEChannelWidget::paintHead()
{
header.setCaption(caption + (mode == CZapitClient::MODE_TV ? " - TV" : " - Radio"));
header.setIcon(NULL); // trick the cc-header
header.setIcon(mode == CZapitClient::MODE_TV ? NEUTRINO_ICON_VIDEO : NEUTRINO_ICON_AUDIO);
header.setDimensionsAll(x, y, width, header_height);
header.setCorner(RADIUS_LARGE, CORNER_TOP);
header.enableShadow(CC_SHADOW_RIGHT | CC_SHADOW_CORNER_TOP_RIGHT | CC_SHADOW_CORNER_BOTTOM_RIGHT, -1, true);
header.paint(CC_SAVE_SCREEN_NO);
CBEGlobals::paintHead(caption + (mode == CZapitClient::MODE_TV ? " - TV" : " - Radio"),
mode == CZapitClient::MODE_TV ? NEUTRINO_ICON_VIDEO : NEUTRINO_ICON_AUDIO);
}
const struct button_label CBEChannelWidgetButtons[] =

View File

@@ -126,13 +126,8 @@ void CBEChannelSelectWidget::paintItems()
void CBEChannelSelectWidget::paintHead()
{
header.setCaption(caption + (mode == CZapitClient::MODE_TV ? " - TV" : " - Radio"));
header.setIcon(NULL); // trick the cc-header
header.setIcon(mode == CZapitClient::MODE_TV ? NEUTRINO_ICON_VIDEO : NEUTRINO_ICON_AUDIO);
header.setDimensionsAll(x, y, width, header_height);
header.setCorner(RADIUS_LARGE, CORNER_TOP);
header.enableShadow(CC_SHADOW_RIGHT | CC_SHADOW_CORNER_TOP_RIGHT | CC_SHADOW_CORNER_BOTTOM_RIGHT, -1, true);
header.paint(CC_SAVE_SCREEN_NO);
CBEGlobals::paintHead(caption + (mode == CZapitClient::MODE_TV ? " - TV" : " - Radio"),
mode == CZapitClient::MODE_TV ? NEUTRINO_ICON_VIDEO : NEUTRINO_ICON_AUDIO);
}
struct button_label CBEChannelSelectButtons[] =

View File

@@ -135,3 +135,13 @@ void CBEGlobals::paintFoot(const size_t& label_count, const struct button_label
footer.enableShadow(CC_SHADOW_ON, -1, true);
footer.paintButtons(x, y + header_height + body_height, width, footer_height, label_count, content);
}
void CBEGlobals::paintHead(const std::string& Caption, const char* Icon)
{
header.setCaption(Caption);
header.setIcon(Icon);
header.setDimensionsAll(x, y, width, header_height);
header.setCorner(RADIUS_LARGE, CORNER_TOP);
header.enableShadow(CC_SHADOW_RIGHT | CC_SHADOW_CORNER_TOP_RIGHT | CC_SHADOW_CORNER_BOTTOM_RIGHT, -1, true);
header.paint(CC_SAVE_SCREEN_NO);
}

View File

@@ -56,6 +56,7 @@ class CBEGlobals
unsigned int items_count;
int* timeout_ptr;
void paintHead(const std::string& Caption, const char* Icon);
void paintBody();
void paintFoot(const size_t& label_count, const struct button_label * const content);