summaryrefslogtreecommitdiff
path: root/baserender.c
diff options
context:
space:
mode:
authorMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2017-08-27 14:49:01 +0200
committerMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2017-08-27 14:49:01 +0200
commit2d5e027d9c7614fa55a670b569d48340e6084515 (patch)
tree84ded381e513f926668f5359e336a0e33371b678 /baserender.c
parenta2956312965579c875a0e8963a9039bcc47c5d33 (diff)
downloadskin-flatplus-2d5e027d9c7614fa55a670b569d48340e6084515.tar.gz
skin-flatplus-2d5e027d9c7614fa55a670b569d48340e6084515.tar.bz2
- [update] use std::min & std:max
Diffstat (limited to 'baserender.c')
-rw-r--r--baserender.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/baserender.c b/baserender.c
index 8a38c8cb..17e2acec 100644
--- a/baserender.c
+++ b/baserender.c
@@ -385,9 +385,9 @@ void cFlatBaseRender::TopBarUpdate(void) {
cString date = ShortDateString(t);
int dateWidth = topBarFontSml->Width(*date);
- Right = TopBarWidth - timeWidth - max(weekdayWidth, dateWidth) - marginItem;
- topBarPixmap->DrawText(cPoint(Right, fontSmlTop), weekday, Theme.Color(clrTopBarDateFont), Theme.Color(clrTopBarBg), topBarFontSml, max(weekdayWidth, dateWidth), 0, taRight);
- topBarPixmap->DrawText(cPoint(Right, fontSmlTop + topBarFontSmlHeight), date, Theme.Color(clrTopBarDateFont), Theme.Color(clrTopBarBg), topBarFontSml, max(weekdayWidth, dateWidth), 0, taRight);
+ Right = TopBarWidth - timeWidth - std::max(weekdayWidth, dateWidth) - marginItem;
+ topBarPixmap->DrawText(cPoint(Right, fontSmlTop), weekday, Theme.Color(clrTopBarDateFont), Theme.Color(clrTopBarBg), topBarFontSml, std::max(weekdayWidth, dateWidth), 0, taRight);
+ topBarPixmap->DrawText(cPoint(Right, fontSmlTop + topBarFontSmlHeight), date, Theme.Color(clrTopBarDateFont), Theme.Color(clrTopBarBg), topBarFontSml, std::max(weekdayWidth, dateWidth), 0, taRight);
int middleWidth = 0;
int numConflicts = 0;
@@ -462,7 +462,7 @@ void cFlatBaseRender::TopBarUpdate(void) {
int extra1Width = topBarFontSml->Width(tobBarTitleExtra1);
int extra2Width = topBarFontSml->Width(tobBarTitleExtra2);
- int extraMaxWidth = max(extra1Width, extra2Width);
+ int extraMaxWidth = std::max(extra1Width, extra2Width);
middleWidth += extraMaxWidth;
Right -= extraMaxWidth + marginItem;
@@ -1106,8 +1106,8 @@ void cFlatBaseRender::ScrollbarDraw(cPixmap *Pixmap, int Left, int Top, int Heig
if( !Pixmap )
return;
- int scrollHeight = max(int((Height) * double(Shown) / Total + 0.5), 5);
- int scrollTop = min(int(Top + (Height) * double(Offset) / Total + 0.5), Top + Height - scrollHeight);
+ int scrollHeight = std::max(int((Height) * double(Shown) / Total + 0.5), 5);
+ int scrollTop = std::min(int(Top + (Height) * double(Offset) / Total + 0.5), Top + Height - scrollHeight);
/* Types
* 0 = left line + rect bar
@@ -1697,8 +1697,8 @@ void cFlatBaseRender::DrawWidgetWeather(void) {
int left = marginItem;
- int widthTempToday = max(weatherFontSml->Width(tempMaxToday.c_str()), weatherFontSml->Width(tempMinToday.c_str()) );
- int widthTempTomorrow = max(weatherFontSml->Width(tempMaxTomorrow.c_str()), weatherFontSml->Width(tempMinTomorrow.c_str()) );
+ int widthTempToday = std::max(weatherFontSml->Width(tempMaxToday.c_str()), weatherFontSml->Width(tempMinToday.c_str()) );
+ int widthTempTomorrow = std::max(weatherFontSml->Width(tempMaxTomorrow.c_str()), weatherFontSml->Width(tempMinTomorrow.c_str()) );
int wTop = topBarHeight + Config.decorBorderTopBarSize*2 + 20 + Config.decorBorderChannelEPGSize;
int wWidth = marginItem + weatherFont->Width(tempToday.c_str()) + weatherFontSign->Width(tempTodaySign.c_str()) + marginItem*2 + weatherFont->Height() + marginItem \