From 970c5c123fc5a002520459f24fbdfeaf45db1247 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 19 Jun 2017 16:20:49 +0200 Subject: [PATCH] simplify last shadow-changes ... I didn't know about the possibility to add a shadow directly to the scrollbar. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/738ffc1d2497fa73b4156b454510164efb6c2e95 Author: vanhofen Date: 2017-06-19 (Mon, 19 Jun 2017) Origin message was: ------------------ - simplify last shadow-changes ... I didn't know about the possibility to add a shadow directly to the scrollbar. ------------------ This commit was generated by Migit --- src/gui/audioplayer.cpp | 5 +---- src/gui/filebrowser.cpp | 6 +----- src/gui/pictureviewer.cpp | 6 +----- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/src/gui/audioplayer.cpp b/src/gui/audioplayer.cpp index b204c76c1..75ac7e24c 100644 --- a/src/gui/audioplayer.cpp +++ b/src/gui/audioplayer.cpp @@ -1818,10 +1818,7 @@ void CAudioPlayerGui::paint() int current_page; getScrollBarData(&total_pages, ¤t_page, m_playlist.size(), m_listmaxshow, m_selected); - paintScrollBar(m_x + m_width - SCROLLBAR_WIDTH, m_y + m_title_height + OFFSET_SHADOW + OFFSET_INTER + m_header_height, SCROLLBAR_WIDTH, m_item_height*m_listmaxshow, total_pages, current_page); - - // shadow - m_frameBuffer->paintBoxRel(m_x + m_width, m_y + m_title_height + OFFSET_SHADOW + OFFSET_INTER + m_header_height + OFFSET_SHADOW, OFFSET_SHADOW, m_item_height*m_listmaxshow, COL_SHADOW_PLUS_0); + paintScrollBar(m_x + m_width - SCROLLBAR_WIDTH, m_y + m_title_height + OFFSET_SHADOW + OFFSET_INTER + m_header_height, SCROLLBAR_WIDTH, m_item_height*m_listmaxshow, total_pages, current_page, CC_SHADOW_ON); } paintTitleBox(); diff --git a/src/gui/filebrowser.cpp b/src/gui/filebrowser.cpp index 1a489d7cb..9a49f973b 100644 --- a/src/gui/filebrowser.cpp +++ b/src/gui/filebrowser.cpp @@ -1492,11 +1492,7 @@ void CFileBrowser::paint() int total_pages; int current_page; getScrollBarData(&total_pages, ¤t_page, filelist.size(), listmaxshow, selected); - - paintScrollBar(x + width - SCROLLBAR_WIDTH, y + header_height, SCROLLBAR_WIDTH, item_height*listmaxshow, total_pages, current_page); - - // shadow - frameBuffer->paintBoxRel(x + width, y + header_height + OFFSET_SHADOW, OFFSET_SHADOW, item_height*listmaxshow, COL_SHADOW_PLUS_0); + paintScrollBar(x + width - SCROLLBAR_WIDTH, y + header_height, SCROLLBAR_WIDTH, item_height*listmaxshow, total_pages, current_page, CC_SHADOW_ON); } void CFileBrowser::SMSInput(const neutrino_msg_t msg) diff --git a/src/gui/pictureviewer.cpp b/src/gui/pictureviewer.cpp index d12227218..4f7502b6b 100644 --- a/src/gui/pictureviewer.cpp +++ b/src/gui/pictureviewer.cpp @@ -769,11 +769,7 @@ void CPictureViewerGui::paint() int total_pages; int current_page; getScrollBarData(&total_pages, ¤t_page, playlist.size(), listmaxshow, selected); - - paintScrollBar(x + width - SCROLLBAR_WIDTH, y + header_height, SCROLLBAR_WIDTH, item_height*listmaxshow, total_pages, current_page); - - // shadow - frameBuffer->paintBoxRel(x + width, y + header_height + OFFSET_SHADOW, OFFSET_SHADOW, item_height*listmaxshow, COL_SHADOW_PLUS_0); + paintScrollBar(x + width - SCROLLBAR_WIDTH, y + header_height, SCROLLBAR_WIDTH, item_height*listmaxshow, total_pages, current_page, CC_SHADOW_ON); paintFoot(); paintInfo();