mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 09:21:09 +02:00
CDBoxInfoWidget: remove superfluous paint of header
Origin commit data
------------------
Branch: ni/coolstream
Commit: d8e3ecfa1d
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-03-22 (Tue, 22 Mar 2016)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
#include <libgen.h>
|
||||
|
||||
#include <gui/dboxinfo.h>
|
||||
#include <gui/components/cc.h>
|
||||
|
||||
|
||||
#include <global.h>
|
||||
#include <neutrino.h>
|
||||
@@ -74,7 +74,7 @@ CDBoxInfoWidget::CDBoxInfoWidget()
|
||||
height = 0;
|
||||
x = 0;
|
||||
y = 0;
|
||||
|
||||
header = NULL;
|
||||
fontWidth = fm->getWidth();
|
||||
sizeWidth = 6 * fm->getMaxDigitWidth()
|
||||
+ fm->getRenderWidth(std::string(" MiB") + g_Locale->getText(LOCALE_UNIT_DECIMAL)); ;//9999.99 MiB
|
||||
@@ -83,6 +83,12 @@ CDBoxInfoWidget::CDBoxInfoWidget()
|
||||
nameWidth = fontWidth * 17;
|
||||
}
|
||||
|
||||
CDBoxInfoWidget::~CDBoxInfoWidget()
|
||||
{
|
||||
delete header;
|
||||
header = NULL;
|
||||
}
|
||||
|
||||
int CDBoxInfoWidget::exec(CMenuTarget* parent, const std::string &)
|
||||
{
|
||||
if (parent)
|
||||
@@ -166,6 +172,7 @@ int CDBoxInfoWidget::exec(CMenuTarget* parent, const std::string &)
|
||||
|
||||
void CDBoxInfoWidget::hide()
|
||||
{
|
||||
header->kill();
|
||||
frameBuffer->paintBackgroundBoxRel(x,y, width,height);
|
||||
frameBuffer->blit();
|
||||
}
|
||||
@@ -360,8 +367,10 @@ void CDBoxInfoWidget::paint()
|
||||
width = max(width, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getRenderWidth(title, true) + 50);
|
||||
x = getScreenStartX(width);
|
||||
|
||||
CComponentsHeader header(x, ypos, width, hheight, title, NEUTRINO_ICON_SHELL);
|
||||
header.paint(CC_SAVE_SCREEN_NO);
|
||||
if (!header)
|
||||
header = new CComponentsHeader(x, ypos, width, hheight, title, NEUTRINO_ICON_SHELL);
|
||||
if (!header->isPainted())
|
||||
header->paint(CC_SAVE_SCREEN_NO);
|
||||
|
||||
//paint body
|
||||
frameBuffer->paintBoxRel(x, ypos+ hheight, width, height- hheight, COL_MENUCONTENT_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM);
|
||||
|
@@ -36,6 +36,7 @@
|
||||
#include <gui/widget/menue.h>
|
||||
#include <driver/framebuffer.h>
|
||||
#include <driver/fontrenderer.h>
|
||||
#include <gui/components/cc.h>
|
||||
#include <string>
|
||||
|
||||
class CDBoxInfoWidget : public CMenuTarget
|
||||
@@ -54,12 +55,13 @@ class CDBoxInfoWidget : public CMenuTarget
|
||||
int nameWidth;
|
||||
|
||||
void paint();
|
||||
|
||||
CComponentsHeader *header;
|
||||
Font *fm, *ft;
|
||||
|
||||
public:
|
||||
|
||||
CDBoxInfoWidget();
|
||||
~CDBoxInfoWidget();
|
||||
|
||||
void hide();
|
||||
int exec(CMenuTarget* parent, const std::string & actionKey);
|
||||
|
Reference in New Issue
Block a user