summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2014-11-20 17:24:14 +0100
committerMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2014-11-20 17:24:14 +0100
commitc6e6ebd4d42fa40bbf1f71e3e75380ecda0f6aec (patch)
tree0a49a254ad6921ae2cba989925f8ca71a35ddc53
parentfa90caf3071946fff08a8cc2ee59a60ee0caaac9 (diff)
downloadskin-flatplus-c6e6ebd4d42fa40bbf1f71e3e75380ecda0f6aec.tar.gz
skin-flatplus-c6e6ebd4d42fa40bbf1f71e3e75380ecda0f6aec.tar.bz2
align in weather widget
-rw-r--r--baserender.c8
-rw-r--r--displaymenu.c13
-rw-r--r--po/de_DE.po8
3 files changed, 15 insertions, 14 deletions
diff --git a/baserender.c b/baserender.c
index 0139e449..5c971406 100644
--- a/baserender.c
+++ b/baserender.c
@@ -1617,8 +1617,8 @@ void cFlatBaseRender::DrawWidgetWeather(void) {
weatherWidget.AddImage(img, cRect(left, 0 + marginItem, weatherFont->Height(), weatherFont->Height()));
left += weatherFont->Height() + marginItem;
}
- weatherWidget.AddText(tempMaxToday.c_str(), false, cRect(left, 0, 0, 0), Theme.Color(clrChannelFontEpg), Theme.Color(clrItemCurrentBg), weatherFontSml);
- weatherWidget.AddText(tempMinToday.c_str(), false, cRect(left, 0 + weatherFontSml->Height(), 0, 0), Theme.Color(clrChannelFontEpg), Theme.Color(clrItemCurrentBg), weatherFontSml);
+ weatherWidget.AddText(tempMaxToday.c_str(), false, cRect(left, 0, 0, 0), Theme.Color(clrChannelFontEpg), Theme.Color(clrItemCurrentBg), weatherFontSml, widthTempToday, weatherFontSml->Height(), taRight);
+ weatherWidget.AddText(tempMinToday.c_str(), false, cRect(left, 0 + weatherFontSml->Height(), 0, 0), Theme.Color(clrChannelFontEpg), Theme.Color(clrItemCurrentBg), weatherFontSml, widthTempToday, weatherFontSml->Height(), taRight);
left += widthTempToday + marginItem;
img = imgLoader.LoadIcon("widgets/umbrella", weatherFont->Height(), weatherFont->Height() - marginItem*2);
@@ -1637,8 +1637,8 @@ void cFlatBaseRender::DrawWidgetWeather(void) {
weatherWidget.AddImage(img, cRect(left, 0 + marginItem, weatherFont->Height(), weatherFont->Height()));
left += weatherFont->Height() + marginItem;
}
- weatherWidget.AddText(tempMaxTomorrow.c_str(), false, cRect(left, 0, 0, 0), Theme.Color(clrChannelFontEpg), Theme.Color(clrChannelBg), weatherFontSml);
- weatherWidget.AddText(tempMinTomorrow.c_str(), false, cRect(left, 0 + weatherFontSml->Height(), 0, 0), Theme.Color(clrChannelFontEpg), Theme.Color(clrChannelBg), weatherFontSml);
+ weatherWidget.AddText(tempMaxTomorrow.c_str(), false, cRect(left, 0, 0, 0), Theme.Color(clrChannelFontEpg), Theme.Color(clrChannelBg), weatherFontSml, widthTempTomorrow, weatherFontSml->Height(), taRight);
+ weatherWidget.AddText(tempMinTomorrow.c_str(), false, cRect(left, 0 + weatherFontSml->Height(), 0, 0), Theme.Color(clrChannelFontEpg), Theme.Color(clrChannelBg), weatherFontSml, widthTempTomorrow, weatherFontSml->Height(), taRight);
left += widthTempTomorrow + marginItem;
img = imgLoader.LoadIcon("widgets/umbrella", weatherFont->Height(), weatherFont->Height() - marginItem*2);
diff --git a/displaymenu.c b/displaymenu.c
index 17755bfd..4c68af96 100644
--- a/displaymenu.c
+++ b/displaymenu.c
@@ -4794,10 +4794,11 @@ int cFlatDisplayMenu::DrawMainMenuWidgetWeather(int wLeft, int wWidth, int Conte
contentWidget.AddImage(img, cRect(left, ContentTop + marginItem, fontHeight, fontHeight));
left += fontHeight + marginItem;
}
- contentWidget.AddText(tempMax.c_str(), false, cRect(left, ContentTop, 0, 0), Theme.Color(clrMenuEventFontInfo), Theme.Color(clrMenuEventBg), fontTempSml);
- contentWidget.AddText(tempMin.c_str(), false, cRect(left, ContentTop + fontTempSml->Height(), 0, 0), Theme.Color(clrMenuEventFontInfo), Theme.Color(clrMenuEventBg), fontTempSml);
+ int wtemp = myMax(fontTempSml->Width(tempMax.c_str()), fontTempSml->Width(tempMin.c_str()) );
+ contentWidget.AddText(tempMax.c_str(), false, cRect(left, ContentTop, 0, 0), Theme.Color(clrMenuEventFontInfo), Theme.Color(clrMenuEventBg), fontTempSml, wtemp, fontTempSml->Height(), taRight);
+ contentWidget.AddText(tempMin.c_str(), false, cRect(left, ContentTop + fontTempSml->Height(), 0, 0), Theme.Color(clrMenuEventFontInfo), Theme.Color(clrMenuEventBg), fontTempSml, wtemp, fontTempSml->Height(), taRight);
- left += myMax(fontTempSml->Width(tempMax.c_str()), fontTempSml->Width(tempMin.c_str()) ) + marginItem;
+ left += wtemp + marginItem;
img = imgLoader.LoadIcon("widgets/umbrella", fontHeight, fontHeight - marginItem*2);
if( img ) {
@@ -4822,8 +4823,8 @@ int cFlatDisplayMenu::DrawMainMenuWidgetWeather(int wLeft, int wWidth, int Conte
contentWidget.AddImage(img, cRect(left, ContentTop + marginItem, fontHeight, fontHeight));
left += fontHeight + marginItem;
}
- contentWidget.AddText(tempMax.c_str(), false, cRect(left, ContentTop, 0, 0), Theme.Color(clrMenuEventFontInfo), Theme.Color(clrMenuEventBg), fontTempSml);
- contentWidget.AddText(tempMin.c_str(), false, cRect(left, ContentTop + fontTempSml->Height(), 0, 0), Theme.Color(clrMenuEventFontInfo), Theme.Color(clrMenuEventBg), fontTempSml);
+ contentWidget.AddText(tempMax.c_str(), false, cRect(left, ContentTop, 0, 0), Theme.Color(clrMenuEventFontInfo), Theme.Color(clrMenuEventBg), fontTempSml, fontTempSml->Width("XXXXX"), fontTempSml->Height(), taRight);
+ contentWidget.AddText(tempMin.c_str(), false, cRect(left, ContentTop + fontTempSml->Height(), 0, 0), Theme.Color(clrMenuEventFontInfo), Theme.Color(clrMenuEventBg), fontTempSml, fontTempSml->Width("XXXXX"), fontTempSml->Height(), taRight);
left += fontTempSml->Width("XXXXXX") + marginItem;
@@ -4832,7 +4833,7 @@ int cFlatDisplayMenu::DrawMainMenuWidgetWeather(int wLeft, int wWidth, int Conte
contentWidget.AddImage(img, cRect(left, ContentTop + marginItem, fontHeight, fontHeight));
left += fontHeight - marginItem;
}
- contentWidget.AddText(*precString, false, cRect(left, ContentTop + (fontHeight/2 - fontTempSml->Height()/2), 0, 0), Theme.Color(clrMenuEventFontInfo), Theme.Color(clrMenuEventBg), fontTempSml);
+ contentWidget.AddText(*precString, false, cRect(left, ContentTop + (fontHeight/2 - fontTempSml->Height()/2), 0, 0), Theme.Color(clrMenuEventFontInfo), Theme.Color(clrMenuEventBg), fontTempSml, fontTempSml->Width("XXXX"), fontTempSml->Height(), taRight);
left += fontTempSml->Width("XXXXX") + marginItem;
contentWidget.AddText(summary.c_str(), false, cRect(left, ContentTop + (fontHeight/2 - fontTempSml->Height()/2), wWidth - left, fontHeight), Theme.Color(clrMenuEventFontInfo), Theme.Color(clrMenuEventBg), fontTempSml, wWidth - left);
diff --git a/po/de_DE.po b/po/de_DE.po
index 1d8ecaf0..78f42a3e 100644
--- a/po/de_DE.po
+++ b/po/de_DE.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: vdr-skinflat 0.4.3\n"
"Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2014-11-17 20:22+0100\n"
+"POT-Creation-Date: 2014-11-20 17:18+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -240,12 +240,12 @@ msgstr "Temperaturen nicht vorhanden; Bitte Widget prüfen"
msgid "CPU"
msgstr ""
-msgid "MB"
-msgstr ""
-
msgid "PC-Case"
msgstr "Gehäuse"
+msgid "MB"
+msgstr ""
+
msgid "GPU"
msgstr ""