summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2014-08-04 19:21:11 +0200
committerMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2014-08-04 19:21:11 +0200
commit30a1dd2c8ead480f5e61a6ddfb55e1d6ea920f06 (patch)
tree4ae05842e02c1006b7fbf1c386d353a24faf41dd
parent65c2d52d64f2667e9238413a6d3ffc8a8ab5c603 (diff)
downloadskin-flatplus-30a1dd2c8ead480f5e61a6ddfb55e1d6ea920f06.tar.gz
skin-flatplus-30a1dd2c8ead480f5e61a6ddfb55e1d6ea920f06.tar.bz2
new time seconds scale option
-rw-r--r--HISTORY2
-rw-r--r--config.c4
-rw-r--r--config.h2
-rw-r--r--displayreplay.c18
-rw-r--r--po/de_DE.po6
-rw-r--r--setup.c4
6 files changed, 17 insertions, 19 deletions
diff --git a/HISTORY b/HISTORY
index 6468bc08..c9752161 100644
--- a/HISTORY
+++ b/HISTORY
@@ -15,7 +15,7 @@ VDR Plugin 'skinflatplus' Revision History
- [add] new option "Diskusage free/occupied" to show free or occupied percantage and hours
- [add] new option "Diskusage short display" for only show percantage and free/occupied hours
- [add] new option "TopBar clock font scale" to scale the clock font
-- [add] new option "Draw small seconds" to draw the seconds small in recording view
+- [add] new option "Time seconds font scale" to scale the seconds in recording view
- [add] new option "Show video/audio bitrate" to show the bitrate of audio/video in display channel (lent code from femon, thanks!)
new hidden config "ChannelBitrateShowCalcInterval" to set the interval of the video/audio bitrate calculation
- [add] image _cur version for recording_cutted, recording_new, timer_full, timer_partial, vps
diff --git a/config.c b/config.c
index 3a6221f1..2f5f0b6d 100644
--- a/config.c
+++ b/config.c
@@ -30,7 +30,7 @@ cFlatConfig::cFlatConfig(void) {
RecordingResolutionAspectShow = true;
RecordingFormatShow = true;
RecordingSimpleAspectFormat = true;
- RecordingSmallSecs = true;
+ TimeSecsScale = 1.0;
RecordingAdditionalInfoShow = true;
EpgAdditionalInfoShow = true;
@@ -255,7 +255,7 @@ bool cFlatConfig::SetupParse(const char *Name, const char *Value) {
else if (strcmp(Name, "DiskUsageFree") == 0) DiskUsageFree = atoi(Value);
else if (strcmp(Name, "ChannelBitrateShow") == 0) ChannelBitrateShow = atoi(Value);
else if (strcmp(Name, "TopBarFontClockScale") == 0) TopBarFontClockScale = atod(Value);
- else if (strcmp(Name, "RecordingSmallSecs") == 0) RecordingSmallSecs = atoi(Value);
+ else if (strcmp(Name, "TimeSecsScale") == 0) TimeSecsScale = atod(Value);
else if (strcmp(Name, "ChannelBitrateShowCalcInterval") == 0) ChannelBitrateShowCalcInterval = atoi(Value);
else return false;
diff --git a/config.h b/config.h
index 1dc0db1c..8c16828a 100644
--- a/config.h
+++ b/config.h
@@ -201,7 +201,7 @@ class cFlatConfig
int RecordingFormatShow;
int RecordingSimpleAspectFormat;
int RecordingAdditionalInfoShow;
- int RecordingSmallSecs;
+ double TimeSecsScale;
int EpgRerunsShow;
int EpgAdditionalInfoShow;
diff --git a/displayreplay.c b/displayreplay.c
index 9fabead8..7fac3650 100644
--- a/displayreplay.c
+++ b/displayreplay.c
@@ -30,7 +30,7 @@ cFlatDisplayReplay::cFlatDisplayReplay(bool ModeOnly) {
labelJump->Fill(clrTransparent);
iconsPixmap->Fill(clrTransparent);
- fontSecs = cFont::CreateFont(Setup.FontOsd, Setup.FontOsdSize * 0.5);
+ fontSecs = cFont::CreateFont(Setup.FontOsd, Setup.FontOsdSize * Config.TimeSecsScale * 100.0);
}
cFlatDisplayReplay::~cFlatDisplayReplay() {
@@ -153,8 +153,7 @@ void cFlatDisplayReplay::UpdateInfo(void) {
int fontSecsBaseHeight = GetFontBaseHeight(Setup.FontOsd, fontSecs->Height());
int topSecs = fontBaseHeight - fontSecsBaseHeight - (fontSecs->Height() - fontSecsBaseHeight);
- const char *foundDot = strchr(current, '.');
- if( foundDot != NULL || !Config.RecordingSmallSecs )
+ if( Config.TimeSecsScale == 1.0 )
labelPixmap->DrawText(cPoint(marginItem, 0), current, Theme.Color(clrReplayFont), Theme.Color(clrReplayBg), font, font->Width(current), fontHeight);
else {
std::string cur = *current;
@@ -247,7 +246,7 @@ void cFlatDisplayReplay::UpdateInfo(void) {
imgWidth = imgRecCut->Width();
int right = osdWidth - Config.decorBorderReplaySize*2 - font->Width(total) - marginItem - imgWidth - font->Width(" ") - font->Width(cutted);
- if( Config.RecordingSmallSecs ) {
+ if( Config.TimeSecsScale < 1.0 ) {
std::string tot = *total;
size_t found = tot.find_last_of(':');
if( found != std::string::npos ) {
@@ -265,7 +264,7 @@ void cFlatDisplayReplay::UpdateInfo(void) {
right = osdWidth - Config.decorBorderReplaySize*2 - font->Width(hm.c_str()) - fontSecs->Width(secs.c_str()) - marginItem - imgWidth - font->Width(" ") - font->Width(cutted);
labelPixmap->DrawText(cPoint(right - marginItem, 0), hm.c_str(), Theme.Color(clrReplayFont), Theme.Color(clrReplayBg), font, font->Width(hm.c_str()), fontHeight);
- labelPixmap->DrawText(cPoint(right - marginItem + font->Width(hm.c_str()), fontHeight - fontSecs->Height() - marginItem), secs.c_str(), Theme.Color(clrReplayFont), Theme.Color(clrReplayBg), fontSecs, fontSecs->Width(secs.c_str()), fontSecs->Height());
+ labelPixmap->DrawText(cPoint(right - marginItem + font->Width(hm.c_str()), topSecs), secs.c_str(), Theme.Color(clrReplayFont), Theme.Color(clrReplayBg), fontSecs, fontSecs->Width(secs.c_str()), fontSecs->Height());
right += font->Width(hm.c_str()) + fontSecs->Width(secs.c_str());
right += font->Width(" ");
} else {
@@ -284,7 +283,7 @@ void cFlatDisplayReplay::UpdateInfo(void) {
right += imgRecCut->Width() + marginItem*2;
}
- if( Config.RecordingSmallSecs ) {
+ if( Config.TimeSecsScale < 1.0 ) {
std::string cutt = *cutted;
size_t found = cutt.find_last_of(':');
if( found != std::string::npos ) {
@@ -292,7 +291,7 @@ void cFlatDisplayReplay::UpdateInfo(void) {
std::string secs = cutt.substr(found, cutt.length() - found);
labelPixmap->DrawText(cPoint(right - marginItem, 0), hm.c_str(), Theme.Color(clrMenuItemExtraTextFont), Theme.Color(clrReplayBg), font, font->Width(hm.c_str()), fontHeight);
- labelPixmap->DrawText(cPoint(right - marginItem + font->Width(hm.c_str()), fontHeight - fontBaseHeight + fontSecs->Height()), secs.c_str(), Theme.Color(clrMenuItemExtraTextFont), Theme.Color(clrReplayBg), fontSecs, fontSecs->Width(secs.c_str()), fontSecs->Height());
+ labelPixmap->DrawText(cPoint(right - marginItem + font->Width(hm.c_str()), topSecs), secs.c_str(), Theme.Color(clrMenuItemExtraTextFont), Theme.Color(clrReplayBg), fontSecs, fontSecs->Width(secs.c_str()), fontSecs->Height());
} else {
labelPixmap->DrawText(cPoint(right - marginItem, 0), cutted, Theme.Color(clrMenuItemExtraTextFont), Theme.Color(clrReplayBg), font, font->Width(cutted), fontHeight);
}
@@ -301,8 +300,7 @@ void cFlatDisplayReplay::UpdateInfo(void) {
}
} else {
int right = osdWidth - Config.decorBorderReplaySize*2 - font->Width(total);
-
- if( Config.RecordingSmallSecs ) {
+ if( Config.TimeSecsScale < 1.0 ) {
std::string tot = *total;
size_t found = tot.find_last_of(':');
if( found != std::string::npos ) {
@@ -311,7 +309,7 @@ void cFlatDisplayReplay::UpdateInfo(void) {
right = osdWidth - Config.decorBorderReplaySize*2 - font->Width(hm.c_str()) - fontSecs->Width(secs.c_str());
labelPixmap->DrawText(cPoint(right - marginItem, 0), hm.c_str(), Theme.Color(clrReplayFont), Theme.Color(clrReplayBg), font, font->Width(hm.c_str()), fontHeight);
- labelPixmap->DrawText(cPoint(right - marginItem + font->Width(hm.c_str()), fontHeight - fontBaseHeight), secs.c_str(), Theme.Color(clrReplayFont), Theme.Color(clrReplayBg), fontSecs, fontSecs->Width(secs.c_str()), fontSecs->Height());
+ labelPixmap->DrawText(cPoint(right - marginItem + font->Width(hm.c_str()), topSecs), secs.c_str(), Theme.Color(clrReplayFont), Theme.Color(clrReplayBg), fontSecs, fontSecs->Width(secs.c_str()), fontSecs->Height());
} else {
labelPixmap->DrawText(cPoint(right - marginItem, 0), total, Theme.Color(clrReplayFont), Theme.Color(clrReplayBg), font, font->Width(total), fontHeight);
}
diff --git a/po/de_DE.po b/po/de_DE.po
index e86b28bd..d54d4e09 100644
--- a/po/de_DE.po
+++ b/po/de_DE.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: vdr-skinflat 0.3.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2014-08-03 22:10+0200\n"
+"POT-Creation-Date: 2014-08-04 19:20+0200\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"
@@ -504,8 +504,8 @@ msgstr "Menüitem Progress Größe"
msgid "Replay border by decor-file?"
msgstr "Replay Rand von Decordatei?"
-msgid "Draw small seconds"
-msgstr "Zeichne kleine Sekunden"
+msgid "Time seconds font scale"
+msgstr "Uhrzeit Sekunden Skalierung"
msgid "Replay border type"
msgstr "Replay Rand Typ"
diff --git a/setup.c b/setup.c
index 3c1c6c06..6dec2cb8 100644
--- a/setup.c
+++ b/setup.c
@@ -254,7 +254,7 @@ void cFlatSetup::Store(void) {
SetupStore("DiskUsageShort", Config.DiskUsageShort);
SetupStore("DiskUsageFree", Config.DiskUsageFree);
SetupStore("TopBarFontClockScale", dtoa(Config.TopBarFontClockScale));
- SetupStore("RecordingSmallSecs", Config.RecordingSmallSecs);
+ SetupStore("TimeSecsScale", dtoa(Config.TimeSecsScale));
SetupStore("ChannelBitrateShow", Config.ChannelBitrateShow);
SetupStore("ChannelBitrateShowCalcInterval", Config.ChannelBitrateShowCalcInterval);
@@ -604,7 +604,7 @@ void cFlatSetupReplay::Setup(void) {
Add(new cMenuEditBoolItem(tr("Show resolution & aspect"), &SetupConfig->RecordingResolutionAspectShow));
Add(new cMenuEditBoolItem(tr("Show format (hd/sd)"), &SetupConfig->RecordingFormatShow));
Add(new cMenuEditBoolItem(tr("Simple aspect & format"), &SetupConfig->RecordingSimpleAspectFormat));
- Add(new cMenuEditBoolItem(tr("Draw small seconds"), &SetupConfig->RecordingSmallSecs));
+ Add(new cMenuEditPrcItem(tr("Time seconds font scale"), &SetupConfig->TimeSecsScale, 0.004, 0.01, 1));
if( SetupConfig->decorBorderReplayByTheme ) {
cString type = cString::sprintf("%s:\t%s", tr("Replay border type"), Bordertypes[SetupConfig->decorBorderReplayTypeTheme]);