mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-14 00:43:35 +02:00
Merge branch 'ni/tuxbox' into ni/mp/tuxbox
Origin commit data
------------------
Commit: 98edb55233
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-06-26 (Mon, 26 Jun 2017)
This commit is contained in:
@@ -217,7 +217,7 @@ void CComponentsButton::initCaption()
|
||||
* These dimensions must be enough to display complete content like possible icon and without truncated text.
|
||||
*/
|
||||
Font *tmp_font = cc_btn_font;
|
||||
if ((tmp_font->getHeight()-reduce) > (height-reduce) && (tmp_font->getRenderWidth(cc_btn_text)-reduce) > width-reduce)
|
||||
if ((tmp_font->getHeight()-reduce) > (height-reduce) || (tmp_font->getRenderWidth(cc_btn_text)-reduce) > width-reduce)
|
||||
tmp_font = *cc_btn_dy_font->getDynFont(w_cap, h_cap, cc_btn_text);
|
||||
if ((cc_btn_font->getHeight()-reduce) > (height-reduce))
|
||||
tmp_font = *cc_btn_dy_font->getDynFont(w_cap, h_cap, cc_btn_text);
|
||||
|
@@ -336,7 +336,7 @@ void CComponentsFooter::paintButtons(const int& x_pos,
|
||||
this->setDimensionsAll(x_pos, y_pos, w, h);
|
||||
this->setButtonFont(font);
|
||||
this->setContextButton(context_buttons);
|
||||
this->setButtonLabels(content, label_count, 0, label_width ? label_width : w/label_count);
|
||||
this->setButtonLabels(content, label_count, 0, label_width ? label_width : (w/label_count) - 2*cch_offset);
|
||||
this->paint(do_save_bg);
|
||||
}
|
||||
|
||||
|
@@ -65,21 +65,18 @@ CComponentsHeader::CComponentsHeader( const int& x_pos, const int& y_pos, const
|
||||
initVarHeader(x_pos, y_pos, w, h, caption, icon_name, buttons, parent, shadow_mode, color_frame, color_body, color_shadow);
|
||||
}
|
||||
|
||||
CComponentsHeaderLocalized::CComponentsHeaderLocalized( const int& x_pos, const int& y_pos, const int& w, const int& h,
|
||||
neutrino_locale_t caption_locale,
|
||||
const std::string& icon_name,
|
||||
const int& buttons,
|
||||
CComponentsForm* parent,
|
||||
int shadow_mode,
|
||||
fb_pixel_t color_frame,
|
||||
fb_pixel_t color_body,
|
||||
fb_pixel_t color_shadow)
|
||||
:CComponentsHeader( x_pos, y_pos, w, h,
|
||||
g_Locale->getText(caption_locale),
|
||||
icon_name, buttons,
|
||||
parent,
|
||||
shadow_mode,
|
||||
color_frame, color_body, color_shadow){};
|
||||
CComponentsHeader::CComponentsHeader( const int& x_pos, const int& y_pos, const int& w, const int& h,
|
||||
neutrino_locale_t caption_locale,
|
||||
const std::string& icon_name,
|
||||
const int& buttons,
|
||||
CComponentsForm* parent,
|
||||
int shadow_mode,
|
||||
fb_pixel_t color_frame,
|
||||
fb_pixel_t color_body,
|
||||
fb_pixel_t color_shadow)
|
||||
{
|
||||
initVarHeader(x_pos, y_pos, w, h, g_Locale->getText(caption_locale), icon_name, buttons, parent, shadow_mode, color_frame, color_body, color_shadow);
|
||||
};
|
||||
|
||||
void CComponentsHeader::initVarHeader( const int& x_pos, const int& y_pos, const int& w, const int& h,
|
||||
const std::string& caption,
|
||||
|
@@ -170,7 +170,17 @@ class CComponentsHeader : public CComponentsForm, public CCTextScreen, CCHeaderT
|
||||
CComponentsHeader(CComponentsForm *parent = NULL);
|
||||
CComponentsHeader( const int& x_pos, const int& y_pos, const int& w, const int& h = 0,
|
||||
const std::string& caption = std::string(),
|
||||
const std::string& = std::string(),
|
||||
const std::string& icon_name = std::string(),
|
||||
const int& buttons = 0,
|
||||
CComponentsForm *parent = NULL,
|
||||
int shadow_mode = CC_SHADOW_OFF,
|
||||
fb_pixel_t color_frame = COL_FRAME_PLUS_0,
|
||||
fb_pixel_t color_body = COL_MENUHEAD_PLUS_0,
|
||||
fb_pixel_t color_shadow = COL_SHADOW_PLUS_0);
|
||||
|
||||
CComponentsHeader( const int& x_pos, const int& y_pos, const int& w, const int& h = 0,
|
||||
neutrino_locale_t caption_locale = NONEXISTANT_LOCALE,
|
||||
const std::string& icon_name = std::string(),
|
||||
const int& buttons = 0,
|
||||
CComponentsForm *parent = NULL,
|
||||
int shadow_mode = CC_SHADOW_OFF,
|
||||
@@ -346,23 +356,4 @@ class CComponentsHeader : public CComponentsForm, public CCTextScreen, CCHeaderT
|
||||
CComponentsChannelLogoScalable* getChannelLogoObject(){return cch_logo_obj;}
|
||||
};
|
||||
|
||||
//! Sub class of CComponentsHeader.
|
||||
/*!
|
||||
CComponentsHeaderLocalized provides prepared items like icon, caption and context button icons, mostly for usage in menues or simple windows
|
||||
Caption is defined with locales.
|
||||
*/
|
||||
class CComponentsHeaderLocalized : public CComponentsHeader
|
||||
{
|
||||
public:
|
||||
CComponentsHeaderLocalized( const int& x_pos, const int& y_pos, const int& w, const int& h = 0,
|
||||
neutrino_locale_t caption_locale = NONEXISTANT_LOCALE,
|
||||
const std::string& = "",
|
||||
const int& buttons = 0,
|
||||
CComponentsForm *parent = NULL,
|
||||
int shadow_mode = CC_SHADOW_OFF,
|
||||
fb_pixel_t color_frame = COL_FRAME_PLUS_0,
|
||||
fb_pixel_t color_body = COL_MENUHEAD_PLUS_0,
|
||||
fb_pixel_t color_shadow = COL_SHADOW_PLUS_0);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -94,7 +94,7 @@ void CComponentsScrollBar::initVarSbForm(const int& count, const fb_pixel_t& col
|
||||
sb_down_obj = NULL;
|
||||
sb_segments_obj = NULL;
|
||||
|
||||
setCorner(RADIUS_NONE, CORNER_ALL); //NI
|
||||
corner_type = CORNER_NONE;
|
||||
|
||||
sb_up_icon = frameBuffer->getIconPath(NEUTRINO_ICON_BUTTON_UP) ;
|
||||
sb_down_icon = frameBuffer->getIconPath(NEUTRINO_ICON_BUTTON_DOWN);
|
||||
|
@@ -201,12 +201,16 @@ typedef struct button_label_cc
|
||||
#define CC_WIDTH_MIN CFrameBuffer::getInstance()->scale2Res(16)
|
||||
#define CC_HEIGHT_MIN CC_WIDTH_MIN
|
||||
|
||||
//shadow defines
|
||||
#define CC_SHADOW_OFF 0x0
|
||||
#define CC_SHADOW_RIGHT 0x2
|
||||
#define CC_SHADOW_BOTTOM 0x4
|
||||
#define CC_SHADOW_CORNER_BOTTOM_LEFT 0x8
|
||||
#define CC_SHADOW_CORNER_BOTTOM_RIGHT 0x10
|
||||
#define CC_SHADOW_CORNER_TOP_RIGHT 0x20
|
||||
//prepared combined shadow defines
|
||||
#define CC_SHADOW_RIGHT_CORNER_ALL CC_SHADOW_RIGHT | CC_SHADOW_CORNER_BOTTOM_RIGHT | CC_SHADOW_CORNER_TOP_RIGHT
|
||||
#define CC_SHADOW_BOTTOM_CORNER_ALL CC_SHADOW_BOTTOM | CC_SHADOW_CORNER_BOTTOM_RIGHT | CC_SHADOW_CORNER_BOTTOM_LEFT
|
||||
#define CC_SHADOW_ON CC_SHADOW_RIGHT | CC_SHADOW_BOTTOM | CC_SHADOW_CORNER_BOTTOM_LEFT | CC_SHADOW_CORNER_BOTTOM_RIGHT | CC_SHADOW_CORNER_TOP_RIGHT
|
||||
|
||||
#define CC_SAVE_SCREEN_YES true
|
||||
|
Reference in New Issue
Block a user