CComponentsHeader: unifiy init value for logo align

Origin commit data
------------------
Commit: 220829ffaa
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-04-24 (Mon, 24 Apr 2017)
This commit is contained in:
2017-04-24 08:00:36 +02:00
parent 61ab5b55b9
commit 0093ff1d3c
2 changed files with 4 additions and 2 deletions

View File

@@ -128,7 +128,7 @@ void CComponentsHeader::initVarHeader( const int& x_pos, const int& y_pos, const
cch_logo.Id = 0;
cch_logo.Name = "";
cch_logo.dy_max = -1;
cch_logo.Align = CC_LOGO_RIGHT;
cch_logo.Align = DEFAULT_LOGO_ALIGN;
cch_col_text = COL_MENUHEAD_TEXT;
cch_caption_align = CTextBox::NO_AUTO_LINEBREAK;
cch_items_y = CC_CENTERED;

View File

@@ -32,6 +32,8 @@
#include "cc_frm_clock.h"
#include <driver/colorgradient.h>
#define DEFAULT_LOGO_ALIGN CComponentsHeader::CC_LOGO_CENTER
//! Sub class of CComponentsForm. Shows a header with prepared items.
/*!
CComponentsHeader provides prepared items like icon, caption and context button icons, mostly for usage in menues or simple windows
@@ -320,7 +322,7 @@ class CComponentsHeader : public CComponentsForm, public CCTextScreen
*/
void setChannelLogo( const uint64_t& channelId,
const std::string& channelName,
cc_logo_alignment_t alignment = CC_LOGO_CENTER,
cc_logo_alignment_t alignment = DEFAULT_LOGO_ALIGN,
const int& dy = -1)
{cch_logo.Id = channelId; cch_logo.Name = channelName, cch_logo.Align = alignment, cch_logo.dy_max = dy; initCCItems();}
/**Methode to get channel logo object for direct access to its properties and methodes