bedit: move paintBody() into base class

Avoids multiple code parts
This commit is contained in:
2017-10-12 12:26:02 +02:00
parent 53293ba49d
commit 61a29f061a
8 changed files with 10 additions and 18 deletions

View File

@@ -135,11 +135,6 @@ void CBEBouquetWidget::paintItems()
paintScrollBar(x + width - SCROLLBAR_WIDTH, y + header_height, SCROLLBAR_WIDTH, body_height, total_pages, current_page);
}
void CBEBouquetWidget::paintBody()
{
PaintBoxRel(x, y + header_height, width, body_height, COL_MENUCONTENT_PLUS_0, RADIUS_NONE, CORNER_NONE, CC_SHADOW_ON);
}
void CBEBouquetWidget::paintHead()
{
header.setCaption(LOCALE_BOUQUETLIST_HEAD);

View File

@@ -64,7 +64,7 @@ class CBEBouquetWidget : public CBEGlobals, public CMenuTarget, public CListHelp
bool bouquetsChanged;
void paintHead();
void paintBody();
void paintItem(int pos);
void paintItems();
void paintFoot();

View File

@@ -140,11 +140,6 @@ void CBEChannelWidget::paintItems()
paintScrollBar(x + width - SCROLLBAR_WIDTH, y + header_height, SCROLLBAR_WIDTH, body_height, total_pages, current_page);
}
void CBEChannelWidget::paintBody()
{
PaintBoxRel(x, y + header_height, width, body_height, COL_MENUCONTENT_PLUS_0, RADIUS_NONE, CORNER_NONE, CC_SHADOW_ON);
}
void CBEChannelWidget::paintHead()
{
header.setCaption(caption + (mode == CZapitClient::MODE_TV ? " - TV" : " - Radio"));

View File

@@ -57,7 +57,7 @@ class CBEChannelWidget : public CBEGlobals, public CMenuTarget, public CListHelp
unsigned int bouquet;
void paintHead();
void paintBody();
void paintItem(int pos);
void paintItems();
void paintFoot();

View File

@@ -124,11 +124,6 @@ void CBEChannelSelectWidget::paintItems()
paintScrollBar(x + width - SCROLLBAR_WIDTH, y + header_height, SCROLLBAR_WIDTH, body_height, total_pages, current_page);
}
void CBEChannelSelectWidget::paintBody()
{
PaintBoxRel(x, y + header_height, width, body_height, COL_MENUCONTENT_PLUS_0, RADIUS_NONE, CORNER_NONE, CC_SHADOW_ON);
}
void CBEChannelSelectWidget::paintHead()
{
header.setCaption(caption + (mode == CZapitClient::MODE_TV ? " - TV" : " - Radio"));

View File

@@ -57,7 +57,7 @@ class CBEChannelSelectWidget : public CBEGlobals, public CMenuTarget, public CLi
std::string caption;
void paintHead();
void paintBody();
void paintItem(int pos);
void paintItems();
void paintFoot();

View File

@@ -109,6 +109,11 @@ void CBEGlobals::paintDetails(int pos, int current)
}
}
void CBEGlobals::paintBody()
{
PaintBoxRel(x, y + header_height, width, body_height, COL_MENUCONTENT_PLUS_0, RADIUS_NONE, CORNER_NONE, CC_SHADOW_ON);
}
void CBEGlobals::hide()
{
frameBuffer->paintBackgroundBoxRel(x, y, width + OFFSET_SHADOW, height + OFFSET_SHADOW);

View File

@@ -56,6 +56,8 @@ class CBEGlobals
unsigned int items_count;
int timeout;
void paintBody();
virtual std::string getInfoText(int index) = 0;
void paintDetails(int pos, int current);
void killDetails();