- navibar: add small separator line to the bottom

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2022-01-15 15:46:57 +01:00
committed by Thilo Graf
parent 690df910d2
commit c7accb37ae
2 changed files with 11 additions and 2 deletions

View File

@@ -60,6 +60,7 @@ CNaviBar::CNaviBar( const int &x_pos,
nb_lText = nb_rText = NULL;
nb_font = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE];
nb_topline = NULL;
nb_bottomline = NULL;
nb_lpic_enable = nb_rpic_enable = false;
nb_l_text = nb_r_text = string();
@@ -73,10 +74,11 @@ void CNaviBar::initCCItems()
int side_width = ((width - mid_width) / 2) - (2 * x_off);
int h_text = height;
// small separator line on the top
int grad = g_settings.theme.menu_Separator_gradient_enable ? CC_COLGRAD_COL_DARK_LIGHT_DARK : CC_COLGRAD_OFF;
// small separator line on the top
if (!nb_topline)
nb_topline = new CComponentsShapeSquare(0, 0, width, 2, this, CC_SHADOW_OFF);
nb_topline = new CComponentsShapeSquare(0, 0, width, FRAME_WIDTH_MIN, this, CC_SHADOW_OFF);
nb_topline->setColorBody(COL_MENUCONTENT_PLUS_1);
nb_topline->setColBodyGradient(grad, CFrameBuffer::gradientHorizontal, COL_MENUCONTENT_PLUS_0, CColorGradient::light);
@@ -122,6 +124,12 @@ void CNaviBar::initCCItems()
}
nb_rText->setText(nb_r_text, CTextBox::NO_AUTO_LINEBREAK | CTextBox::RIGHT, nb_font);
nb_rText->setXPos(nb_rpic->getXPos() - x_off - nb_rText->getWidth());
// small separator line on the bottom
if (!nb_bottomline)
nb_bottomline = new CComponentsShapeSquare(0, height - FRAME_WIDTH_MIN, width, FRAME_WIDTH_MIN, this, CC_SHADOW_OFF);
nb_bottomline->setColorBody(COL_MENUCONTENT_PLUS_1);
nb_bottomline->setColBodyGradient(grad, CFrameBuffer::gradientHorizontal, COL_MENUCONTENT_PLUS_0, CColorGradient::light);
}

View File

@@ -41,6 +41,7 @@ class CNaviBar : public CComponentsFrmChain
CComponentsPicture *nb_lpic, *nb_rpic;
CComponentsText *nb_lText, *nb_rText;
CComponentsShapeSquare *nb_topline;
CComponentsShapeSquare *nb_bottomline;
Font *nb_font;
bool nb_lpic_enable;