mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-26 23:13:13 +02:00
hintbox.cpp: fix scale of box width
This commit is contained in:
@@ -131,6 +131,7 @@ CHintBox::CHintBox( const char * const Caption,
|
|||||||
|
|
||||||
void CHintBox::init(const std::string& Text, const int& Width, const std::string& Picon, const int& header_buttons, const int& text_mode, const int& indent)
|
void CHintBox::init(const std::string& Text, const int& Width, const std::string& Picon, const int& header_buttons, const int& text_mode, const int& indent)
|
||||||
{
|
{
|
||||||
|
int _Width = frameBuffer->scale2Res(Width);
|
||||||
timeout = HINTBOX_DEFAULT_TIMEOUT;
|
timeout = HINTBOX_DEFAULT_TIMEOUT;
|
||||||
w_indentation = indent;
|
w_indentation = indent;
|
||||||
|
|
||||||
@@ -146,7 +147,7 @@ void CHintBox::init(const std::string& Text, const int& Width, const std::string
|
|||||||
showHeader(false);
|
showHeader(false);
|
||||||
|
|
||||||
//set required window width and basic height, consider existent header instance and its caption width
|
//set required window width and basic height, consider existent header instance and its caption width
|
||||||
width = getMaxWidth(Text, ccw_caption, hb_font, Width);
|
width = getMaxWidth(Text, ccw_caption, hb_font, _Width);
|
||||||
height = max(HINTBOX_MIN_HEIGHT, min(HINTBOX_MAX_HEIGHT, height));
|
height = max(HINTBOX_MIN_HEIGHT, min(HINTBOX_MAX_HEIGHT, height));
|
||||||
|
|
||||||
ccw_buttons = header_buttons;
|
ccw_buttons = header_buttons;
|
||||||
|
Reference in New Issue
Block a user