colors: add COL_SCROLLBAR_ACTIVE wrapper

Origin commit data
------------------
Commit: 7e7d4e5fc1
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-10-10 (Mon, 10 Oct 2016)

Origin message was:
------------------
- colors: add COL_SCROLLBAR_ACTIVE wrapper
This commit is contained in:
vanhofen
2016-10-10 14:19:54 +02:00
parent b9442071af
commit 4b3b25ca7a
24 changed files with 32 additions and 24 deletions

View File

@@ -212,7 +212,7 @@ void CHintBox::refresh(void)
ypos = theight + (fheight >> 1);
window->paintBoxRel(width - 15, ypos , 15, entries_per_page * fheight, COL_MENUCONTENT_PLUS_1);
unsigned int marker_size = (entries_per_page * fheight) / ((line.size() + entries_per_page - 1) / entries_per_page);
window->paintBoxRel(width - 13, ypos + current_page * marker_size, 11, marker_size , COL_MENUCONTENT_PLUS_3);
window->paintBoxRel(width - 13, ypos + current_page * marker_size, 11, marker_size, COL_SCROLLBAR_ACTIVE_PLUS_0);
}
}

View File

@@ -341,7 +341,7 @@ void CHintBoxExt::refresh(bool toround)
yPos = m_theight;
m_window->paintBoxRel(m_width - 15, yPos, 15, m_maxEntriesPerPage * m_fheight, COL_MENUCONTENT_PLUS_1);
unsigned int marker_size = (m_maxEntriesPerPage * m_fheight) / m_pages;
m_window->paintBoxRel(m_width - 13, yPos + m_currentPage * marker_size, 11, marker_size, COL_MENUCONTENT_PLUS_3);
m_window->paintBoxRel(m_width - 13, yPos + m_currentPage * marker_size, 11, marker_size, COL_SCROLLBAR_ACTIVE_PLUS_0);
}
}

View File

@@ -77,7 +77,7 @@ void CListBox::paint()
int sbh= (sb- 4)/ sbc;
int sbs= (selected/listmaxshow);
frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs* sbh , 11, sbh, COL_MENUCONTENT_PLUS_3);
frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs* sbh , 11, sbh, COL_SCROLLBAR_ACTIVE_PLUS_0);
}
void CListBox::paintHead()

View File

@@ -382,7 +382,7 @@ void CListFrame::refreshScroll(void)
frameBuffer->paintBoxRel(m_cFrameScrollRel.iX + SCROLL_MARKER_BORDER+m_cFrame.iX,
m_cFrameScrollRel.iY + m_nCurrentPage * marker_size +m_cFrame.iY,
m_cFrameScrollRel.iWidth - (2*SCROLL_MARKER_BORDER),
marker_size, COL_MENUCONTENT_PLUS_3);
marker_size, COL_SCROLLBAR_ACTIVE_PLUS_0);
}
else
{

View File

@@ -1319,7 +1319,7 @@ void CMenuWidget::paintItems()
{
int item_height=height-(item_start_y-y);
frameBuffer->paintBoxRel(x+ width,item_start_y, 15, item_height, COL_MENUCONTENT_PLUS_1, RADIUS_MIN);
frameBuffer->paintBoxRel(x+ width +2, item_start_y+ 2+ current_page*(item_height-4)/total_pages, 11, (item_height-4)/total_pages, COL_MENUCONTENT_PLUS_3, RADIUS_MIN);
frameBuffer->paintBoxRel(x+ width +2, item_start_y+ 2+ current_page*(item_height-4)/total_pages, 11, (item_height-4)/total_pages, COL_SCROLLBAR_ACTIVE_PLUS_0, RADIUS_MIN);
/* background of menu items, paint every time because different items can have
* different height and this might leave artifacts otherwise after changing pages */
frameBuffer->paintBoxRel(x,item_start_y, width,item_height, COL_MENUCONTENT_PLUS_0);

View File

@@ -499,7 +499,7 @@ void CTextBox::refreshScroll(void)
frameBuffer->paintBoxRel(m_cFrameScrollRel.iX + SCROLL_MARKER_BORDER+m_cFrame.iX,
m_cFrameScrollRel.iY + m_nCurrentPage * marker_size+m_cFrame.iY,
m_cFrameScrollRel.iWidth - 2*SCROLL_MARKER_BORDER,
marker_size, COL_MENUCONTENT_PLUS_3);
marker_size, COL_SCROLLBAR_ACTIVE_PLUS_0);
m_has_scrolled = true;
}
else