From d6f3ba61d5bc1586c4a27e05eafe1b01ce0ca448 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Thu, 15 Jun 2017 13:05:39 +0200 Subject: [PATCH] - textbox: use CComponentsScrollbar Signed-off-by: Thilo Graf --- src/gui/widget/textbox.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/gui/widget/textbox.cpp b/src/gui/widget/textbox.cpp index 7a9e326b1..587c237d6 100644 --- a/src/gui/widget/textbox.cpp +++ b/src/gui/widget/textbox.cpp @@ -61,6 +61,7 @@ #include #include #include "textbox.h" +#include #include #include #ifdef VISUAL_DEBUG @@ -525,14 +526,9 @@ void CTextBox::refreshScroll(void) if (m_nNrOfPages > 1) { - frameBuffer->paintBoxRel(m_cFrameScrollRel.iX+m_cFrame.iX, m_cFrameScrollRel.iY+m_cFrame.iY, + paintScrollBar(m_cFrameScrollRel.iX+m_cFrame.iX, m_cFrameScrollRel.iY+m_cFrame.iY, m_cFrameScrollRel.iWidth, m_cFrameScrollRel.iHeight, - COL_SCROLLBAR_PLUS_0, RADIUS_MIN); - unsigned int marker_size = (m_cFrameScrollRel.iHeight - 2*SCROLL_MARKER_BORDER) / m_nNrOfPages; - frameBuffer->paintBoxRel(m_cFrameScrollRel.iX + SCROLL_MARKER_BORDER + m_cFrame.iX, - m_cFrameScrollRel.iY + SCROLL_MARKER_BORDER + m_nCurrentPage * marker_size + m_cFrame.iY, - m_cFrameScrollRel.iWidth - 2*SCROLL_MARKER_BORDER, - marker_size, COL_SCROLLBAR_ACTIVE_PLUS_0, RADIUS_MIN); + m_nNrOfPages, m_nCurrentPage); m_has_scrolled = true; } else