mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
CProgressWindow: optimize fontsize handling
- minimal size is now 14 instead 20, changed scale settings now should be noticed earlier - font type is now bold - arrangement of progressbars adapted
This commit is contained in:
@@ -52,7 +52,8 @@ void CProgressWindow::Init()
|
|||||||
int y_item = 10;
|
int y_item = 10;
|
||||||
setWidthP(75);
|
setWidthP(75);
|
||||||
int w_item = width-2*x_item;
|
int w_item = width-2*x_item;
|
||||||
int h_item = 20;
|
int h_item = 14;
|
||||||
|
int h_pbar = 20;
|
||||||
w_bar_frame = 0;
|
w_bar_frame = 0;
|
||||||
|
|
||||||
//create status text object
|
//create status text object
|
||||||
@@ -61,27 +62,27 @@ void CProgressWindow::Init()
|
|||||||
status_txt->setDimensionsAll(x_item, y_item, w_item, h_txt);
|
status_txt->setDimensionsAll(x_item, y_item, w_item, h_txt);
|
||||||
status_txt->setColorBody(col_body);
|
status_txt->setColorBody(col_body);
|
||||||
addWindowItem(status_txt);
|
addWindowItem(status_txt);
|
||||||
y_item += 2*h_item;
|
y_item += h_txt;
|
||||||
|
|
||||||
//create local_bar object
|
//create local_bar object
|
||||||
local_bar = new CProgressBar();
|
local_bar = new CProgressBar();
|
||||||
local_bar->setDimensionsAll(x_item, y_item, w_item, h_item);
|
local_bar->setDimensionsAll(x_item, y_item, w_item, h_pbar);
|
||||||
local_bar->setColorBody(col_body);
|
local_bar->setColorBody(col_body);
|
||||||
local_bar->setActiveColor(COL_MENUCONTENT_PLUS_7);
|
local_bar->setActiveColor(COL_MENUCONTENT_PLUS_7);
|
||||||
local_bar->setFrameThickness(w_bar_frame);
|
local_bar->setFrameThickness(w_bar_frame);
|
||||||
local_bar->setColorFrame(COL_MENUCONTENT_PLUS_7);
|
local_bar->setColorFrame(COL_MENUCONTENT_PLUS_7);
|
||||||
addWindowItem(local_bar);
|
addWindowItem(local_bar);
|
||||||
y_item += 2*h_item;
|
y_item += 2*h_pbar;
|
||||||
|
|
||||||
//create global_bar object
|
//create global_bar object
|
||||||
global_bar = new CProgressBar();
|
global_bar = new CProgressBar();
|
||||||
global_bar->setDimensionsAll(x_item, y_item, w_item, h_item);
|
global_bar->setDimensionsAll(x_item, y_item, w_item, h_pbar);
|
||||||
global_bar->setColorBody(col_body);
|
global_bar->setColorBody(col_body);
|
||||||
global_bar->setActiveColor(COL_MENUCONTENT_PLUS_7);
|
global_bar->setActiveColor(COL_MENUCONTENT_PLUS_7);
|
||||||
global_bar->setFrameThickness(w_bar_frame);
|
global_bar->setFrameThickness(w_bar_frame);
|
||||||
global_bar->setColorFrame(COL_MENUCONTENT_PLUS_7);
|
global_bar->setColorFrame(COL_MENUCONTENT_PLUS_7);
|
||||||
addWindowItem(global_bar);
|
addWindowItem(global_bar);
|
||||||
y_item += 2*h_item;
|
y_item += 2*h_pbar;
|
||||||
|
|
||||||
height = y_item + ccw_head->getHeight() + 10;
|
height = y_item + ccw_head->getHeight() + 10;
|
||||||
|
|
||||||
@@ -133,7 +134,7 @@ void CProgressWindow::showStatusMessageUTF(const std::string & text)
|
|||||||
string txt = text;
|
string txt = text;
|
||||||
int w_txt = status_txt->getWidth();
|
int w_txt = status_txt->getWidth();
|
||||||
int h_txt = status_txt->getHeight();
|
int h_txt = status_txt->getHeight();
|
||||||
status_txt->setText(txt, CTextBox::CENTER, *CNeutrinoFonts::getInstance()->getDynFont(w_txt, h_txt, txt), COL_MENUCONTENT_TEXT);
|
status_txt->setText(txt, CTextBox::CENTER, *CNeutrinoFonts::getInstance()->getDynFont(w_txt, h_txt, txt, CNeutrinoFonts::FONT_STYLE_BOLD), COL_MENUCONTENT_TEXT);
|
||||||
|
|
||||||
status_txt->paint(false);
|
status_txt->paint(false);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user