header/footer: add overloaded versions of header class with size mode option

Size mode didn't really work. It is easier to implement
headers with with separate class constructor and other size mode
Footer works also with this  additional parameter but without additional
overloaded constructors.
This commit is contained in:
2019-04-02 16:34:56 +02:00
parent 714df8b092
commit 1c574e4a07
4 changed files with 95 additions and 53 deletions

View File

@@ -50,7 +50,9 @@ class CComponentsFooter : public CComponentsHeader, public CCButtonSelect
int shadow_mode,
fb_pixel_t color_frame,
fb_pixel_t color_body,
fb_pixel_t color_shadow );
fb_pixel_t color_shadow,
int sizeMode
);
///show button with background, default false
bool ccf_enable_button_bg;
@@ -77,7 +79,8 @@ class CComponentsFooter : public CComponentsHeader, public CCButtonSelect
int shadow_mode = CC_SHADOW_OFF,
fb_pixel_t color_frame = COL_FRAME_PLUS_0,
fb_pixel_t color_body = COL_MENUFOOT_PLUS_0,
fb_pixel_t color_shadow = COL_SHADOW_PLUS_0);
fb_pixel_t color_shadow = COL_SHADOW_PLUS_0,
int sizeMode = CC_HEADER_SIZE_LARGE);
///add button labels with string label type as content, count as size_t, chain_width as int, label width as int
void setButtonLabels(const struct button_label_cc * const content, const size_t& label_count, const int& chain_width = 0, const int& label_width = 0);