mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 17:31:11 +02:00
rate-banner: fix typos
Origin commit data
------------------
Commit: 714341098b
Author: vanhofen <vanhofen@gmx.de>
Date: 2021-05-09 (Sun, 09 May 2021)
Origin message was:
------------------
- rate-banner: fix typos
This commit is contained in:
@@ -52,32 +52,32 @@ CRateBanner::~CRateBanner()
|
|||||||
|
|
||||||
void CRateBanner::init(const std::string& quote_icon, const std::string& quote_icon_bg, const float& quote, const float& quote_max, const std::string& provider_logo)
|
void CRateBanner::init(const std::string& quote_icon, const std::string& quote_icon_bg, const float& quote, const float& quote_max, const std::string& provider_logo)
|
||||||
{
|
{
|
||||||
cc_item_type.name = "rate_banner";
|
cc_item_type.name = "rate_banner";
|
||||||
append_x_offset = OFFSET_INNER_MIN;
|
append_x_offset = OFFSET_INNER_MIN;
|
||||||
paint_bg = false;
|
paint_bg = false;
|
||||||
rat_prov_logo = provider_logo;
|
rate_prov_logo = provider_logo;
|
||||||
rat_icon = quote_icon;
|
rate_icon = quote_icon;
|
||||||
rat_icon_bg = quote_icon_bg;
|
rate_icon_bg = quote_icon_bg;
|
||||||
rate = quote;
|
rate = quote;
|
||||||
rat_max = quote_max;
|
rate_max = quote_max;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CRateBanner::paint(const bool &do_save_bg)
|
void CRateBanner::paint(const bool &do_save_bg)
|
||||||
{
|
{
|
||||||
clear();
|
clear();
|
||||||
addIcon(rat_prov_logo);
|
addIcon(rate_prov_logo);
|
||||||
addIcons(rat_icon, rat_max);
|
addIcons(rate_icon, rate_max);
|
||||||
paintForm(do_save_bg);
|
paintForm(do_save_bg);
|
||||||
|
|
||||||
int x_base = getCCItem(rat_icon)->getRealXPos();
|
int x_base = getCCItem(rate_icon)->getRealXPos();
|
||||||
float w_rate_space = static_cast<float>(width - (getCCItem(rat_prov_logo) ? getCCItem(rat_prov_logo)->getWidth() - append_x_offset : 0));
|
float w_rate_space = static_cast<float>(width - (getCCItem(rate_prov_logo) ? getCCItem(rate_prov_logo)->getWidth() - append_x_offset : 0));
|
||||||
float w_rate_size = w_rate_space / rat_max * rate;
|
float w_rate_size = w_rate_space / rate_max * rate;
|
||||||
int w_tmp = static_cast<int>(round(w_rate_size)) - append_x_offset;
|
int w_tmp = static_cast<int>(round(w_rate_size)) - append_x_offset;
|
||||||
fb_pixel_t* pixbuf = getScreen(x_base, y, w_tmp, height);
|
fb_pixel_t* pixbuf = getScreen(x_base, y, w_tmp, height);
|
||||||
|
|
||||||
removeAllIcons();
|
removeAllIcons();
|
||||||
addIcon(rat_prov_logo);
|
addIcon(rate_prov_logo);
|
||||||
addIcons(rat_icon_bg, rat_max);
|
addIcons(rate_icon_bg, rate_max);
|
||||||
|
|
||||||
paintCCItems();
|
paintCCItems();
|
||||||
if (pixbuf)
|
if (pixbuf)
|
||||||
|
@@ -34,8 +34,8 @@
|
|||||||
class CRateBanner : public CComponentsIconForm
|
class CRateBanner : public CComponentsIconForm
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
std::string rat_icon, rat_icon_bg, rat_prov_logo;
|
std::string rate_icon, rate_icon_bg, rate_prov_logo;
|
||||||
float rate, rat_max;
|
float rate, rate_max;
|
||||||
|
|
||||||
void init( const std::string& quote_icon,
|
void init( const std::string& quote_icon,
|
||||||
const std::string& quote_icon_bg,
|
const std::string& quote_icon_bg,
|
||||||
|
Reference in New Issue
Block a user