mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
fix weatherinfo, align text to channelname font
This commit is contained in:
@@ -196,12 +196,13 @@ void CWeather::show(int x, int y)
|
|||||||
ptmp->setColorBody(form->getColorBody());
|
ptmp->setColorBody(form->getColorBody());
|
||||||
form->addCCItem(ptmp);
|
form->addCCItem(ptmp);
|
||||||
|
|
||||||
CComponentsText *temp = new CComponentsText(ptmp->getWidth() + 2*RADIUS_MID, ptmp->getHeight()/2 + RADIUS_MID - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_NUMBER]->getHeight()/2, 0, 0, getCurrentTemperature() + "°C", CTextBox::AUTO_WIDTH, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_NUMBER]);
|
CComponentsText *temp = new CComponentsText(ptmp->getWidth() + 2*RADIUS_MID, ptmp->getHeight()/2 + RADIUS_MID - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getHeight()/2, 0, 0, getCurrentTemperature() + "°C", CTextBox::AUTO_WIDTH, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]);
|
||||||
temp->doPaintBg(false);
|
temp->doPaintBg(false);
|
||||||
temp->setTextColor(COL_INFOBAR_TEXT);
|
temp->setTextColor(COL_INFOBAR_TEXT);
|
||||||
form->addCCItem(temp);
|
form->addCCItem(temp);
|
||||||
|
|
||||||
form->setDimensionsAll(x, y, ptmp->getWidth() + temp->getWidth() + 2*RADIUS_MID, ptmp->getHeight() + 2*RADIUS_MID);
|
int height = std::max(ptmp->getHeight(),temp->getHeight());
|
||||||
|
form->setDimensionsAll(x, y, ptmp->getWidth() + temp->getWidth() + 2*RADIUS_MID, height + 2*RADIUS_MID);
|
||||||
form->enableShadow();
|
form->enableShadow();
|
||||||
form->paint();
|
form->paint();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user