* CHintBoxExt: Fix view of multiple pages

- Reduces flicker effect on screen
This commit is contained in:
micha-bbg
2012-12-04 11:00:27 +01:00
parent fbf2c05825
commit 02b2685494
2 changed files with 13 additions and 2 deletions

View File

@@ -108,6 +108,7 @@ void CHintBoxExt::init(const neutrino_locale_t Caption, const int Width, const c
int maxLineWidth = 0;
int scrollWidth = 0;
textStartX = 0;
bgPainted = false;
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];
}
}
else {
if (m_height > maxOverallHeight)
maxOverallHeight = m_height;
m_maxEntriesPerPage = maxOverallHeight / m_fheight;
}
line++;
}
@@ -209,6 +215,7 @@ void CHintBoxExt::paint(bool toround)
return;
}
bgPainted = false;
CFrameBuffer* frameBuffer = CFrameBuffer::getInstance();
m_window = new CFBWindow(frameBuffer->getScreenX() + ((frameBuffer->getScreenWidth() - m_width ) >> 1),
frameBuffer->getScreenY() + ((frameBuffer->getScreenHeight() - m_height) >> 2),
@@ -225,8 +232,11 @@ void CHintBoxExt::refresh(bool toround)
return;
}
if (!bgPainted) {
// 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
m_window->paintBoxRel(0, 0, m_width, m_theight, (CFBWindow::color_t)COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_TOP);//round

View File

@@ -63,6 +63,7 @@ class CHintBoxExt
char * m_message;
ContentLines m_lines;
std::string m_iconfile;
bool bgPainted;
void refresh(bool toround = 1);