mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 16:01:10 +02:00
src/gui/widget/menue.cpp: don't paint icon if no space for this
Origin commit data
------------------
Branch: ni/coolstream
Commit: 6f552797b4
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2013-04-29 (Mon, 29 Apr 2013)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -190,9 +190,6 @@ void CMenuItem::paintItemButton(const bool select_mode, const int &item_height,
|
|||||||
bool selected = select_mode;
|
bool selected = select_mode;
|
||||||
bool icon_painted = false;
|
bool icon_painted = false;
|
||||||
|
|
||||||
int w = 0;
|
|
||||||
int h = 0;
|
|
||||||
|
|
||||||
std::string icon_name = iconName;
|
std::string icon_name = iconName;
|
||||||
int icon_w = 0;
|
int icon_w = 0;
|
||||||
int icon_h = 0;
|
int icon_h = 0;
|
||||||
@@ -223,11 +220,9 @@ void CMenuItem::paintItemButton(const bool select_mode, const int &item_height,
|
|||||||
//get data of number icon and paint
|
//get data of number icon and paint
|
||||||
if (!icon_name.empty())
|
if (!icon_name.empty())
|
||||||
{
|
{
|
||||||
frameBuffer->getIconSize(icon_name.c_str(), &w, &h);
|
frameBuffer->getIconSize(icon_name.c_str(), &icon_w, &icon_h);
|
||||||
icon_w = w;
|
|
||||||
icon_h = h;
|
if (active && icon_w>0 && icon_h>0 && icon_space_x >= icon_w)
|
||||||
|
|
||||||
if (active && icon_w>0 && icon_h>0)
|
|
||||||
{
|
{
|
||||||
icon_x = icon_space_mid - (icon_w/2);
|
icon_x = icon_space_mid - (icon_w/2);
|
||||||
|
|
||||||
@@ -248,9 +243,7 @@ void CMenuItem::paintItemButton(const bool select_mode, const int &item_height,
|
|||||||
//get data of number right info icon and paint
|
//get data of number right info icon and paint
|
||||||
if (!iconName_Info_right.empty())
|
if (!iconName_Info_right.empty())
|
||||||
{
|
{
|
||||||
frameBuffer->getIconSize(iconName_Info_right.c_str(), &w, &h);
|
frameBuffer->getIconSize(iconName_Info_right.c_str(), &icon_w, &icon_h);
|
||||||
icon_w = w;
|
|
||||||
icon_h = h;
|
|
||||||
|
|
||||||
if (active && icon_w>0 && icon_h>0)
|
if (active && icon_w>0 && icon_h>0)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user