mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 00:11:08 +02:00
pictureviewer: add shadow to gui-elements
Origin commit data
------------------
Branch: ni/coolstream
Commit: 7b71a3bb19
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-06-19 (Mon, 19 Jun 2017)
Origin message was:
------------------
- pictureviewer: add shadow to gui-elements
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -175,8 +175,8 @@ int CPictureViewerGui::exec(CMenuTarget* parent, const std::string & actionKey)
|
||||
buttons2_height = ::paintButtons(0, 0, 0, PictureViewerButtons2Count, PictureViewerButtons2, 0, 0, "", false, COL_MENUFOOT_TEXT, NULL, 0, false);
|
||||
footer_height = buttons1_height + buttons2_height;
|
||||
|
||||
listmaxshow = (height - header_height - footer_height)/item_height;
|
||||
height = header_height + listmaxshow*item_height + footer_height; // recalc height
|
||||
listmaxshow = (height - header_height - footer_height - OFFSET_SHADOW)/item_height;
|
||||
height = header_height + listmaxshow*item_height + footer_height + OFFSET_SHADOW; // recalc height
|
||||
|
||||
x=getScreenStartX(width);
|
||||
y=getScreenStartY(height);
|
||||
@@ -713,6 +713,7 @@ void CPictureViewerGui::paintItem(int pos)
|
||||
void CPictureViewerGui::paintHead()
|
||||
{
|
||||
CComponentsHeaderLocalized header(x, y, width, header_height, LOCALE_PICTUREVIEWER_HEAD, NEUTRINO_ICON_PICTUREVIEWER, CComponentsHeaderLocalized::CC_BTN_HELP);
|
||||
header.enableShadow(CC_SHADOW_RIGHT | CC_SHADOW_CORNER_TOP_RIGHT | CC_SHADOW_CORNER_BOTTOM_RIGHT, -1, true);
|
||||
|
||||
#ifdef ENABLE_GUI_MOUNT
|
||||
header.setContextButton(NEUTRINO_ICON_BUTTON_MENU);
|
||||
@@ -730,15 +731,20 @@ void CPictureViewerGui::paintFoot()
|
||||
else
|
||||
PictureViewerButtons2[0].locale = LOCALE_PICTUREVIEWER_SORTORDER_DATE;
|
||||
|
||||
frameBuffer->paintBoxRel(x, y + (height - footer_height), width, footer_height, COL_MENUFOOT_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM);
|
||||
int footer_y = y + (height - footer_height - OFFSET_SHADOW);
|
||||
|
||||
// shadow
|
||||
frameBuffer->paintBoxRel(x + OFFSET_SHADOW, footer_y + OFFSET_SHADOW, width, footer_height, COL_SHADOW_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM);
|
||||
|
||||
frameBuffer->paintBoxRel(x, footer_y, width, footer_height, COL_MENUFOOT_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM);
|
||||
|
||||
if (!playlist.empty())
|
||||
{
|
||||
::paintButtons(x, y + (height - footer_height), 0, PictureViewerButtons1Count, PictureViewerButtons1, width);
|
||||
::paintButtons(x, y + (height - buttons2_height), 0, PictureViewerButtons2Count, PictureViewerButtons2, width);
|
||||
::paintButtons(x, footer_y, width, PictureViewerButtons1Count, PictureViewerButtons1, width, buttons1_height);
|
||||
::paintButtons(x, footer_y + buttons1_height, width, PictureViewerButtons2Count, PictureViewerButtons2, width, buttons2_height);
|
||||
}
|
||||
else
|
||||
::paintButtons(x, y + (height - footer_height), 0, 1, &(PictureViewerButtons1[1]), width);
|
||||
::paintButtons(x, footer_y, width, 1, &(PictureViewerButtons1[1]), width, buttons1_height);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
@@ -766,6 +772,9 @@ void CPictureViewerGui::paint()
|
||||
|
||||
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);
|
||||
|
||||
paintFoot();
|
||||
paintInfo();
|
||||
|
||||
|
Reference in New Issue
Block a user