mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 23:42:51 +02:00
CHintBox: add space for timeout bar
Origin commit data
------------------
Commit: c035b2fc15
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-10-13 (Thu, 13 Oct 2016)
This commit is contained in:
@@ -180,7 +180,7 @@ void CHintBox::showTimeOutBar()
|
|||||||
timeout_pb->setValues(timeout_pb->getValue()+1, timeout);
|
timeout_pb->setValues(timeout_pb->getValue()+1, timeout);
|
||||||
}else{
|
}else{
|
||||||
timeout_pb = new CProgressBar();
|
timeout_pb = new CProgressBar();
|
||||||
timeout_pb->setDimensionsAll(ccw_body->getRealXPos(), ccw_body->getRealYPos(), ccw_body->getWidth(), 8);
|
timeout_pb->setDimensionsAll(ccw_body->getRealXPos(), ccw_body->getRealYPos(), ccw_body->getWidth(), TIMEOUT_BAR_HEIGHT);
|
||||||
timeout_pb->setValues(0, timeout);
|
timeout_pb->setValues(0, timeout);
|
||||||
if (!timeout_pb_timer)
|
if (!timeout_pb_timer)
|
||||||
timeout_pb_timer = new CComponentsTimer(1);
|
timeout_pb_timer = new CComponentsTimer(1);
|
||||||
@@ -253,7 +253,7 @@ void CHintBox::addHintItem(const std::string& Text, const int& text_mode, const
|
|||||||
int h_line = font->getHeight();
|
int h_line = font->getHeight();
|
||||||
|
|
||||||
//init side picon object
|
//init side picon object
|
||||||
CComponentsPicture *obj_picon = new CComponentsPicture(0, 0, Picon);
|
CComponentsPicture *obj_picon = new CComponentsPicture(0, timeout > 0 ? TIMEOUT_BAR_HEIGHT : 0, Picon);
|
||||||
obj_picon->doPaintBg(false);
|
obj_picon->doPaintBg(false);
|
||||||
obj_picon->SetTransparent(CFrameBuffer::TM_BLACK);
|
obj_picon->SetTransparent(CFrameBuffer::TM_BLACK);
|
||||||
int w_picon = obj_picon->getWidth();
|
int w_picon = obj_picon->getWidth();
|
||||||
@@ -263,7 +263,7 @@ void CHintBox::addHintItem(const std::string& Text, const int& text_mode, const
|
|||||||
int w_text_obj = obj_content->getWidth() - w_picon - w_indentation;
|
int w_text_obj = obj_content->getWidth() - w_picon - w_indentation;
|
||||||
int h_text_obj = max(h_line, obj_picon->getHeight());
|
int h_text_obj = max(h_line, obj_picon->getHeight());
|
||||||
CComponentsText *obj_text = new CComponentsText(x_text_obj,
|
CComponentsText *obj_text = new CComponentsText(x_text_obj,
|
||||||
0,
|
timeout > 0 ? TIMEOUT_BAR_HEIGHT : 0,
|
||||||
w_text_obj,
|
w_text_obj,
|
||||||
h_text_obj,
|
h_text_obj,
|
||||||
Text,
|
Text,
|
||||||
|
@@ -40,6 +40,7 @@
|
|||||||
#define W_FRAME std::max(HINTBOX_MIN_WIDTH, HINTBOX_MIN_HEIGHT) * 2/100
|
#define W_FRAME std::max(HINTBOX_MIN_WIDTH, HINTBOX_MIN_HEIGHT) * 2/100
|
||||||
//frame color around hint/message box
|
//frame color around hint/message box
|
||||||
#define HINTBOX_DEFAULT_FRAME_COLOR COL_FRAME
|
#define HINTBOX_DEFAULT_FRAME_COLOR COL_FRAME
|
||||||
|
#define TIMEOUT_BAR_HEIGHT OFFSET_SHADOW/2
|
||||||
|
|
||||||
//! Sub class of CComponentsWindow. Shows a window as a hintbox with text and optional icon beside of text.
|
//! Sub class of CComponentsWindow. Shows a window as a hintbox with text and optional icon beside of text.
|
||||||
/*!
|
/*!
|
||||||
|
Reference in New Issue
Block a user