mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 23:42:58 +02:00
wdget/navibar: remove nb_lpic->doPaintBg(false), code format changes
doPaintBg is no more required
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
Copyright (C) 2001 by Steffen Hehn 'McClean'
|
||||
|
||||
Class for epg window navigation bar.
|
||||
Copyright (C) 2017-2018, Thilo Graf 'dbt'
|
||||
Copyright (C) 2017-2021, Thilo Graf 'dbt'
|
||||
|
||||
License: GPL
|
||||
|
||||
@@ -31,16 +31,19 @@
|
||||
using namespace std;
|
||||
|
||||
|
||||
CNaviBar::CNaviBar( const int& x_pos,
|
||||
const int& y_pos,
|
||||
const int& dx,
|
||||
const int& dy,
|
||||
CComponentsForm* parent,
|
||||
CNaviBar::CNaviBar( const int &x_pos,
|
||||
const int &y_pos,
|
||||
const int &dx,
|
||||
const int &dy,
|
||||
CComponentsForm *parent,
|
||||
int shadow_mode,
|
||||
fb_pixel_t& color_frame,
|
||||
fb_pixel_t& color_body,
|
||||
fb_pixel_t& color_shadow)
|
||||
: CComponentsFrmChain( x_pos, y_pos, dx, dy,
|
||||
fb_pixel_t &color_frame,
|
||||
fb_pixel_t &color_body,
|
||||
fb_pixel_t &color_shadow)
|
||||
: CComponentsFrmChain( x_pos,
|
||||
y_pos,
|
||||
dx,
|
||||
dy,
|
||||
NULL,
|
||||
CC_DIR_X,
|
||||
parent,
|
||||
@@ -50,7 +53,7 @@ CNaviBar::CNaviBar( const int& x_pos,
|
||||
color_shadow)
|
||||
{
|
||||
setCornerType(CORNER_NONE);
|
||||
enableColBodyGradient(g_settings.theme.infobar_gradient_bottom,COL_MENUFOOT_PLUS_0,g_settings.theme.infobar_gradient_bottom_direction);
|
||||
enableColBodyGradient(g_settings.theme.infobar_gradient_bottom, COL_MENUFOOT_PLUS_0, g_settings.theme.infobar_gradient_bottom_direction);
|
||||
set2ndColor(COL_MENUCONTENT_PLUS_0);
|
||||
|
||||
nb_lpic = nb_rpic = NULL;
|
||||
@@ -68,27 +71,24 @@ void CNaviBar::initCCItems()
|
||||
int mid_width = width * 40 / 100; // 40%
|
||||
int side_width = ((width - mid_width) / 2) - (2 * x_off);
|
||||
int h_text = height;
|
||||
int icon_h, icon_w;
|
||||
|
||||
// init left arrow
|
||||
if (!nb_lpic){
|
||||
nb_lpic = new CComponentsPicture(x_off,CC_CENTERED, CFrameBuffer::getInstance()->getIconPath(NEUTRINO_ICON_BUTTON_LEFT));
|
||||
nb_lpic->getRealSize(&icon_h, &icon_w);
|
||||
if ((icon_h + 2*OFFSET_INNER_MIN) > (height + 2*OFFSET_INNER_MIN))
|
||||
nb_lpic->setHeight(height - 2*OFFSET_INNER_MIN, true);
|
||||
nb_lpic->doPaintBg(false);
|
||||
if (!nb_lpic)
|
||||
{
|
||||
nb_lpic = new CComponentsPicture(x_off, CC_CENTERED, CFrameBuffer::getInstance()->getIconPath(NEUTRINO_ICON_BUTTON_LEFT));
|
||||
if ((nb_lpic->getHeight() + 2 * OFFSET_INNER_MIN) > (height + 2 * OFFSET_INNER_MIN))
|
||||
nb_lpic->setHeight(height - 2 * OFFSET_INNER_MIN);
|
||||
this->addCCItem(nb_lpic);
|
||||
nb_lpic->enableSaveBg();
|
||||
}
|
||||
nb_lpic->allowPaint(nb_lpic_enable);
|
||||
|
||||
// init right arrow
|
||||
if (!nb_rpic){
|
||||
nb_rpic = new CComponentsPicture(0,CC_CENTERED, CFrameBuffer::getInstance()->getIconPath(NEUTRINO_ICON_BUTTON_RIGHT));
|
||||
nb_rpic->getRealSize(&icon_h, &icon_w);
|
||||
if ((icon_h + 2*OFFSET_INNER_MIN) > (height + 2*OFFSET_INNER_MIN))
|
||||
nb_rpic->setHeight(height - 2*OFFSET_INNER_MIN, true);
|
||||
nb_rpic->doPaintBg(false);
|
||||
if (!nb_rpic)
|
||||
{
|
||||
nb_rpic = new CComponentsPicture(0, CC_CENTERED, CFrameBuffer::getInstance()->getIconPath(NEUTRINO_ICON_BUTTON_RIGHT));
|
||||
if ((nb_rpic->getHeight() + 2 * OFFSET_INNER_MIN) > (height + 2 * OFFSET_INNER_MIN))
|
||||
nb_rpic->setHeight(height - 2 * OFFSET_INNER_MIN);
|
||||
this->addCCItem(nb_rpic);
|
||||
nb_rpic->enableSaveBg();
|
||||
int x_pos = width - nb_rpic->getWidth() - x_off;
|
||||
@@ -97,7 +97,8 @@ void CNaviBar::initCCItems()
|
||||
nb_rpic->allowPaint(nb_rpic_enable);
|
||||
|
||||
// init text left
|
||||
if (!nb_lText){
|
||||
if (!nb_lText)
|
||||
{
|
||||
nb_lText = new CComponentsText(x_off + nb_lpic->getWidth() + x_off, CC_CENTERED, side_width, h_text, "", CTextBox::NO_AUTO_LINEBREAK, g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE], CComponentsText::FONT_STYLE_REGULAR, this, CC_SHADOW_OFF, COL_MENUHEAD_TEXT);
|
||||
nb_lText->doPaintBg(false);
|
||||
nb_lText->enableSaveBg();
|
||||
@@ -105,7 +106,8 @@ void CNaviBar::initCCItems()
|
||||
nb_lText->setText(nb_l_text, CTextBox::NO_AUTO_LINEBREAK, nb_font, COL_MENUHEAD_TEXT, CComponentsText::FONT_STYLE_REGULAR);
|
||||
|
||||
// init text right
|
||||
if (!nb_rText){
|
||||
if (!nb_rText)
|
||||
{
|
||||
nb_rText = new CComponentsText(0, CC_CENTERED, side_width, h_text, "", CTextBox::NO_AUTO_LINEBREAK | CTextBox::RIGHT, g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE], CComponentsText::FONT_STYLE_REGULAR, this, CC_SHADOW_OFF, COL_MENUHEAD_TEXT);
|
||||
nb_rText->doPaintBg(false);
|
||||
nb_rText->enableSaveBg();
|
||||
|
Reference in New Issue
Block a user