mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +02:00
cc_frm_footer: avoid division by 0
Origin commit data
------------------
Commit: f7a95bd3ac
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-06-30 (Fri, 30 Jun 2017)
Origin message was:
------------------
- cc_frm_footer: avoid division by 0
This commit is contained in:
@@ -333,10 +333,14 @@ void CComponentsFooter::paintButtons(const int& x_pos,
|
||||
Font* font,
|
||||
bool do_save_bg)
|
||||
{
|
||||
int lw = label_width;
|
||||
if (label_count > 0 && label_width == 0)
|
||||
lw = (w/label_count) - 2*cch_offset;
|
||||
|
||||
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) - 2*cch_offset);
|
||||
this->setButtonLabels(content, label_count, 0, lw);
|
||||
this->paint(do_save_bg);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user