mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-03 02:41:12 +02:00
CComponentsExtTextForm: fix label width calculation
Origin commit data
------------------
Commit: 81cde4836f
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-03-15 (Wed, 15 Mar 2017)
This commit is contained in:
@@ -86,8 +86,7 @@ void CComponentsExtTextForm::initVarExtTextForm(const int& x_pos, const int& y_p
|
||||
width = w;
|
||||
//init ccx_label_width and ccx_text_width
|
||||
//default ccx_label_width = 30% of form width
|
||||
ccx_percent_label_w = DEF_LABEL_WIDTH_PERCENT;
|
||||
ccx_label_width = ccx_percent_label_w * width/100;
|
||||
ccx_label_width = DEF_LABEL_WIDTH_PERCENT * width/100;
|
||||
ccx_text_width = width-ccx_label_width;
|
||||
|
||||
height = h;
|
||||
@@ -223,7 +222,8 @@ void CComponentsExtTextForm::initCCTextItems()
|
||||
|
||||
void CComponentsExtTextForm::setLabelWidthPercent(const uint8_t& percent_val)
|
||||
{
|
||||
ccx_percent_label_w = (int)percent_val;
|
||||
ccx_label_width = (int)percent_val * width/100;
|
||||
ccx_text_width = width-ccx_label_width;
|
||||
initCCTextItems();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user