mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-01 09:51:13 +02:00
bedit: remove multiple code from paintHead() method
Origin commit data
------------------
Commit: c651f6aa40
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-10-12 (Thu, 12 Oct 2017)
This commit is contained in:
@@ -137,12 +137,7 @@ void CBEBouquetWidget::paintItems()
|
|||||||
|
|
||||||
void CBEBouquetWidget::paintHead()
|
void CBEBouquetWidget::paintHead()
|
||||||
{
|
{
|
||||||
header.setCaption(LOCALE_BOUQUETLIST_HEAD);
|
CBEGlobals::paintHead(g_Locale->getText(LOCALE_BOUQUETLIST_HEAD), NEUTRINO_ICON_SETTINGS);
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const struct button_label CBEBouquetWidgetButtons[] =
|
const struct button_label CBEBouquetWidgetButtons[] =
|
||||||
|
@@ -142,13 +142,8 @@ void CBEChannelWidget::paintItems()
|
|||||||
|
|
||||||
void CBEChannelWidget::paintHead()
|
void CBEChannelWidget::paintHead()
|
||||||
{
|
{
|
||||||
header.setCaption(caption + (mode == CZapitClient::MODE_TV ? " - TV" : " - Radio"));
|
CBEGlobals::paintHead(caption + (mode == CZapitClient::MODE_TV ? " - TV" : " - Radio"),
|
||||||
header.setIcon(NULL); // trick the cc-header
|
mode == CZapitClient::MODE_TV ? NEUTRINO_ICON_VIDEO : NEUTRINO_ICON_AUDIO);
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const struct button_label CBEChannelWidgetButtons[] =
|
const struct button_label CBEChannelWidgetButtons[] =
|
||||||
|
@@ -126,13 +126,8 @@ void CBEChannelSelectWidget::paintItems()
|
|||||||
|
|
||||||
void CBEChannelSelectWidget::paintHead()
|
void CBEChannelSelectWidget::paintHead()
|
||||||
{
|
{
|
||||||
header.setCaption(caption + (mode == CZapitClient::MODE_TV ? " - TV" : " - Radio"));
|
CBEGlobals::paintHead(caption + (mode == CZapitClient::MODE_TV ? " - TV" : " - Radio"),
|
||||||
header.setIcon(NULL); // trick the cc-header
|
mode == CZapitClient::MODE_TV ? NEUTRINO_ICON_VIDEO : NEUTRINO_ICON_AUDIO);
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct button_label CBEChannelSelectButtons[] =
|
struct button_label CBEChannelSelectButtons[] =
|
||||||
|
@@ -135,3 +135,13 @@ void CBEGlobals::paintFoot(const size_t& label_count, const struct button_label
|
|||||||
footer.enableShadow(CC_SHADOW_ON, -1, true);
|
footer.enableShadow(CC_SHADOW_ON, -1, true);
|
||||||
footer.paintButtons(x, y + header_height + body_height, width, footer_height, label_count, content);
|
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);
|
||||||
|
}
|
||||||
|
@@ -56,6 +56,7 @@ class CBEGlobals
|
|||||||
unsigned int items_count;
|
unsigned int items_count;
|
||||||
int* timeout_ptr;
|
int* timeout_ptr;
|
||||||
|
|
||||||
|
void paintHead(const std::string& Caption, const char* Icon);
|
||||||
void paintBody();
|
void paintBody();
|
||||||
void paintFoot(const size_t& label_count, const struct button_label * const content);
|
void paintFoot(const size_t& label_count, const struct button_label * const content);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user