neutrino: remove dub code

using class 'CComponentsDetailLine' instead multiple code
details line rendering


Origin commit data
------------------
Branch: ni/coolstream
Commit: 261904acd0
Author: Thilo Graf <dbt@novatux.de>
Date: 2012-07-16 (Mon, 16 Jul 2012)

Origin message was:
------------------
*neutrino: remove dub code

using class 'CComponentsDetailLine' instead multiple code
details line rendering


------------------
This commit was generated by Migit
This commit is contained in:
2012-07-16 14:55:14 +02:00
parent a89e1bdbd7
commit 0ed04a868f
4 changed files with 20 additions and 88 deletions

View File

@@ -65,6 +65,7 @@
#include <gui/widget/hintbox.h>
#include <gui/widget/stringinput.h>
#include <gui/widget/stringinput_ext.h>
#include <gui/widget/components.h>
#include <system/settings.h>
#include <xmltree/xmlinterface.h>
@@ -1874,36 +1875,17 @@ void CAudioPlayerGui::paintItemID3DetailsLine (int pos)
int ypos1a = ypos1 + (m_fheight / 2) - 2;
int ypos2a = ypos2 + (m_info_height / 2) - 2;
fb_pixel_t col1 = COL_MENUCONTENT_PLUS_6;
fb_pixel_t col2 = COL_MENUCONTENT_PLUS_1;
int c_rad_small = RADIUS_SMALL;
// Clear
m_frameBuffer->paintBackgroundBoxRel(xpos - 1, m_y + m_title_height, ConnectLineBox_Width + 1,
m_height - m_title_height);
// paint Line if detail info (and not valid list pos)
// paint Line if detail info (and not valid list pos) and info box
if (!m_playlist.empty() && (pos >= 0))
{
int fh = m_info_height > RADIUS_MID*2 ? m_info_height - RADIUS_MID*2 : m_info_height;
// 1. col thick line
m_frameBuffer->paintBoxRel(xpos + ConnectLineBox_Width - 4, ypos1, 4, m_fheight, col2, c_rad_small, CORNER_LEFT);
m_frameBuffer->paintBoxRel(xpos + ConnectLineBox_Width - 3, ypos1, 8, m_fheight, col1, c_rad_small, CORNER_LEFT); // item marker
m_frameBuffer->paintBoxRel(xpos + ConnectLineBox_Width - 4, ypos2+RADIUS_MID, 4, fh /*m_info_height*/, col1);
m_frameBuffer->paintBoxRel(xpos + ConnectLineBox_Width - 16, ypos1a, 3, ypos2a - ypos1a+3, col1);
m_frameBuffer->paintBoxRel(xpos + ConnectLineBox_Width - 16, ypos1a, 12, 3, col1);
m_frameBuffer->paintBoxRel(xpos + ConnectLineBox_Width - 16, ypos2a, 12, 3, col1);
// 2. col small line
m_frameBuffer->paintBoxRel(xpos + ConnectLineBox_Width - 4, ypos2+RADIUS_MID, 1, fh /*m_info_height*/, col2);
m_frameBuffer->paintBoxRel(xpos + ConnectLineBox_Width - 16+3, ypos1a+3, 1, ypos2a - ypos1a-3, col2);
m_frameBuffer->paintBoxRel(xpos + ConnectLineBox_Width - 16+3, ypos1a+3, 12-3, 1, col2);
m_frameBuffer->paintBoxRel(xpos + ConnectLineBox_Width - 16, ypos2a+3, 12, 1, col2);
//details line
CComponentsDetailLine details_line(xpos, ypos1a, ypos2a, m_fheight/2+1, m_fheight);
details_line.paint();
// -- small Frame around infobox
m_frameBuffer->paintBoxFrame(m_x, ypos2, m_width, m_info_height, 2, col1, RADIUS_MID);

View File

@@ -38,7 +38,7 @@
#include <gui/widget/buttons.h>
#include <gui/widget/icons.h>
#include <gui/widget/messagebox.h>
#include <gui/widget/components.h>
#include "bouqueteditor_channels.h"
#include <global.h>
@@ -207,7 +207,6 @@ void CBEChannelWidget::paintItem2DetailsLine (int pos, int /*ch_index*/)
int ypos1a = ypos1 + (fheight/2)-2;
int ypos2a = ypos2 + (info_height/2)-2;
fb_pixel_t col1 = COL_MENUCONTENT_PLUS_6;
fb_pixel_t col2 = COL_MENUCONTENT_PLUS_1;
// Clear
frameBuffer->paintBackgroundBoxRel(xpos,y, ConnectLineBox_Width, height+info_height);
@@ -215,23 +214,12 @@ void CBEChannelWidget::paintItem2DetailsLine (int pos, int /*ch_index*/)
// paint Line if detail info (and not valid list pos)
if (pos >= 0)
{
int fh = fheight > 10 ? fheight - 10: 5;
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-4, ypos1+5, 4, fh, col1);
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-4, ypos1+5, 1, fh, col2);
//details line
CComponentsDetailLine details_line(xpos, ypos1a, ypos2a, fheight/2+1, info_height-RADIUS_LARGE*2);
details_line.paint();
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-4, ypos2+7, 4,info_height-14, col1);
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-4, ypos2+7, 1,info_height-14, col2);
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16, ypos1a, 3,ypos2a-ypos1a+3, col1);
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16+3, ypos1a+3, 1,ypos2a-ypos1a-3, col2);
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16, ypos1a, 12,3, col1);
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16+3, ypos1a+3, 12-3,1, col2);
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16, ypos2a, 12,3, col1);
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16, ypos2a+3, 12,1, col2);
frameBuffer->paintBoxFrame(x, ypos2, width, info_height, 2, col1, RADIUS_LARGE);
//info box frame
frameBuffer->paintBoxFrame(x, ypos2, width, info_height, 2, col1, RADIUS_LARGE);
}
}

View File

@@ -55,6 +55,7 @@
#include <gui/widget/menue.h>
#include <gui/widget/messagebox.h>
#include <gui/widget/progressbar.h>
#include <gui/widget/components.h>
#include <gui/osd_setup.h>
#include <system/settings.h>
@@ -1560,7 +1561,6 @@ void CChannelList::paintItem2DetailsLine (int pos, int /*ch_index*/)
int ypos1a = ypos1 + (fheight/2)-2;
int ypos2a = ypos2 + (info_height/2)-2;
fb_pixel_t col1 = COL_MENUCONTENT_PLUS_6;
fb_pixel_t col2 = COL_MENUCONTENT_PLUS_1;
// Clear
frameBuffer->paintBackgroundBoxRel(xpos,y, ConnectLineBox_Width, height+info_height);
@@ -1569,30 +1569,12 @@ void CChannelList::paintItem2DetailsLine (int pos, int /*ch_index*/)
if (pos >= 0) { //pos >= 0 && chanlist[ch_index]->currentEvent.description != "") {
if(1) // FIXME why -> ? (!g_settings.channellist_extended)
{
int fh = fheight > 10 ? fheight - 10: 5;
/* horizontal item mark */
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-4, ypos1+5, 4, fh, col1);
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-4, ypos1+5, 1, fh, col2);
//details line
CComponentsDetailLine details_line(xpos, ypos1a, ypos2a, fheight/2+1, info_height-RADIUS_LARGE*2);
details_line.paint();
/* horizontal info mark */
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-4, ypos2+7, 4,info_height-14, col1);
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-4, ypos2+7, 1,info_height-14, col2);
/* vertical connect line */
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16, ypos1a, 3,ypos2a-ypos1a+3, col1);
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16+3, ypos1a+3, 1,ypos2a-ypos1a-3, col2);
/* vertical item line */
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16, ypos1a, 12,3, col1);
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16+3, ypos1a+3, 12-3,1, col2);
/* vertical info line */
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16, ypos2a, 12,3, col1);
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16, ypos2a+3, 12,1, col2);
// frameBuffer->paintBoxRel(x, ypos2, width, info_height, col1, RADIUS_LARGE);
//info box frame
frameBuffer->paintBoxFrame(x, ypos2, width, info_height, 2, col1, RADIUS_LARGE);
}
}
}

View File

@@ -35,7 +35,7 @@
#include <driver/screen_max.h>
#include <gui/widget/stringinput.h>
#include <gui/widget/components.h>
#include <global.h>
#include <neutrino.h>
#include <neutrino_menue.h>
@@ -1069,7 +1069,6 @@ void CMenuWidget::paintHint(int pos)
return;
fb_pixel_t col1 = COL_MENUCONTENT_PLUS_6;
fb_pixel_t col2 = COL_MENUCONTENT_PLUS_1;
int rad = RADIUS_LARGE;
int xpos = x - ConnectLineBox_Width;
@@ -1097,33 +1096,14 @@ printf("paintHint: icon %s text %s\n", item->hintIcon.c_str(), g_Locale->getText
int iheight = item->getHeight();
//details line
int ypos1 = item->getYPosition();
int ypos1a = ypos1 + (iheight/2)-2;
int ypos2a = ypos2 + (hint_height/2)-2;
int markh = hint_height > rad*2 ? hint_height - rad*2 : hint_height;
int imarkh = iheight/2+1;
int imarkoff = iheight/4;
/* horizontal item mark - */
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-4, ypos1+imarkoff, 4, imarkh, col1);
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-4, ypos1+imarkoff, 1, imarkh, col2);
/* horizontal info mark - */
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-4, ypos2+rad, 4, markh, col1);
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-4, ypos2+rad, 1 , markh, col2);
/* vertical connect line [ */
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16, ypos1a, 3, ypos2a-ypos1a+3, col1);
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16+3, ypos1a+3, 1, ypos2a-ypos1a-3, col2);
/* vertical item line | */
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16, ypos1a, 12, 3, col1);
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16+3, ypos1a+3, 12-3, 1, col2);
/* vertical info line | */
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16, ypos2a, 12, 3, col1);
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16, ypos2a+3, 12, 1, col2);
CComponentsDetailLine details_line(xpos, ypos1a, ypos2a, imarkh, markh);
details_line.paint();
/* box shadow */
frameBuffer->paintBoxRel(x+SHADOW_OFFSET, ypos2+SHADOW_OFFSET, width + sb_width, hint_height, COL_MENUCONTENTDARK_PLUS_0, rad);