mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 17:01:15 +02:00
* CHintBoxExt: Fix view of multiple pages
- Reduces flicker effect on screen
This commit is contained in:
@@ -108,6 +108,7 @@ void CHintBoxExt::init(const neutrino_locale_t Caption, const int Width, const c
|
|||||||
int maxLineWidth = 0;
|
int maxLineWidth = 0;
|
||||||
int scrollWidth = 0;
|
int scrollWidth = 0;
|
||||||
textStartX = 0;
|
textStartX = 0;
|
||||||
|
bgPainted = false;
|
||||||
|
|
||||||
m_caption = Caption;
|
m_caption = Caption;
|
||||||
|
|
||||||
@@ -147,6 +148,11 @@ void CHintBoxExt::init(const neutrino_locale_t Caption, const int Width, const c
|
|||||||
m_maxEntriesPerPage = m_startEntryOfPage[page] - m_startEntryOfPage[page-1];
|
m_maxEntriesPerPage = m_startEntryOfPage[page] - m_startEntryOfPage[page-1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
if (m_height > maxOverallHeight)
|
||||||
|
maxOverallHeight = m_height;
|
||||||
|
m_maxEntriesPerPage = maxOverallHeight / m_fheight;
|
||||||
|
}
|
||||||
line++;
|
line++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -209,6 +215,7 @@ void CHintBoxExt::paint(bool toround)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bgPainted = false;
|
||||||
CFrameBuffer* frameBuffer = CFrameBuffer::getInstance();
|
CFrameBuffer* frameBuffer = CFrameBuffer::getInstance();
|
||||||
m_window = new CFBWindow(frameBuffer->getScreenX() + ((frameBuffer->getScreenWidth() - m_width ) >> 1),
|
m_window = new CFBWindow(frameBuffer->getScreenX() + ((frameBuffer->getScreenWidth() - m_width ) >> 1),
|
||||||
frameBuffer->getScreenY() + ((frameBuffer->getScreenHeight() - m_height) >> 2),
|
frameBuffer->getScreenY() + ((frameBuffer->getScreenHeight() - m_height) >> 2),
|
||||||
@@ -225,8 +232,11 @@ void CHintBoxExt::refresh(bool toround)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// bottom, right shadow
|
if (!bgPainted) {
|
||||||
m_window->paintBoxRel(SHADOW_OFFSET, SHADOW_OFFSET, m_width, m_height, COL_INFOBAR_SHADOW_PLUS_0, RADIUS_LARGE, toround ? CORNER_ALL : CORNER_BOTTOM | CORNER_TOP_RIGHT);
|
// bottom, right shadow
|
||||||
|
m_window->paintBoxRel(SHADOW_OFFSET, SHADOW_OFFSET, m_width, m_height, COL_INFOBAR_SHADOW_PLUS_0, RADIUS_LARGE, toround ? CORNER_ALL : CORNER_BOTTOM | CORNER_TOP_RIGHT);
|
||||||
|
bgPainted = true;
|
||||||
|
}
|
||||||
|
|
||||||
// title bar
|
// title bar
|
||||||
m_window->paintBoxRel(0, 0, m_width, m_theight, (CFBWindow::color_t)COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_TOP);//round
|
m_window->paintBoxRel(0, 0, m_width, m_theight, (CFBWindow::color_t)COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_TOP);//round
|
||||||
|
@@ -63,6 +63,7 @@ class CHintBoxExt
|
|||||||
char * m_message;
|
char * m_message;
|
||||||
ContentLines m_lines;
|
ContentLines m_lines;
|
||||||
std::string m_iconfile;
|
std::string m_iconfile;
|
||||||
|
bool bgPainted;
|
||||||
|
|
||||||
void refresh(bool toround = 1);
|
void refresh(bool toround = 1);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user