diff --git a/src/gui/weather.cpp b/src/gui/weather.cpp index 0ea3a99d8..777c556ad 100644 --- a/src/gui/weather.cpp +++ b/src/gui/weather.cpp @@ -196,12 +196,13 @@ void CWeather::show(int x, int y) ptmp->setColorBody(form->getColorBody()); 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->setTextColor(COL_INFOBAR_TEXT); 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->paint(); }