- bouquetlist: add shadow to gui-elements; simplify footer handling

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2017-06-19 17:01:47 +02:00
committed by Thilo Graf
parent 000edc2942
commit df46c1d6da

View File

@@ -619,7 +619,7 @@ int CBouquetList::show(bool bShowChannelList)
void CBouquetList::hide() void CBouquetList::hide()
{ {
frameBuffer->paintBackgroundBoxRel(x, y, width, height); frameBuffer->paintBackgroundBoxRel(x, y, width + OFFSET_SHADOW, height + OFFSET_SHADOW);
CInfoClock::getInstance()->enableInfoClock(!CInfoClock::getInstance()->isBlocked()); CInfoClock::getInstance()->enableInfoClock(!CInfoClock::getInstance()->isBlocked());
} }
@@ -701,6 +701,7 @@ void CBouquetList::paintHead()
{ {
std::string icon(""); std::string icon("");
CComponentsHeader header(x, y, width, header_height, name, icon, CComponentsHeader::CC_BTN_LEFT | CComponentsHeader::CC_BTN_RIGHT | CComponentsHeader::CC_BTN_MENU); CComponentsHeader header(x, y, width, header_height, name, icon, CComponentsHeader::CC_BTN_LEFT | CComponentsHeader::CC_BTN_RIGHT | CComponentsHeader::CC_BTN_MENU);
header.enableShadow( CC_SHADOW_RIGHT | CC_SHADOW_CORNER_TOP_RIGHT | CC_SHADOW_CORNER_BOTTOM_RIGHT, -1, true);
header.paint(CC_SAVE_SCREEN_NO); header.paint(CC_SAVE_SCREEN_NO);
} }
@@ -721,18 +722,12 @@ void CBouquetList::paint()
frameBuffer->paintBoxRel(x, y + header_height, width, height - header_height - footer_height, COL_MENUCONTENT_PLUS_0); frameBuffer->paintBoxRel(x, y + header_height, width, height - header_height - footer_height, COL_MENUCONTENT_PLUS_0);
int numButtons = sizeof(CBouquetListButtons)/sizeof(CBouquetListButtons[0]); // no buttons in favonly mode
int numButtons = (favonly) ? 0 : sizeof(CBouquetListButtons)/sizeof(CBouquetListButtons[0]);
if (favonly) CComponentsFooter footer;
{ footer.enableShadow(CC_SHADOW_ON, -1, true);
// show an empty footer footer.paintButtons(x, y + height - footer_height, width, footer_height, numButtons, CBouquetListButtons);
frameBuffer->paintBoxRel(x, y + height - footer_height, width, footer_height, COL_MENUFOOT_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM);
}
else
{
CComponentsFooter footer;
footer.paintButtons(x, y + height - footer_height, width, footer_height, numButtons, CBouquetListButtons);
}
if (!Bouquets.empty()) if (!Bouquets.empty())
{ {
@@ -745,6 +740,5 @@ void CBouquetList::paint()
int total_pages; int total_pages;
int current_page; int current_page;
getScrollBarData(&total_pages, &current_page, Bouquets.size(), listmaxshow, selected); getScrollBarData(&total_pages, &current_page, Bouquets.size(), listmaxshow, selected);
paintScrollBar(x + width - SCROLLBAR_WIDTH, y + header_height, SCROLLBAR_WIDTH, item_height*listmaxshow, total_pages, current_page, CC_SHADOW_ON);
paintScrollBar(x + width - SCROLLBAR_WIDTH, y + header_height, SCROLLBAR_WIDTH, item_height*listmaxshow, total_pages, current_page);
} }