mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 00:11:08 +02:00
CComponentsWindow: prepare possibility to change footer height
Origin commit data
------------------
Commit: 013cd1f2cc
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-10-14 (Fri, 14 Oct 2016)
This commit is contained in:
@@ -126,6 +126,7 @@ void CComponentsWindow::initVarWindow( const int& x_pos, const int& y_pos, const
|
|||||||
y = y_pos;
|
y = y_pos;
|
||||||
width = w;
|
width = w;
|
||||||
height = h;
|
height = h;
|
||||||
|
ccw_h_footer = 0; //auto
|
||||||
initWindowSize();
|
initWindowSize();
|
||||||
initWindowPos();
|
initWindowPos();
|
||||||
|
|
||||||
@@ -216,6 +217,8 @@ void CComponentsWindow::initFooter()
|
|||||||
//add of footer item happens initCCWItems()
|
//add of footer item happens initCCWItems()
|
||||||
//set footer properties
|
//set footer properties
|
||||||
if (ccw_footer){
|
if (ccw_footer){
|
||||||
|
if (ccw_h_footer)
|
||||||
|
ccw_footer->setHeight(ccw_h_footer);
|
||||||
ccw_footer->setPos(0, cc_yr + height - ccw_footer->getHeight()- fr_thickness);
|
ccw_footer->setPos(0, cc_yr + height - ccw_footer->getHeight()- fr_thickness);
|
||||||
ccw_footer->setWidth(width-2*fr_thickness);
|
ccw_footer->setWidth(width-2*fr_thickness);
|
||||||
ccw_footer->enableShadow(false/*shadow*/);
|
ccw_footer->enableShadow(false/*shadow*/);
|
||||||
@@ -291,10 +294,10 @@ void CComponentsWindow::initBody()
|
|||||||
int h_body = height - h_header - h_footer - fr_thickness;
|
int h_body = height - h_header - h_footer - fr_thickness;
|
||||||
int x_body = w_l_sidebar;
|
int x_body = w_l_sidebar;
|
||||||
int w_body = width-2*fr_thickness - w_l_sidebar - w_r_sidebar;
|
int w_body = width-2*fr_thickness - w_l_sidebar - w_r_sidebar;
|
||||||
|
|
||||||
ccw_body->setDimensionsAll(x_body, h_header, w_body, h_body);
|
ccw_body->setDimensionsAll(x_body, h_header, w_body, h_body);
|
||||||
ccw_body->doPaintBg(true);
|
ccw_body->doPaintBg(true);
|
||||||
|
|
||||||
//handle corner behavior
|
//handle corner behavior
|
||||||
if (!ccw_show_header)
|
if (!ccw_show_header)
|
||||||
ccw_body->setCornerType(CORNER_TOP);
|
ccw_body->setCornerType(CORNER_TOP);
|
||||||
|
@@ -89,6 +89,8 @@ class CComponentsWindow : public CComponentsForm
|
|||||||
fb_pixel_t ccw_col_head_text;
|
fb_pixel_t ccw_col_head_text;
|
||||||
///footer bg color
|
///footer bg color
|
||||||
fb_pixel_t ccw_col_footer;
|
fb_pixel_t ccw_col_footer;
|
||||||
|
///footer heigh, default defined by footer object itself
|
||||||
|
int ccw_h_footer;
|
||||||
///footer button font
|
///footer button font
|
||||||
Font* ccw_button_font;
|
Font* ccw_button_font;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user