Merge branch 'master' into pu/mp

Conflicts:
	src/gui/epgplus.cpp


Origin commit data
------------------
Branch: ni/coolstream
Commit: 064f693bf7
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-04-08 (Sat, 08 Apr 2017)



------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2017-04-08 14:36:12 +02:00
19 changed files with 1060 additions and 1031 deletions

View File

@@ -730,6 +730,7 @@ fontsize.epg_date EPG Datum
fontsize.epg_info1 EPG Info 1 fontsize.epg_info1 EPG Info 1
fontsize.epg_info2 EPG Info 2 fontsize.epg_info2 EPG Info 2
fontsize.epg_title EPG Titel fontsize.epg_title EPG Titel
fontsize.epgplus_item EPG-Plus Listeneintrag
fontsize.eventlist_datetime Datum/Zeit fontsize.eventlist_datetime Datum/Zeit
fontsize.eventlist_event Event Info fontsize.eventlist_event Event Info
fontsize.eventlist_itemlarge Groß fontsize.eventlist_itemlarge Groß

View File

@@ -730,6 +730,7 @@ fontsize.epg_date EPG Date
fontsize.epg_info1 EPG Info 1 fontsize.epg_info1 EPG Info 1
fontsize.epg_info2 EPG Info 2 fontsize.epg_info2 EPG Info 2
fontsize.epg_title EPG Title fontsize.epg_title EPG Title
fontsize.epgplus_item EPG-Plus item
fontsize.eventlist_datetime Date and time fontsize.eventlist_datetime Date and time
fontsize.eventlist_event Event Info fontsize.eventlist_event Event Info
fontsize.eventlist_itemlarge Large fontsize.eventlist_itemlarge Large

View File

@@ -49,7 +49,7 @@ CCDraw::CCDraw() : COSDFader(g_settings.theme.menu_Content_alpha)
fr_thickness = fr_thickness_old = 0; fr_thickness = fr_thickness_old = 0;
corner_type = corner_type_old = CORNER_ALL; corner_type = corner_type_old = CORNER_NONE;
corner_rad = corner_rad_old = 0; corner_rad = corner_rad_old = 0;
shadow = CC_SHADOW_OFF; shadow = CC_SHADOW_OFF;
@@ -497,16 +497,6 @@ void CCDraw::paintFbItems(bool do_save_bg)
break; break;
} }
dprintf(DEBUG_DEBUG, "[CCDraw]\n\t[%s - %d] firstPaint->save screen: %d, fbdata_type: %d\n\tx = %d\n\ty = %d\n\tdx = %d\n\tdy = %d\n",
__func__,
__LINE__,
firstPaint,
v_fbdata[i].fbdata_type,
v_fbdata[i].x,
v_fbdata[i].y,
v_fbdata[i].dx,
v_fbdata[i].dy);
/* Here we save the background of current box before paint. /* Here we save the background of current box before paint.
* Only the reserved fbdata type CC_FBDATA_TYPE_BGSCREEN is here required and is used for this. * Only the reserved fbdata type CC_FBDATA_TYPE_BGSCREEN is here required and is used for this.
* This pixel buffer is required for the hide() method that will * This pixel buffer is required for the hide() method that will
@@ -524,20 +514,15 @@ void CCDraw::paintFbItems(bool do_save_bg)
for(size_t i=0; i< v_fbdata.size(); i++){ for(size_t i=0; i< v_fbdata.size(); i++){
cc_fbdata_t& fbdata = v_fbdata[i]; cc_fbdata_t& fbdata = v_fbdata[i];
// Don't paint on dimension or position error dx or dy are 0.
if (!CheckFbData(fbdata, __func__, __LINE__)){
continue;
}
int fbtype = fbdata.fbdata_type; int fbtype = fbdata.fbdata_type;
dprintf(DEBUG_DEBUG, "[CCDraw]\n\t[%s - %d], fbdata_[%d]\n\tx = %d\n\ty = %d\n\tdx = %d\n\tdy = %d\n", //ignore bg screen layer
__func__, if (fbtype == CC_FBDATA_TYPE_BGSCREEN)
__LINE__, continue;
(int)i,
fbdata.x, // Don't paint on dimension or position error dx or dy are 0.
fbdata.y, if (!CheckFbData(fbdata, __func__, __LINE__))
fbdata.dx, continue;
fbdata.dy);
/* Paint all fb relevant basic parts (shadow, frame and body) /* Paint all fb relevant basic parts (shadow, frame and body)
* with all specified properties, paint_bg must be enabled. * with all specified properties, paint_bg must be enabled.
@@ -548,12 +533,14 @@ void CCDraw::paintFbItems(bool do_save_bg)
frameBuffer->paintBoxFrame(fbdata.x, fbdata.y, fbdata.dx, fbdata.dy, fbdata.frame_thickness, fbdata.color, fbdata.r, fbdata.rtype); frameBuffer->paintBoxFrame(fbdata.x, fbdata.y, fbdata.dx, fbdata.dy, fbdata.frame_thickness, fbdata.color, fbdata.r, fbdata.rtype);
v_fbdata[i].is_painted = true; v_fbdata[i].is_painted = true;
} }
continue;
} }
} }
if (paint_bg){ if (paint_bg){
if (fbtype == CC_FBDATA_TYPE_BACKGROUND){ if (fbtype == CC_FBDATA_TYPE_BACKGROUND){
frameBuffer->paintBackgroundBoxRel(x, y, fbdata.dx, fbdata.dy); frameBuffer->paintBackgroundBoxRel(fbdata.x, fbdata.y, fbdata.dx, fbdata.dy);
v_fbdata[i].is_painted = true; v_fbdata[i].is_painted = true;
continue;
} }
} }
if (fbtype == CC_FBDATA_TYPE_SHADOW_BOX && ((!is_painted || !fbdata.is_painted)|| shadow_force || force_paint_bg)) { if (fbtype == CC_FBDATA_TYPE_SHADOW_BOX && ((!is_painted || !fbdata.is_painted)|| shadow_force || force_paint_bg)) {
@@ -575,6 +562,7 @@ void CCDraw::paintFbItems(bool do_save_bg)
fbdata.pixbuf = getScreen(fbdata.x, fbdata.y, fbdata.dx, fbdata.dy); fbdata.pixbuf = getScreen(fbdata.x, fbdata.y, fbdata.dx, fbdata.dy);
fbdata.is_painted = true; fbdata.is_painted = true;
} }
continue;
} }
} }
if (paint_bg){ if (paint_bg){

View File

@@ -72,8 +72,6 @@ class CComponentsButton : public CComponentsFrmChain, public CCTextScreen
///property: container for all assigned event message values, see driver/rcinput.h for possible values, default value = CRCInput::RC_nokey, see also setButtonDirectKey(), hasButtonDirectKey() ///property: container for all assigned event message values, see driver/rcinput.h for possible values, default value = CRCInput::RC_nokey, see also setButtonDirectKey(), hasButtonDirectKey()
std::vector<neutrino_msg_t>cc_directKeys; std::vector<neutrino_msg_t>cc_directKeys;
///property: assigned an alternate event message value, see driver/rcinput.h for possible values, default value = CRCInput::RC_nokey, see also setButtonDirectKeyAlt(), hasButtonDirectKeyAlt()
neutrino_msg_t cc_directKeyAlt;
///property: assigned return value, see also setButtonResult(), getButtonResult(), default value = -1 (not defined) ///property: assigned return value, see also setButtonResult(), getButtonResult(), default value = -1 (not defined)
int cc_btn_result; int cc_btn_result;
///property: assigned alias value, see also setButtonAlias(), getButtonAlias(), default value = -1 (not defined) ///property: assigned alias value, see also setButtonAlias(), getButtonAlias(), default value = -1 (not defined)

View File

@@ -87,6 +87,9 @@ CComponentsFrmClock::CComponentsFrmClock( const int& x_pos,
//set default text background behavior //set default text background behavior
cc_txt_save_screen = false; cc_txt_save_screen = false;
//enable refresh of all segments on each interval as default
cl_force_repaint = true;
//set default running clock properties //set default running clock properties
cl_interval = interval_seconds; cl_interval = interval_seconds;
cl_timer = NULL; cl_timer = NULL;
@@ -255,7 +258,7 @@ void CComponentsFrmClock::initCCLockItems()
//set size, text, color of current item //set size, text, color of current item
lbl->setDimensionsAll(x_tmp, y_tmp, w_tmp, h_tmp); lbl->setDimensionsAll(x_tmp, y_tmp, w_tmp, h_tmp);
lbl->setColorAll(col_frame, col_body, col_shadow); lbl->setColorAll(col_frame, col_body, col_shadow);
lbl->forceTextPaint(false); lbl->forceTextPaint(cl_force_repaint);
lbl->setText(stmp, CTextBox::CENTER, cl_font, cl_col_text, cl_font_style); lbl->setText(stmp, CTextBox::CENTER, cl_font, cl_col_text, cl_font_style);
//init background behavior of segment //init background behavior of segment

View File

@@ -70,6 +70,9 @@ class CComponentsFrmClock : public CComponentsForm, public CCTextScreen
///text color ///text color
int cl_col_text; int cl_col_text;
///refresh mode
bool cl_force_repaint;
///current time format ///current time format
std::string cl_format; std::string cl_format;
///primary time format ///primary time format
@@ -151,7 +154,7 @@ class CComponentsFrmClock : public CComponentsForm, public CCTextScreen
///returns true, if clock is running ///returns true, if clock is running
virtual bool isRun() const {return cl_timer ? true : false;}; virtual bool isRun() const {return cl_timer ? true : false;};
///set refresh interval in seconds, default value=1 (=1 sec) ///set refresh interval in seconds, default value=1 (=1 sec)
virtual void setClockInterval(const int& seconds){cl_interval = seconds;}; virtual void setClockInterval(const int& seconds){cl_interval = seconds;}
///show clock on screen ///show clock on screen
virtual void paint(bool do_save_bg = CC_SAVE_SCREEN_YES); virtual void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
@@ -163,6 +166,11 @@ class CComponentsFrmClock : public CComponentsForm, public CCTextScreen
///reinitialize clock contents ///reinitialize clock contents
virtual void refresh() { initCCLockItems(); } virtual void refresh() { initCCLockItems(); }
///enables force to repaint of all segments on each interval, Note: repaint of all segemts is default enabled.
void enableForceSegmentPaint(bool enable = true){cl_force_repaint = enable;}
///disables repaint of all segments on each interval, repaint happens only on changed segment value
void disableForceSegmentPaint(){enableForceSegmentPaint(false);}
/**Member to modify background behavior of embeded segment objects /**Member to modify background behavior of embeded segment objects
* @param[in] mode * @param[in] mode
* @li bool, default = true * @li bool, default = true

View File

@@ -63,11 +63,11 @@ void CComponentsFooter::initVarFooter( const int& x_pos, const int& y_pos, const
{ {
cc_item_type = CC_ITEMTYPE_FOOTER; cc_item_type = CC_ITEMTYPE_FOOTER;
x = x_pos; x = x_old = x_pos;
y = y_pos; y = y_old = y_pos;
//init footer width //init footer width
width = w == 0 ? frameBuffer->getScreenWidth(true) : w; width = width_old = w == 0 ? frameBuffer->getScreenWidth(true) : w;
//init default fonts //init default fonts
initDefaultFonts(); initDefaultFonts();
@@ -77,15 +77,15 @@ void CComponentsFooter::initVarFooter( const int& x_pos, const int& y_pos, const
//init footer height //init footer height
initCaptionFont(); initCaptionFont();
height = max(h, cch_font->getHeight()); height = height_old = max(h, cch_font->getHeight());
shadow = shadow_mode; shadow = shadow_mode;
ccf_enable_button_shadow = false ; ccf_enable_button_shadow = false ;
ccf_button_shadow_width = shadow ? OFFSET_SHADOW/2 : 0; ccf_button_shadow_width = shadow ? OFFSET_SHADOW/2 : 0;
ccf_button_shadow_force_paint = false; ccf_button_shadow_force_paint = false;
col_frame = color_frame; col_frame = col_frame_old = color_frame;
col_body = color_body; col_body = col_body_old = color_body;
col_shadow = color_shadow; col_shadow = col_shadow_old = color_shadow;
cc_body_gradient_enable = cc_body_gradient_enable_old = CC_COLGRAD_OFF/*g_settings.theme.menu_ButtonBar_gradient*/; //TODO: not complete implemented at the moment cc_body_gradient_enable = cc_body_gradient_enable_old = CC_COLGRAD_OFF/*g_settings.theme.menu_ButtonBar_gradient*/; //TODO: not complete implemented at the moment
cc_body_gradient_direction = CFrameBuffer::gradientVertical; cc_body_gradient_direction = CFrameBuffer::gradientVertical;
cc_body_gradient_mode = CColorGradient::gradientDark2Light; cc_body_gradient_mode = CColorGradient::gradientDark2Light;
@@ -100,6 +100,9 @@ void CComponentsFooter::initVarFooter( const int& x_pos, const int& y_pos, const
addContextButton(buttons); addContextButton(buttons);
initCCItems(); initCCItems();
initParent(parent); initParent(parent);
//init repaint slot before re paint of body, if paint() is already done
initRepaintSlot();
} }
void CComponentsFooter::setButtonLabels(const struct button_label_cc * const content, const size_t& label_count, const int& chain_width, const int& label_width) void CComponentsFooter::setButtonLabels(const struct button_label_cc * const content, const size_t& label_count, const int& chain_width, const int& label_width)

View File

@@ -136,13 +136,17 @@ void CComponentsHeader::initVarHeader( const int& x_pos, const int& y_pos, const
cch_cl_sec_format = cch_cl_format; cch_cl_sec_format = cch_cl_format;
cch_cl_enable_run = false; cch_cl_enable_run = false;
//init slot before re paint of header, paint() is already done
sl_form_repaint = sigc::bind(sigc::mem_fun(*this, &CComponentsHeader::kill), col_body, -1, CC_FBDATA_TYPES, false);
OnBeforeRePaint.connect(sl_form_repaint);
addContextButton(buttons); addContextButton(buttons);
initCCItems(); initCCItems();
initParent(parent); initParent(parent);
//init repaint slot before re paint of body, if paint() is already done
initRepaintSlot();
}
void CComponentsHeader::initRepaintSlot(){
sl_form_repaint = sigc::bind(sigc::mem_fun(*this, &CComponentsHeader::kill), cc_parent ? col_body : 0, -1, CC_FBDATA_TYPES, false);
OnBeforeRePaint.connect(sl_form_repaint);
} }
CComponentsHeader::~CComponentsHeader() CComponentsHeader::~CComponentsHeader()

View File

@@ -112,6 +112,8 @@ class CComponentsHeader : public CComponentsForm, public CCTextScreen
void initButtons(); void initButtons();
///sub: init clock object ///sub: init clock object
void initClock(); void initClock();
///int repaint slot
void initRepaintSlot();
public: public:
enum enum

View File

@@ -89,11 +89,16 @@ void CComponentsItem::paintInit(bool do_save_bg)
//set current needed corner main box radius //set current needed corner main box radius
int box_rad = corner_type ? corner_rad : 0; int box_rad = corner_type ? corner_rad : 0;
//and ensure max main box radius < dimensions //and ensure max main box radius < dimensions, avoids possible fb artefacts on screen
if (2*box_rad > dy) int box_rad2 = box_rad/2;
box_rad -= max(0, 2*box_rad-dy); if(box_rad2 > dy || box_rad2 > dx){
if (2*box_rad > dx) int tmp_rad = box_rad;
box_rad -= max(0, 2*box_rad-dy); if (box_rad2 > dx)
tmp_rad = (box_rad2-dx)*2;
if (box_rad2 > dy)
tmp_rad = (box_rad2-dy)*2;
box_rad = tmp_rad;
}
//Workaround: ensure radius values >= 0, framebuffer methode paintBoxRel() gets confused //Workaround: ensure radius values >= 0, framebuffer methode paintBoxRel() gets confused
box_rad = max(box_rad, 0); box_rad = max(box_rad, 0);
@@ -113,13 +118,12 @@ void CComponentsItem::paintInit(bool do_save_bg)
int sh_cdy = box_rad+sw+th; //height int sh_cdy = box_rad+sw+th; //height
//adapt shadow corner dimensions if body dimensions are too small, use an offset if required //adapt shadow corner dimensions if body dimensions are too small, use an offset if required
int /*sh_cdx_size_offset,*/ sh_cdy_size_offset = 0; int /*sh_cdx_size_offset = 0,*/ sh_cdy_size_offset = 0;
if (sh_cdy*2 > dy) if (sh_cdy*2 > dy)
sh_cdy_size_offset = sh_cdy*2-dy; sh_cdy_size_offset = sh_cdy*2-dy;
#if 0 // if (sh_cdx*2 > dx)
if (sh_cdx*2 > dx) // sh_cdx_size_offset = sh_cdx*2-dx;
sh_cdx_size_offset = sh_cdx*2-dx;
#endif
//handle shadow positions //handle shadow positions
//...corner bottom right //...corner bottom right
int sh_cbr_x = ix+dx-sh_cdx+sw; int sh_cbr_x = ix+dx-sh_cdx+sw;

View File

@@ -74,6 +74,9 @@ CComponentsShapeCircle::CComponentsShapeCircle( int x_pos, int y_pos, int diam,
//CComponents //CComponents
x = x_pos; x = x_pos;
y = y_pos; y = y_pos;
corner_type = corner_type_old = CORNER_ALL;
//width = height = d = diam; //width = height = d = diam;
shadow = shadow_mode; shadow = shadow_mode;
shadow_w = OFFSET_SHADOW; shadow_w = OFFSET_SHADOW;

File diff suppressed because it is too large Load Diff

View File

@@ -3,14 +3,7 @@
Copyright (C) 2001 Steffen Hehn 'McClean' Copyright (C) 2001 Steffen Hehn 'McClean'
Copyright (C) 2004 Martin Griep 'vivamiga' Copyright (C) 2004 Martin Griep 'vivamiga'
Copyright (C) 2017 Sven Hoefer
Kommentar:
Diese GUI wurde von Grund auf neu programmiert und sollte nun vom
Aufbau und auch den Ausbaumoeglichkeiten gut aussehen. Neutrino basiert
auf der Client-Server Idee, diese GUI ist also von der direkten DBox-
Steuerung getrennt. Diese wird dann von Daemons uebernommen.
License: GPL License: GPL
@@ -29,10 +22,10 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
#ifndef __epgplus__
#define __epgplus__
#ifndef __EPGPLUS_HPP__ #include <gui/components/cc.h>
#define __EPGPLUS_HPP__
#include "widget/menue.h" #include "widget/menue.h"
#include <string> #include <string>
@@ -47,46 +40,19 @@ class EpgPlus
{ {
//// types, inner classes //// types, inner classes
public: public:
enum FontSettingID
{
EPGPlus_header_font = 0,
EPGPlus_timeline_fonttime,
EPGPlus_timeline_fontdate,
EPGPlus_channelentry_font,
EPGPlus_channelevententry_font,
EPGPlus_footer_fontbouquetchannelname,
EPGPlus_footer_fonteventdescription,
EPGPlus_footer_fonteventshortdescription,
EPGPlus_footer_fontbuttons,
NumberOfFontSettings
};
enum SizeSettingID enum SizeSettingID
{ {
EPGPlus_channelentry_width = 0, EPGPlus_channelentry_width = 0,
EPGPlus_channelentry_separationlineheight, EPGPlus_separationline_thickness,
EPGPlus_slider_width,
EPGPlus_horgap1_height,
EPGPlus_horgap2_height,
EPGPlus_vergap1_width,
EPGPlus_vergap2_width,
NumberOfSizeSettings NumberOfSizeSettings
}; };
struct FontSetting
{
FontSettingID settingID;
const char* style;
int size;
};
struct SizeSetting struct SizeSetting
{ {
SizeSettingID settingID; SizeSettingID settingID;
int size; int size;
}; };
enum TViewMode enum TViewMode
{ {
ViewMode_Stretch, ViewMode_Stretch,
@@ -105,7 +71,10 @@ public:
{ {
//// construction / destruction //// construction / destruction
public: public:
Header ( CFrameBuffer* frameBuffer , int x , int y , int width); Header(CFrameBuffer* frameBuffer,
int x,
int y,
int width);
~Header(); ~Header();
@@ -133,7 +102,12 @@ public:
{ {
//// construction / destruction //// construction / destruction
public: public:
TimeLine ( CFrameBuffer* frameBuffer , int x , int y , int width , int startX , int durationX); TimeLine(CFrameBuffer* frameBuffer,
int x,
int y,
int width,
int startX,
int durationX);
~TimeLine(); ~TimeLine();
@@ -160,9 +134,9 @@ public:
int x; int x;
int y; int y;
int width; int width;
static int separationLineThickness;
static Font* fontTime; static Font* font;
static Font* fontDate;
int startX; int startX;
int durationX; int durationX;
@@ -172,15 +146,13 @@ public:
{ {
//// construction / destruction //// construction / destruction
public: public:
ChannelEventEntry ChannelEventEntry(const CChannelEvent* channelEvent,
( const CChannelEvent* channelEvent CFrameBuffer* frameBuffer,
, CFrameBuffer* frameBuffer TimeLine* timeLine,
, TimeLine* timeLine Footer* footer,
, Footer* footer int x,
, int x int y,
, int y int width);
, int width
);
~ChannelEventEntry(); ~ChannelEventEntry();
@@ -188,14 +160,9 @@ public:
public: public:
static void init(); static void init();
bool isSelected bool isSelected(time_t selectedTime) const;
( time_t selectedTime
) const;
void paint void paint(bool isSelected, bool toggleColor);
( bool isSelected
, bool toggleColor
);
static int getUsedHeight(); static int getUsedHeight();
@@ -210,7 +177,7 @@ public:
int x; int x;
int y; int y;
int width; int width;
static int separationLineHeight; static int separationLineThickness;
static Font* font; static Font* font;
}; };
@@ -221,16 +188,14 @@ public:
{ {
//// construction / destruction //// construction / destruction
public: public:
ChannelEntry ChannelEntry(const CZapitChannel* channel,
( const CZapitChannel* channel int index,
, int index CFrameBuffer* frameBuffer,
, CFrameBuffer* frameBuffer Footer* footer,
, Footer* footer CBouquetList* bouquetList,
, CBouquetList* bouquetList int x,
, int x int y,
, int y int width);
, int width
);
~ChannelEntry(); ~ChannelEntry();
@@ -238,10 +203,7 @@ public:
public: public:
static void init(); static void init();
void paint void paint(bool isSelected, time_t selectedTime);
( bool isSelected
, time_t selectedTime
);
static int getUsedHeight(); static int getUsedHeight();
@@ -258,11 +220,12 @@ public:
int x; int x;
int y; int y;
int width; int width;
static int separationLineHeight; static int separationLineThickness;
static Font* font; static Font* font;
TCChannelEventEntries channelEventEntries; TCChannelEventEntries channelEventEntries;
CComponentsDetailsLine *detailsLine;
}; };
typedef std::vector<ChannelEntry*> TChannelEntries; typedef std::vector<ChannelEntry*> TChannelEntries;
@@ -271,13 +234,11 @@ public:
{ {
//// construction / destruction //// construction / destruction
public: public:
Footer Footer(CFrameBuffer* frameBuffer,
( CFrameBuffer* frameBuffer int x,
, int x int y,
, int y int width,
, int width int height);
, int height
);
~Footer(); ~Footer();
@@ -285,20 +246,11 @@ public:
public: public:
static void init(); static void init();
void setBouquetChannelName void setBouquetChannelName(const std::string& newBouquetName, const std::string& newChannelName);
( const std::string& newBouquetName
, const std::string& newChannelName
);
void paintEventDetails void paintEventDetails(const std::string& description, const std::string& shortDescription);
( const std::string& description
, const std::string& shortDescription
);
void paintButtons void paintButtons(button_label* buttonLabels, int numberOfButtons);
( button_label* buttonLabels
, int numberOfButtons
);
static int getUsedHeight(); static int getUsedHeight();
@@ -309,20 +261,18 @@ public:
int x; int x;
int y; int y;
int width; int width;
int buttonY;
int buttonHeight; int buttonHeight;
static Font* fontBouquetChannelName; static Font* fontBouquetChannelName;
static Font* fontEventDescription; static Font* fontEventDescription;
static Font* fontEventShortDescription; static Font* fontEventInfo1;
static Font* fontButtons;
static int color;
std::string currentBouquetName; std::string currentBouquetName;
std::string currentChannelName; std::string currentChannelName;
}; };
class MenuTargetAddReminder : public CMenuTarget class MenuTargetAddReminder : public CMenuTarget
{ {
public: public:
@@ -370,13 +320,12 @@ public:
virtual ~MenuOptionChooserSwitchSwapMode(); virtual ~MenuOptionChooserSwitchSwapMode();
public: public:
int exec int exec(CMenuTarget* parent);
( CMenuTarget* parent);
private: private:
EpgPlus* epgPlus;
int oldTimingMenuSettings; int oldTimingMenuSettings;
TSwapMode oldSwapMode; TSwapMode oldSwapMode;
EpgPlus* epgPlus;
}; };
class MenuOptionChooserSwitchViewMode : public CMenuOptionChooser class MenuOptionChooserSwitchViewMode : public CMenuOptionChooser
@@ -424,10 +373,10 @@ public:
static int sizes[NumberOfSizeSettings]; static int sizes[NumberOfSizeSettings];
*/ */
friend class EpgPlus::ChannelEventEntry;
friend class EpgPlus::ChannelEntry;
friend class EpgPlus::MenuOptionChooserSwitchSwapMode; friend class EpgPlus::MenuOptionChooserSwitchSwapMode;
friend class EpgPlus::MenuOptionChooserSwitchViewMode; friend class EpgPlus::MenuOptionChooserSwitchViewMode;
friend class EpgPlus::ChannelEntry;
friend class EpgPlus::ChannelEventEntry;
//// construction / destruction //// construction / destruction
public: public:
@@ -476,6 +425,7 @@ private:
static time_t duration; static time_t duration;
int entryHeight; int entryHeight;
static int entryFontSize;
TViewMode currentViewMode; TViewMode currentViewMode;
TSwapMode currentSwapMode; TSwapMode currentSwapMode;
@@ -493,6 +443,8 @@ private:
int timeLineY; int timeLineY;
int timeLineWidth; int timeLineWidth;
int bodyHeight;
int channelsTableX; int channelsTableX;
int channelsTableY; int channelsTableY;
static int channelsTableWidth; static int channelsTableWidth;
@@ -507,36 +459,11 @@ private:
int sliderY; int sliderY;
static int sliderWidth; static int sliderWidth;
int sliderHeight; int sliderHeight;
static int sliderBackColor;
static int sliderKnobColor;
int footerX; int footerX;
int footerY; int footerY;
int footerWidth; int footerWidth;
int horGap1X;
int horGap1Y;
int horGap1Width;
int horGap2X;
int horGap2Y;
int horGap2Width;
int verGap1X;
int verGap1Y;
int verGap1Height;
int verGap2X;
int verGap2Y;
int verGap2Height;
static int horGap1Height;
static int horGap2Height;
static int verGap1Width;
static int verGap2Width;
static int horGap1Color;
static int horGap2Color;
static int verGap1Color;
static int verGap2Color;
bool refreshAll; bool refreshAll;
bool refreshFooterButtons; bool refreshFooterButtons;
}; };
@@ -547,4 +474,4 @@ class CEPGplusHandler : public CMenuTarget
int exec(CMenuTarget* parent, const std::string &actionKey); int exec(CMenuTarget* parent, const std::string &actionKey);
}; };
#endif #endif // __epgplus__

View File

@@ -692,8 +692,8 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
if (doLoop) if (doLoop)
{ {
if (!bigFonts && g_settings.bigFonts) { if (!bigFonts && g_settings.bigFonts) {
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getSize() * BIG_FONT_FAKTOR)); g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getSize() * BIGFONT_FACTOR));
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize() * BIG_FONT_FAKTOR)); g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize() * BIGFONT_FACTOR));
} }
bigFonts = g_settings.bigFonts; bigFonts = g_settings.bigFonts;
start(); start();
@@ -1075,8 +1075,8 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
} else } else
doRecord = false; doRecord = false;
if (!bigFonts && g_settings.bigFonts) { if (!bigFonts && g_settings.bigFonts) {
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getSize() * BIG_FONT_FAKTOR)); g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getSize() * BIGFONT_FACTOR));
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize() * BIG_FONT_FAKTOR)); g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize() * BIGFONT_FACTOR));
} }
bigFonts = g_settings.bigFonts; bigFonts = g_settings.bigFonts;
show(channel_id,epgData.eventID,&epgData.epg_times.startzeit,false); show(channel_id,epgData.eventID,&epgData.epg_times.startzeit,false);
@@ -1091,8 +1091,8 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
hide(); hide();
recDirs.exec(NULL,""); recDirs.exec(NULL,"");
if (!bigFonts && g_settings.bigFonts) { if (!bigFonts && g_settings.bigFonts) {
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getSize() * BIG_FONT_FAKTOR)); g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getSize() * BIGFONT_FACTOR));
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize() * BIG_FONT_FAKTOR)); g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize() * BIGFONT_FACTOR));
} }
bigFonts = g_settings.bigFonts; bigFonts = g_settings.bigFonts;
show(channel_id,epgData.eventID,&epgData.epg_times.startzeit,false); show(channel_id,epgData.eventID,&epgData.epg_times.startzeit,false);
@@ -1234,8 +1234,8 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
loop = false; loop = false;
else { else {
if (!bigFonts && g_settings.bigFonts) { if (!bigFonts && g_settings.bigFonts) {
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getSize() * BIG_FONT_FAKTOR)); g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getSize() * BIGFONT_FACTOR));
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize() * BIG_FONT_FAKTOR)); g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize() * BIGFONT_FACTOR));
} }
bigFonts = g_settings.bigFonts; bigFonts = g_settings.bigFonts;
show(channel_id,tmp_eID,&tmp_sZeit,false); show(channel_id,tmp_eID,&tmp_sZeit,false);
@@ -1253,12 +1253,12 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
//printf("bigFonts %d\n", bigFonts); //printf("bigFonts %d\n", bigFonts);
if (bigFonts) if (bigFonts)
{ {
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getSize() * BIG_FONT_FAKTOR)); g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getSize() * BIGFONT_FACTOR));
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize() * BIG_FONT_FAKTOR)); g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize() * BIGFONT_FACTOR));
} else } else
{ {
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getSize() / BIG_FONT_FAKTOR)); g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getSize() / BIGFONT_FACTOR));
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize() / BIG_FONT_FAKTOR)); g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize() / BIGFONT_FACTOR));
} }
g_settings.bigFonts = bigFonts; g_settings.bigFonts = bigFonts;
if (mp_info) if (mp_info)
@@ -1319,8 +1319,8 @@ void CEpgData::hide()
// 2004-09-10 rasc (bugfix, scale large font settings back to normal) // 2004-09-10 rasc (bugfix, scale large font settings back to normal)
if (bigFonts) { if (bigFonts) {
bigFonts = false; bigFonts = false;
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getSize() / BIG_FONT_FAKTOR)); g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getSize() / BIGFONT_FACTOR));
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize() / BIG_FONT_FAKTOR)); g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize() / BIGFONT_FACTOR));
} }
frameBuffer->paintBackgroundBoxRel(sx, sy, ox, oy); frameBuffer->paintBackgroundBoxRel(sx, sy, ox, oy);

View File

@@ -42,9 +42,6 @@
#include <vector> #include <vector>
#include <string> #include <string>
#define BIG_FONT_FAKTOR 1.5
class CFrameBuffer; class CFrameBuffer;
class CEpgData class CEpgData
{ {

View File

@@ -139,7 +139,8 @@ const SNeutrinoSettings::FONT_TYPES epg_font_sizes[] =
SNeutrinoSettings::FONT_TYPE_EPG_TITLE, SNeutrinoSettings::FONT_TYPE_EPG_TITLE,
SNeutrinoSettings::FONT_TYPE_EPG_INFO1, SNeutrinoSettings::FONT_TYPE_EPG_INFO1,
SNeutrinoSettings::FONT_TYPE_EPG_INFO2, SNeutrinoSettings::FONT_TYPE_EPG_INFO2,
SNeutrinoSettings::FONT_TYPE_EPG_DATE SNeutrinoSettings::FONT_TYPE_EPG_DATE,
SNeutrinoSettings::FONT_TYPE_EPGPLUS_ITEM
}; };
size_t epg_font_items = sizeof(epg_font_sizes)/sizeof(epg_font_sizes[0]); size_t epg_font_items = sizeof(epg_font_sizes)/sizeof(epg_font_sizes[0]);
@@ -199,6 +200,7 @@ font_sizes_struct neutrino_font[SNeutrinoSettings::FONT_TYPE_COUNT] =
{LOCALE_FONTSIZE_EPG_INFO1 , 17, CNeutrinoFonts::FONT_STYLE_ITALIC , 2}, {LOCALE_FONTSIZE_EPG_INFO1 , 17, CNeutrinoFonts::FONT_STYLE_ITALIC , 2},
{LOCALE_FONTSIZE_EPG_INFO2 , 17, CNeutrinoFonts::FONT_STYLE_REGULAR, 2}, {LOCALE_FONTSIZE_EPG_INFO2 , 17, CNeutrinoFonts::FONT_STYLE_REGULAR, 2},
{LOCALE_FONTSIZE_EPG_DATE , 15, CNeutrinoFonts::FONT_STYLE_REGULAR, 2}, {LOCALE_FONTSIZE_EPG_DATE , 15, CNeutrinoFonts::FONT_STYLE_REGULAR, 2},
{LOCALE_FONTSIZE_EPGPLUS_ITEM , 18, CNeutrinoFonts::FONT_STYLE_REGULAR, 2},
{LOCALE_FONTSIZE_EVENTLIST_TITLE , 30, CNeutrinoFonts::FONT_STYLE_REGULAR, 0}, {LOCALE_FONTSIZE_EVENTLIST_TITLE , 30, CNeutrinoFonts::FONT_STYLE_REGULAR, 0},
{LOCALE_FONTSIZE_EVENTLIST_ITEMLARGE, 20, CNeutrinoFonts::FONT_STYLE_BOLD , 1}, {LOCALE_FONTSIZE_EVENTLIST_ITEMLARGE, 20, CNeutrinoFonts::FONT_STYLE_BOLD , 1},
{LOCALE_FONTSIZE_EVENTLIST_ITEMSMALL, 14, CNeutrinoFonts::FONT_STYLE_REGULAR, 1}, {LOCALE_FONTSIZE_EVENTLIST_ITEMSMALL, 14, CNeutrinoFonts::FONT_STYLE_REGULAR, 1},

View File

@@ -757,6 +757,7 @@ typedef enum
LOCALE_FONTSIZE_EPG_INFO1, LOCALE_FONTSIZE_EPG_INFO1,
LOCALE_FONTSIZE_EPG_INFO2, LOCALE_FONTSIZE_EPG_INFO2,
LOCALE_FONTSIZE_EPG_TITLE, LOCALE_FONTSIZE_EPG_TITLE,
LOCALE_FONTSIZE_EPGPLUS_ITEM,
LOCALE_FONTSIZE_EVENTLIST_DATETIME, LOCALE_FONTSIZE_EVENTLIST_DATETIME,
LOCALE_FONTSIZE_EVENTLIST_EVENT, LOCALE_FONTSIZE_EVENTLIST_EVENT,
LOCALE_FONTSIZE_EVENTLIST_ITEMLARGE, LOCALE_FONTSIZE_EVENTLIST_ITEMLARGE,

View File

@@ -757,6 +757,7 @@ const char * locale_real_names[] =
"fontsize.epg_info1", "fontsize.epg_info1",
"fontsize.epg_info2", "fontsize.epg_info2",
"fontsize.epg_title", "fontsize.epg_title",
"fontsize.epgplus_item",
"fontsize.eventlist_datetime", "fontsize.eventlist_datetime",
"fontsize.eventlist_event", "fontsize.eventlist_event",
"fontsize.eventlist_itemlarge", "fontsize.eventlist_itemlarge",

View File

@@ -667,6 +667,7 @@ struct SNeutrinoSettings
FONT_TYPE_EPG_INFO1, FONT_TYPE_EPG_INFO1,
FONT_TYPE_EPG_INFO2, FONT_TYPE_EPG_INFO2,
FONT_TYPE_EPG_DATE, FONT_TYPE_EPG_DATE,
FONT_TYPE_EPGPLUS_ITEM,
FONT_TYPE_EVENTLIST_TITLE, FONT_TYPE_EVENTLIST_TITLE,
FONT_TYPE_EVENTLIST_ITEMLARGE, FONT_TYPE_EVENTLIST_ITEMLARGE,
FONT_TYPE_EVENTLIST_ITEMSMALL, FONT_TYPE_EVENTLIST_ITEMSMALL,
@@ -925,6 +926,8 @@ const time_settings_struct_t timing_setting[SNeutrinoSettings::TIMING_SETTING_CO
#define DETAILSLINE_WIDTH 16 // TODO: scale2Res() ? #define DETAILSLINE_WIDTH 16 // TODO: scale2Res() ?
#define BIGFONT_FACTOR 1.5
struct SglobalInfo struct SglobalInfo
{ {
hw_caps_t *hw_caps; hw_caps_t *hw_caps;