diff --git a/src/gui/widget/hintboxext.cpp b/src/gui/widget/hintboxext.cpp index acec30040..8684e6899 100644 --- a/src/gui/widget/hintboxext.cpp +++ b/src/gui/widget/hintboxext.cpp @@ -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; } - // 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); + 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 diff --git a/src/gui/widget/hintboxext.h b/src/gui/widget/hintboxext.h index 64dc907c9..9cec2bd8b 100644 --- a/src/gui/widget/hintboxext.h +++ b/src/gui/widget/hintboxext.h @@ -63,6 +63,7 @@ class CHintBoxExt char * m_message; ContentLines m_lines; std::string m_iconfile; + bool bgPainted; void refresh(bool toround = 1);