mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 23:42:58 +02:00
Merge branch 'dvbsi++' of coolstreamtech.de:cst-public-gui-neutrino into dvbsi++
This commit is contained in:
@@ -65,6 +65,7 @@
|
|||||||
#include <gui/widget/hintbox.h>
|
#include <gui/widget/hintbox.h>
|
||||||
#include <gui/widget/stringinput.h>
|
#include <gui/widget/stringinput.h>
|
||||||
#include <gui/widget/stringinput_ext.h>
|
#include <gui/widget/stringinput_ext.h>
|
||||||
|
#include <gui/widget/components.h>
|
||||||
|
|
||||||
#include <system/settings.h>
|
#include <system/settings.h>
|
||||||
#include <xmltree/xmlinterface.h>
|
#include <xmltree/xmlinterface.h>
|
||||||
@@ -1874,36 +1875,17 @@ void CAudioPlayerGui::paintItemID3DetailsLine (int pos)
|
|||||||
int ypos1a = ypos1 + (m_fheight / 2) - 2;
|
int ypos1a = ypos1 + (m_fheight / 2) - 2;
|
||||||
int ypos2a = ypos2 + (m_info_height / 2) - 2;
|
int ypos2a = ypos2 + (m_info_height / 2) - 2;
|
||||||
fb_pixel_t col1 = COL_MENUCONTENT_PLUS_6;
|
fb_pixel_t col1 = COL_MENUCONTENT_PLUS_6;
|
||||||
fb_pixel_t col2 = COL_MENUCONTENT_PLUS_1;
|
|
||||||
int c_rad_small = RADIUS_SMALL;
|
|
||||||
|
|
||||||
|
|
||||||
// Clear
|
// Clear
|
||||||
m_frameBuffer->paintBackgroundBoxRel(xpos - 1, m_y + m_title_height, ConnectLineBox_Width + 1,
|
m_frameBuffer->paintBackgroundBoxRel(xpos - 1, m_y + m_title_height, ConnectLineBox_Width + 1,
|
||||||
m_height - m_title_height);
|
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))
|
if (!m_playlist.empty() && (pos >= 0))
|
||||||
{
|
{
|
||||||
int fh = m_info_height > RADIUS_MID*2 ? m_info_height - RADIUS_MID*2 : m_info_height;
|
//details line
|
||||||
// 1. col thick line
|
CComponentsDetailLine details_line(xpos, ypos1a, ypos2a, m_fheight/2+1, m_fheight);
|
||||||
m_frameBuffer->paintBoxRel(xpos + ConnectLineBox_Width - 4, ypos1, 4, m_fheight, col2, c_rad_small, CORNER_LEFT);
|
details_line.paint();
|
||||||
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);
|
|
||||||
|
|
||||||
// -- small Frame around infobox
|
// -- small Frame around infobox
|
||||||
m_frameBuffer->paintBoxFrame(m_x, ypos2, m_width, m_info_height, 2, col1, RADIUS_MID);
|
m_frameBuffer->paintBoxFrame(m_x, ypos2, m_width, m_info_height, 2, col1, RADIUS_MID);
|
||||||
|
@@ -38,7 +38,7 @@
|
|||||||
#include <gui/widget/buttons.h>
|
#include <gui/widget/buttons.h>
|
||||||
#include <gui/widget/icons.h>
|
#include <gui/widget/icons.h>
|
||||||
#include <gui/widget/messagebox.h>
|
#include <gui/widget/messagebox.h>
|
||||||
|
#include <gui/widget/components.h>
|
||||||
#include "bouqueteditor_channels.h"
|
#include "bouqueteditor_channels.h"
|
||||||
|
|
||||||
#include <global.h>
|
#include <global.h>
|
||||||
@@ -207,7 +207,6 @@ void CBEChannelWidget::paintItem2DetailsLine (int pos, int /*ch_index*/)
|
|||||||
int ypos1a = ypos1 + (fheight/2)-2;
|
int ypos1a = ypos1 + (fheight/2)-2;
|
||||||
int ypos2a = ypos2 + (info_height/2)-2;
|
int ypos2a = ypos2 + (info_height/2)-2;
|
||||||
fb_pixel_t col1 = COL_MENUCONTENT_PLUS_6;
|
fb_pixel_t col1 = COL_MENUCONTENT_PLUS_6;
|
||||||
fb_pixel_t col2 = COL_MENUCONTENT_PLUS_1;
|
|
||||||
|
|
||||||
// Clear
|
// Clear
|
||||||
frameBuffer->paintBackgroundBoxRel(xpos,y, ConnectLineBox_Width, height+info_height);
|
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)
|
// paint Line if detail info (and not valid list pos)
|
||||||
if (pos >= 0)
|
if (pos >= 0)
|
||||||
{
|
{
|
||||||
int fh = fheight > 10 ? fheight - 10: 5;
|
//details line
|
||||||
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-4, ypos1+5, 4, fh, col1);
|
CComponentsDetailLine details_line(xpos, ypos1a, ypos2a, fheight/2+1, info_height-RADIUS_LARGE*2);
|
||||||
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-4, ypos1+5, 1, fh, col2);
|
details_line.paint();
|
||||||
|
|
||||||
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-4, ypos2+7, 4,info_height-14, col1);
|
//info box frame
|
||||||
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-4, ypos2+7, 1,info_height-14, col2);
|
frameBuffer->paintBoxFrame(x, ypos2, width, info_height, 2, col1, RADIUS_LARGE);
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -55,6 +55,7 @@
|
|||||||
#include <gui/widget/menue.h>
|
#include <gui/widget/menue.h>
|
||||||
#include <gui/widget/messagebox.h>
|
#include <gui/widget/messagebox.h>
|
||||||
#include <gui/widget/progressbar.h>
|
#include <gui/widget/progressbar.h>
|
||||||
|
#include <gui/widget/components.h>
|
||||||
#include <gui/osd_setup.h>
|
#include <gui/osd_setup.h>
|
||||||
|
|
||||||
#include <system/settings.h>
|
#include <system/settings.h>
|
||||||
@@ -1560,7 +1561,6 @@ void CChannelList::paintItem2DetailsLine (int pos, int /*ch_index*/)
|
|||||||
int ypos1a = ypos1 + (fheight/2)-2;
|
int ypos1a = ypos1 + (fheight/2)-2;
|
||||||
int ypos2a = ypos2 + (info_height/2)-2;
|
int ypos2a = ypos2 + (info_height/2)-2;
|
||||||
fb_pixel_t col1 = COL_MENUCONTENT_PLUS_6;
|
fb_pixel_t col1 = COL_MENUCONTENT_PLUS_6;
|
||||||
fb_pixel_t col2 = COL_MENUCONTENT_PLUS_1;
|
|
||||||
|
|
||||||
// Clear
|
// Clear
|
||||||
frameBuffer->paintBackgroundBoxRel(xpos,y, ConnectLineBox_Width, height+info_height);
|
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 (pos >= 0) { //pos >= 0 && chanlist[ch_index]->currentEvent.description != "") {
|
||||||
if(1) // FIXME why -> ? (!g_settings.channellist_extended)
|
if(1) // FIXME why -> ? (!g_settings.channellist_extended)
|
||||||
{
|
{
|
||||||
int fh = fheight > 10 ? fheight - 10: 5;
|
//details line
|
||||||
/* horizontal item mark */
|
CComponentsDetailLine details_line(xpos, ypos1a, ypos2a, fheight/2+1, info_height-RADIUS_LARGE*2);
|
||||||
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-4, ypos1+5, 4, fh, col1);
|
details_line.paint();
|
||||||
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-4, ypos1+5, 1, fh, col2);
|
|
||||||
|
|
||||||
/* horizontal info mark */
|
//info box frame
|
||||||
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);
|
|
||||||
frameBuffer->paintBoxFrame(x, ypos2, width, info_height, 2, col1, RADIUS_LARGE);
|
frameBuffer->paintBoxFrame(x, ypos2, width, info_height, 2, col1, RADIUS_LARGE);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -22,6 +22,7 @@ noinst_LIBRARIES = libneutrino_gui_widget.a libneutrino_gui_widget2.a
|
|||||||
libneutrino_gui_widget_a_SOURCES = \
|
libneutrino_gui_widget_a_SOURCES = \
|
||||||
buttons.cpp \
|
buttons.cpp \
|
||||||
colorchooser.cpp \
|
colorchooser.cpp \
|
||||||
|
components.cpp \
|
||||||
drawable.cpp \
|
drawable.cpp \
|
||||||
helpbox.cpp \
|
helpbox.cpp \
|
||||||
hintbox.cpp \
|
hintbox.cpp \
|
||||||
|
125
src/gui/widget/components.cpp
Normal file
125
src/gui/widget/components.cpp
Normal file
@@ -0,0 +1,125 @@
|
|||||||
|
/*
|
||||||
|
GUI window component classes - Neutrino-GUI
|
||||||
|
|
||||||
|
Copyright(C) 2012, Thilo Graf (dbt)
|
||||||
|
|
||||||
|
This class contains generic components for GUI-related parts.
|
||||||
|
|
||||||
|
License: GPL
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Library General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public
|
||||||
|
License along with this library; if not, write to the
|
||||||
|
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <gui/widget/components.h>
|
||||||
|
|
||||||
|
#include <global.h>
|
||||||
|
#include <neutrino.h>
|
||||||
|
|
||||||
|
|
||||||
|
//basic class CComponents
|
||||||
|
CComponents::CComponents(const int x_pos, const int y_pos, const int h, const int w)
|
||||||
|
{
|
||||||
|
x = x_pos;
|
||||||
|
y = y_pos;
|
||||||
|
height = h;
|
||||||
|
width = w;
|
||||||
|
frameBuffer = CFrameBuffer::getInstance();
|
||||||
|
}
|
||||||
|
|
||||||
|
CComponents::~CComponents()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------------------------------------------
|
||||||
|
//sub class CComponentsDetailLine
|
||||||
|
CComponentsDetailLine::CComponentsDetailLine(const int x_pos, const int y_pos_top, const int y_pos_down, const int h_mark_top_, const int h_mark_down_, fb_pixel_t color1, fb_pixel_t color2)
|
||||||
|
{
|
||||||
|
x = x_pos;
|
||||||
|
width = 16;
|
||||||
|
thickness = 4;
|
||||||
|
y = y_pos_top;
|
||||||
|
y_down = y_pos_down;
|
||||||
|
h_mark_top = h_mark_top_;
|
||||||
|
h_mark_down = h_mark_down_;
|
||||||
|
offs_up = offs_down = 0;
|
||||||
|
col1 = color1;
|
||||||
|
col2 = color2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// y_top (=y)
|
||||||
|
// xpos +--|h_mark_up
|
||||||
|
// |
|
||||||
|
// |
|
||||||
|
// |
|
||||||
|
// |
|
||||||
|
// |
|
||||||
|
// |
|
||||||
|
// |
|
||||||
|
// |
|
||||||
|
// |
|
||||||
|
// +--|h_mark_down
|
||||||
|
// y_down
|
||||||
|
|
||||||
|
//paint details line with current parameters
|
||||||
|
void CComponentsDetailLine::paint()
|
||||||
|
{
|
||||||
|
offs_up = h_mark_top/2-thickness+1;
|
||||||
|
offs_down = h_mark_down/2-thickness+2;
|
||||||
|
int y_top = y;
|
||||||
|
|
||||||
|
/* vertical item mark | */
|
||||||
|
frameBuffer->paintBoxRel(x+width-4, y_top-offs_up, thickness, h_mark_top, col1);
|
||||||
|
frameBuffer->paintBoxRel(x+width-5+thickness, y_top-offs_up, 1, h_mark_top, col2);
|
||||||
|
|
||||||
|
/* horizontal item line - */
|
||||||
|
frameBuffer->paintBoxRel(x+width-15, y_top+1, 11, thickness, col1);
|
||||||
|
frameBuffer->paintBoxRel(x+width-15+thickness, y_top+1+thickness, 11-thickness, 1, col2);
|
||||||
|
|
||||||
|
/* vertical connect line [ */
|
||||||
|
frameBuffer->paintBoxRel(x+width-15, y_top+2, thickness, y_down-y_top-1, col1);
|
||||||
|
frameBuffer->paintBoxRel(x+width-15+thickness, y_top+2+thickness, 1, y_down-y_top+3-2*thickness, col2);
|
||||||
|
|
||||||
|
/* horizontal info line - */
|
||||||
|
frameBuffer->paintBoxRel(x+width-15, y_down, 11, thickness, col1);
|
||||||
|
frameBuffer->paintBoxRel(x+width-14+thickness, y_down+thickness, 11-thickness, 1, col2);
|
||||||
|
|
||||||
|
/* vertical info mark | */
|
||||||
|
frameBuffer->paintBoxRel(x+width-4, y_down-offs_down, thickness, h_mark_down, col1);
|
||||||
|
frameBuffer->paintBoxRel(x+width-5+thickness, y_down-offs_down, 1, h_mark_down, col2);
|
||||||
|
}
|
||||||
|
|
||||||
|
//remove painted lines from screen
|
||||||
|
void CComponentsDetailLine::hide()
|
||||||
|
{
|
||||||
|
//caching current colors
|
||||||
|
fb_pixel_t c_tmp1, c_tmp2;
|
||||||
|
c_tmp1 = col1;
|
||||||
|
c_tmp2 = col2;
|
||||||
|
|
||||||
|
//set background color
|
||||||
|
col1 = col2 = COL_BACKGROUND;
|
||||||
|
|
||||||
|
//paint with background and restore set last used colors
|
||||||
|
paint();
|
||||||
|
col1 = c_tmp1;
|
||||||
|
col2 = c_tmp2;
|
||||||
|
}
|
||||||
|
|
71
src/gui/widget/components.h
Normal file
71
src/gui/widget/components.h
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
/*
|
||||||
|
GUI window component classes - Neutrino-GUI
|
||||||
|
|
||||||
|
Copyright(C) 2012, Thilo Graf (dbt)
|
||||||
|
|
||||||
|
This class contains generic components for GUI-related parts.
|
||||||
|
|
||||||
|
License: GPL
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Library General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public
|
||||||
|
License along with this library; if not, write to the
|
||||||
|
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __COMPONENTS__
|
||||||
|
#define __COMPONENTS__
|
||||||
|
|
||||||
|
#include <driver/framebuffer.h>
|
||||||
|
#include <gui/color.h>
|
||||||
|
#include <gui/customcolor.h>
|
||||||
|
|
||||||
|
class CComponents
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
int x, y, height, width;
|
||||||
|
CFrameBuffer * frameBuffer;
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
CComponents(const int x_pos = 0, const int y_pos = 0, const int h = 0, const int w = 0);
|
||||||
|
virtual~CComponents();
|
||||||
|
|
||||||
|
virtual void setXPos(const int& xpos){x = xpos;};
|
||||||
|
virtual void setYPos(const int& ypos){y = ypos;};
|
||||||
|
virtual void setHeight(const int& h){width = h;};
|
||||||
|
virtual void setWidth(const int& w){height = w;};
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
class CComponentsDetailLine : public CComponents
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
int thickness, y_down, h_mark_top, h_mark_down, offs_up, offs_down;
|
||||||
|
fb_pixel_t col1, col2;
|
||||||
|
|
||||||
|
public:
|
||||||
|
CComponentsDetailLine( const int x_pos,const int y_pos_top, const int y_pos_down,
|
||||||
|
const int h_mark_up =16 , const int h_mark_down = 16,
|
||||||
|
fb_pixel_t color1 = COL_MENUCONTENT_PLUS_6, fb_pixel_t color2 = COL_MENUCONTENTDARK_PLUS_0);
|
||||||
|
|
||||||
|
void paint();
|
||||||
|
void hide();
|
||||||
|
void setWidth(const int& w){width = w;};
|
||||||
|
void setColor(fb_pixel_t color1, fb_pixel_t color2){col1 = color1; col2 = color2;};
|
||||||
|
// void setYPosTop(const int& y_pos_top){y = y_pos_top;}; //same like setYpos()val)
|
||||||
|
void setYPosDown(const int& y_pos_down){y_down = y_pos_down;};
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
@@ -323,6 +323,7 @@ void CMenuWidget::Init(const std::string & Icon, const int mwidth, const mn_widg
|
|||||||
mglobal = CMenuGlobal::getInstance(); //create CMenuGlobal instance only here
|
mglobal = CMenuGlobal::getInstance(); //create CMenuGlobal instance only here
|
||||||
frameBuffer = CFrameBuffer::getInstance();
|
frameBuffer = CFrameBuffer::getInstance();
|
||||||
iconfile = Icon;
|
iconfile = Icon;
|
||||||
|
details_line = NULL;
|
||||||
|
|
||||||
//handle select values
|
//handle select values
|
||||||
if(w_index > MN_WIDGET_ID_MAX){
|
if(w_index > MN_WIDGET_ID_MAX){
|
||||||
@@ -391,6 +392,7 @@ CMenuWidget::~CMenuWidget()
|
|||||||
page_start.clear();
|
page_start.clear();
|
||||||
#endif
|
#endif
|
||||||
resetWidget(true);
|
resetWidget(true);
|
||||||
|
delete details_line;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMenuWidget::addItem(CMenuItem* menuItem, const bool defaultselected)
|
void CMenuWidget::addItem(CMenuItem* menuItem, const bool defaultselected)
|
||||||
@@ -1070,7 +1072,6 @@ void CMenuWidget::paintHint(int pos)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
fb_pixel_t col1 = COL_MENUCONTENT_PLUS_6;
|
fb_pixel_t col1 = COL_MENUCONTENT_PLUS_6;
|
||||||
fb_pixel_t col2 = COL_MENUCONTENT_PLUS_1;
|
|
||||||
int rad = RADIUS_LARGE;
|
int rad = RADIUS_LARGE;
|
||||||
|
|
||||||
int xpos = x - ConnectLineBox_Width;
|
int xpos = x - ConnectLineBox_Width;
|
||||||
@@ -1078,8 +1079,9 @@ void CMenuWidget::paintHint(int pos)
|
|||||||
int iwidth = width+sb_width;
|
int iwidth = width+sb_width;
|
||||||
|
|
||||||
if (hint_painted) {
|
if (hint_painted) {
|
||||||
/* clear line box */
|
/* clear detailsline line */
|
||||||
frameBuffer->paintBackgroundBoxRel(xpos, y+SHADOW_OFFSET, ConnectLineBox_Width, height+hint_height+rad);
|
if (details_line != NULL)
|
||||||
|
details_line->hide();
|
||||||
/* clear info box */
|
/* clear info box */
|
||||||
frameBuffer->paintBackgroundBoxRel(x, ypos2, iwidth+SHADOW_OFFSET, hint_height+SHADOW_OFFSET);
|
frameBuffer->paintBackgroundBoxRel(x, ypos2, iwidth+SHADOW_OFFSET, hint_height+SHADOW_OFFSET);
|
||||||
|
|
||||||
@@ -1098,33 +1100,18 @@ printf("paintHint: icon %s text %s\n", item->hintIcon.c_str(), g_Locale->getText
|
|||||||
|
|
||||||
int iheight = item->getHeight();
|
int iheight = item->getHeight();
|
||||||
|
|
||||||
|
//details line
|
||||||
int ypos1 = item->getYPosition();
|
int ypos1 = item->getYPosition();
|
||||||
int ypos1a = ypos1 + (iheight/2)-2;
|
int ypos1a = ypos1 + (iheight/2)-2;
|
||||||
int ypos2a = ypos2 + (hint_height/2)-2;
|
int ypos2a = ypos2 + (hint_height/2)-2;
|
||||||
|
|
||||||
int markh = hint_height > rad*2 ? hint_height - rad*2 : hint_height;
|
int markh = hint_height > rad*2 ? hint_height - rad*2 : hint_height;
|
||||||
int imarkh = iheight/2+1;
|
int imarkh = iheight/2+1;
|
||||||
int imarkoff = iheight/4;
|
|
||||||
|
if (details_line == NULL)
|
||||||
/* horizontal item mark - */
|
details_line = new CComponentsDetailLine(xpos, ypos1a, ypos2a, imarkh, markh);
|
||||||
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-4, ypos1+imarkoff, 4, imarkh, col1);
|
else
|
||||||
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-4, ypos1+imarkoff, 1, imarkh, col2);
|
details_line->setYPos(ypos1a);
|
||||||
|
details_line->paint();
|
||||||
/* 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);
|
|
||||||
|
|
||||||
/* box shadow */
|
/* box shadow */
|
||||||
frameBuffer->paintBoxRel(x+SHADOW_OFFSET, ypos2+SHADOW_OFFSET, width + sb_width, hint_height, COL_MENUCONTENTDARK_PLUS_0, rad);
|
frameBuffer->paintBoxRel(x+SHADOW_OFFSET, ypos2+SHADOW_OFFSET, width + sb_width, hint_height, COL_MENUCONTENTDARK_PLUS_0, rad);
|
||||||
|
@@ -41,6 +41,7 @@
|
|||||||
#include <system/localize.h>
|
#include <system/localize.h>
|
||||||
#include <gui/widget/icons.h>
|
#include <gui/widget/icons.h>
|
||||||
#include <gui/color.h>
|
#include <gui/color.h>
|
||||||
|
#include <gui/widget/components.h>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@@ -422,6 +423,7 @@ class CMenuWidget : public CMenuTarget
|
|||||||
private:
|
private:
|
||||||
mn_widget_id_t widget_index;
|
mn_widget_id_t widget_index;
|
||||||
CMenuGlobal *mglobal;
|
CMenuGlobal *mglobal;
|
||||||
|
CComponentsDetailLine *details_line;
|
||||||
protected:
|
protected:
|
||||||
std::string nameString;
|
std::string nameString;
|
||||||
neutrino_locale_t name;
|
neutrino_locale_t name;
|
||||||
|
Reference in New Issue
Block a user