mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 01:11:12 +02:00
eventlist: optimize button paint on changed caption content
Paint not complete footer but only button which content has been changed. another supplement to: eventlist: use footer object as class member
This commit is contained in:
@@ -1071,7 +1071,6 @@ void CEventList::paintFoot(t_channel_id channel_id)
|
||||
btn_cnt++;
|
||||
|
||||
// paint footer only on changed content
|
||||
bool repaint = false;
|
||||
size_t btn_size = 0;
|
||||
if (footer.getButtonChainObject())
|
||||
{
|
||||
@@ -1083,14 +1082,15 @@ void CEventList::paintFoot(t_channel_id channel_id)
|
||||
CComponentsButton *btn = static_cast<CComponentsButton*> (footer.getButtonChainObject()->getCCItem(i));
|
||||
if (g_Locale->getString(buttons[i].locale) != btn->getCaptionString())
|
||||
{
|
||||
repaint = true;
|
||||
break;
|
||||
btn->setCaption(buttons[i].locale);
|
||||
btn->hide();
|
||||
btn->paint();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!footer.isPainted() || btn_cnt != (int)btn_size || repaint)
|
||||
if (!footer.isPainted() || btn_cnt != (int)btn_size)
|
||||
footer.paintButtons(x, y + height - OFFSET_SHADOW - footer_height, full_width, footer_height, btn_cnt, buttons);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user