mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
*CBEChannelSelectWidget: remove old detail line handing
add dline instance from CComponentsDetailsLine
This commit is contained in:
@@ -72,6 +72,16 @@ CBEChannelSelectWidget::CBEChannelSelectWidget(const std::string & Caption, unsi
|
|||||||
ButtonHeight = std::max(footerHeight, icol_h+4);
|
ButtonHeight = std::max(footerHeight, icol_h+4);
|
||||||
|
|
||||||
liststart = 0;
|
liststart = 0;
|
||||||
|
bouquetChannels = NULL;
|
||||||
|
dline = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
CBEChannelSelectWidget::~CBEChannelSelectWidget()
|
||||||
|
{
|
||||||
|
// clear details line
|
||||||
|
if (dline != NULL)
|
||||||
|
dline->hide();
|
||||||
|
delete dline;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint CBEChannelSelectWidget::getItemCount()
|
uint CBEChannelSelectWidget::getItemCount()
|
||||||
@@ -222,30 +232,21 @@ void CBEChannelSelectWidget::paintItem2DetailsLine (int pos, int /*ch_index*/)
|
|||||||
int ypos1a = ypos1 + (fheight/2)-2;
|
int ypos1a = ypos1 + (fheight/2)-2;
|
||||||
int ypos2a = ypos2 + (info_height/2)-2;
|
int ypos2a = ypos2 + (info_height/2)-2;
|
||||||
fb_pixel_t col1 = COL_MENUCONTENT_PLUS_6;
|
fb_pixel_t col1 = COL_MENUCONTENT_PLUS_6;
|
||||||
fb_pixel_t col2 = COL_MENUCONTENT_PLUS_1;
|
|
||||||
|
|
||||||
// Clear
|
// clear details line
|
||||||
frameBuffer->paintBackgroundBoxRel(xpos,y, ConnectLineBox_Width, height+info_height);
|
if (dline != NULL)
|
||||||
|
dline->hide();
|
||||||
|
|
||||||
// paint Line if detail info (and not valid list pos)
|
// paint Line if detail info (and not valid list pos)
|
||||||
if (pos >= 0)
|
if (pos >= 0)
|
||||||
{
|
{
|
||||||
int fh = fheight > 10 ? fheight - 10: 5;
|
if (dline == NULL)
|
||||||
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-4, ypos1+5, 4, fh, col1);
|
dline = new CComponentsDetailLine(xpos, ypos1a, ypos2a, fheight/2+1, info_height-RADIUS_LARGE*2);
|
||||||
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-4, ypos1+5, 1, fh, col2);
|
dline->setYPos(ypos1a);
|
||||||
|
dline->paint();
|
||||||
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-4, ypos2+7, 4,info_height-14, col1);
|
|
||||||
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-4, ypos2+7, 1,info_height-14, col2);
|
|
||||||
|
|
||||||
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16, ypos1a, 4,ypos2a-ypos1a, col1);
|
|
||||||
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16, ypos1a, 1,ypos2a-ypos1a+4, col2);
|
|
||||||
|
|
||||||
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16, ypos1a, 12,4, col1);
|
|
||||||
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16, ypos1a, 12,1, col2);
|
|
||||||
|
|
||||||
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16, ypos2a, 12,4, col1);
|
|
||||||
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-12, ypos2a, 8,1, col2);
|
|
||||||
|
|
||||||
|
//info box frame
|
||||||
frameBuffer->paintBoxFrame(x, ypos2, width, info_height, 2, col1, RADIUS_LARGE);
|
frameBuffer->paintBoxFrame(x, ypos2, width, info_height, 2, col1, RADIUS_LARGE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
#include <driver/framebuffer.h>
|
#include <driver/framebuffer.h>
|
||||||
#include <gui/widget/listbox.h>
|
#include <gui/widget/listbox.h>
|
||||||
|
#include <gui/widget/components.h>
|
||||||
#include <zapit/client/zapitclient.h>
|
#include <zapit/client/zapitclient.h>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
@@ -48,6 +48,7 @@ class CBEChannelSelectWidget : public CListBox
|
|||||||
unsigned int bouquet;
|
unsigned int bouquet;
|
||||||
CZapitClient::channelsMode mode;
|
CZapitClient::channelsMode mode;
|
||||||
bool isChannelInBouquet( int index);
|
bool isChannelInBouquet( int index);
|
||||||
|
CComponentsDetailLine *dline;
|
||||||
|
|
||||||
uint getItemCount();
|
uint getItemCount();
|
||||||
void paintItem(uint32_t itemNr, int paintNr, bool selected);
|
void paintItem(uint32_t itemNr, int paintNr, bool selected);
|
||||||
@@ -64,6 +65,7 @@ class CBEChannelSelectWidget : public CListBox
|
|||||||
ZapitChannelList * bouquetChannels;
|
ZapitChannelList * bouquetChannels;
|
||||||
|
|
||||||
CBEChannelSelectWidget(const std::string & Caption, unsigned int Bouquet, CZapitClient::channelsMode Mode);
|
CBEChannelSelectWidget(const std::string & Caption, unsigned int Bouquet, CZapitClient::channelsMode Mode);
|
||||||
|
~CBEChannelSelectWidget();
|
||||||
int exec(CMenuTarget* parent, const std::string & actionKey);
|
int exec(CMenuTarget* parent, const std::string & actionKey);
|
||||||
bool hasChanged();
|
bool hasChanged();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user