summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY2
-rw-r--r--baserender.c26
-rw-r--r--baserender.h2
-rw-r--r--config.c3
-rw-r--r--config.h4
-rw-r--r--icons/default/message_error.pngbin0 -> 598 bytes
-rw-r--r--icons/default/message_info.pngbin0 -> 1294 bytes
-rw-r--r--icons/default/message_status.pngbin0 -> 1294 bytes
-rw-r--r--icons/default/message_warning.pngbin0 -> 1215 bytes
-rw-r--r--po/de_DE.po11
-rw-r--r--setup.c8
11 files changed, 51 insertions, 5 deletions
diff --git a/HISTORY b/HISTORY
index ac154f00..eb2c5b66 100644
--- a/HISTORY
+++ b/HISTORY
@@ -16,6 +16,8 @@ VDR Plugin 'skinflatplus' Revision History
- [add] theme color clrChannelEPGBorderFg and clrChannelEPGBorderBg for border color of epg image in chanel info
- [add] decor option ChannelEPGBorderType and ChannelEPGBorderSize for border of epg image in chanel info
- [add] patch - load epg image cover_vdr.jpg in recordings folder (thanks to Saman@vdr-portal.de)
+- [add] new option message color position (vertical, horizontal)
+- [add] message icons
2014-11-05: Version 0.3.0
- [fix] use only current Event in extraevent display in displaychannel
diff --git a/baserender.c b/baserender.c
index eebda28e..4e463283 100644
--- a/baserender.c
+++ b/baserender.c
@@ -34,6 +34,7 @@ cFlatBaseRender::cFlatBaseRender(void) {
topBarPixmap = NULL;
buttonsPixmap = NULL;
messagePixmap = NULL;
+ messageIconPixmap = NULL;
contentPixmap = NULL;
contentEpgImagePixmap = NULL;
progressBarPixmap = NULL;
@@ -56,6 +57,8 @@ cFlatBaseRender::~cFlatBaseRender(void) {
osd->DestroyPixmap(buttonsPixmap);
if( messagePixmap )
osd->DestroyPixmap(messagePixmap);
+ if( messageIconPixmap )
+ osd->DestroyPixmap(messageIconPixmap);
if( contentPixmap )
osd->DestroyPixmap(contentPixmap);
if( progressBarPixmap )
@@ -456,31 +459,49 @@ bool cFlatBaseRender::ButtonsDrawn(void) {
void cFlatBaseRender::MessageCreate(void) {
messageHeight = fontHeight + marginItem*2;
+ if( Config.MessageColorPosition == 1 )
+ messageHeight += 20;
int top = osdHeight - Config.MessageOffset - messageHeight - Config.decorBorderMessageSize;
messagePixmap = osd->CreatePixmap(5, cRect(Config.decorBorderMessageSize, top, osdWidth - Config.decorBorderMessageSize*2, messageHeight));
messagePixmap->Fill(clrTransparent);
+ messageIconPixmap = osd->CreatePixmap(5, cRect(Config.decorBorderMessageSize, top, osdWidth - Config.decorBorderMessageSize*2, messageHeight));
+ messageIconPixmap->Fill(clrTransparent);
}
void cFlatBaseRender::MessageSet(eMessageType Type, const char *Text) {
tColor col = Theme.Color(clrMessageStatus);
+ cString icon;
switch (Type) {
case mtStatus:
col = Theme.Color(clrMessageStatus);
+ icon = "message_status";
break;
case mtInfo:
col = Theme.Color(clrMessageInfo);
+ icon = "message_info";
break;
case mtWarning:
col = Theme.Color(clrMessageWarning);
+ icon = "message_warning";
break;
case mtError:
col = Theme.Color(clrMessageError);
+ icon = "message_error";
break;
}
messagePixmap->Fill(Theme.Color(clrMessageBg));
- messagePixmap->DrawRectangle(cRect( 0, 0, messageHeight, messageHeight), col);
- messagePixmap->DrawRectangle(cRect( osdWidth - messageHeight - Config.decorBorderMessageSize*2, 0, messageHeight, messageHeight), col);
+ cImage *img = imgLoader.LoadIcon(icon, fontHeight, fontHeight);
+ if( img ) {
+ messageIconPixmap->DrawImage( cPoint(marginItem + 10, marginItem), *img );
+ }
+
+ if( Config.MessageColorPosition == 0 ) {
+ messagePixmap->DrawRectangle(cRect( 0, 0, 8, messageHeight), col);
+ messagePixmap->DrawRectangle(cRect( osdWidth - 8 - Config.decorBorderMessageSize*2, 0, 8, messageHeight), col);
+ } else {
+ messagePixmap->DrawRectangle(cRect( 0, messageHeight - 8, osdWidth, 8), col);
+ }
int textWidth = font->Width(Text);
@@ -515,6 +536,7 @@ void cFlatBaseRender::MessageSet(eMessageType Type, const char *Text) {
void cFlatBaseRender::MessageClear(void) {
messagePixmap->Fill(clrTransparent);
+ messageIconPixmap->Fill(clrTransparent);
DecorBorderClearByFrom(BorderMessage);
DecorBorderRedrawAll();
}
diff --git a/baserender.h b/baserender.h
index dfe53e83..7d373de1 100644
--- a/baserender.h
+++ b/baserender.h
@@ -78,7 +78,7 @@ class cFlatBaseRender
bool buttonsDrawn;
// Nachricht
- cPixmap *messagePixmap;
+ cPixmap *messagePixmap, *messageIconPixmap;
int messageWidth, messageHeight;
// Mehrzeiliger Content mit Scrollbalken
diff --git a/config.c b/config.c
index 0e581e2c..ccf7e6b7 100644
--- a/config.c
+++ b/config.c
@@ -44,6 +44,8 @@ cFlatConfig::cFlatConfig(void) {
TopBarFontSize = 0.05;
MessageOffset = 50;
+ MessageColorPosition = 1;
+
MainMenuItemScale = 1.0;
MenuChannelView = 1;
@@ -223,6 +225,7 @@ bool cFlatConfig::SetupParse(const char *Name, const char *Value) {
else if (strcmp(Name, "EpgRerunsShow") == 0) EpgRerunsShow = atoi(Value);
else if (strcmp(Name, "TVScraperEPGInfoShowActors") == 0) TVScraperEPGInfoShowActors = atoi(Value);
else if (strcmp(Name, "TVScraperRecInfoShowActors") == 0) TVScraperRecInfoShowActors = atoi(Value);
+ else if (strcmp(Name, "MessageColorPosition") == 0) MessageColorPosition = atoi(Value);
else return false;
diff --git a/config.h b/config.h
index 86fa6307..6025750d 100644
--- a/config.h
+++ b/config.h
@@ -193,6 +193,10 @@ class cFlatConfig
int MenuEventView;
int MenuRecordingView;
+ // 0 = vertikal
+ // 1 = horizontal
+ int MessageColorPosition;
+
/* hidden configs (only in setup.conf, no osd menu) */
int MenuItemRecordingClearPercent;
int MenuItemRecordingShowFolderDate; // 0 = disable, 1 = newest recording date, 2 = oldest recording date
diff --git a/icons/default/message_error.png b/icons/default/message_error.png
new file mode 100644
index 00000000..6851d4e4
--- /dev/null
+++ b/icons/default/message_error.png
Binary files differ
diff --git a/icons/default/message_info.png b/icons/default/message_info.png
new file mode 100644
index 00000000..eb1f6181
--- /dev/null
+++ b/icons/default/message_info.png
Binary files differ
diff --git a/icons/default/message_status.png b/icons/default/message_status.png
new file mode 100644
index 00000000..eb1f6181
--- /dev/null
+++ b/icons/default/message_status.png
Binary files differ
diff --git a/icons/default/message_warning.png b/icons/default/message_warning.png
new file mode 100644
index 00000000..bbdd4dbc
--- /dev/null
+++ b/icons/default/message_warning.png
Binary files differ
diff --git a/po/de_DE.po b/po/de_DE.po
index b2c7d93a..fa150f0e 100644
--- a/po/de_DE.po
+++ b/po/de_DE.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: vdr-skinflat 0.3.0\n"
"Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2014-05-30 15:08+0200\n"
+"POT-Creation-Date: 2014-06-14 11:52+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"
@@ -213,6 +213,12 @@ msgstr "flatPlus kurz + EPG"
msgid "flatPlus short + Info"
msgstr "flatPlus kurz + Info"
+msgid "vertical"
+msgstr "vertikal"
+
+msgid "hoizontal"
+msgstr "horizontal"
+
msgid "General settings"
msgstr "Allgemeine Einstellungen"
@@ -273,6 +279,9 @@ msgstr "Konflikte min Wert für Rot"
msgid "Message bottom offset"
msgstr "Meldung unterer Abstand"
+msgid "Message color position"
+msgstr "Meldungsfarbe Position"
+
msgid "TopBar border by decor-file?"
msgstr "TopBar Rand von Decordatei?"
diff --git a/setup.c b/setup.c
index 7dd7721d..027c692e 100644
--- a/setup.c
+++ b/setup.c
@@ -8,6 +8,7 @@ cStringList MenuTimerViews;
cStringList MenuEventViews;
cStringList MenuRecordingViews;
cStringList DecorDescriptions;
+cStringList MessageColorPositions;
cFlatSetup::cFlatSetup(void) {
SetupConfig = Config;
@@ -76,6 +77,10 @@ void cFlatSetup::Setup(void) {
MenuRecordingViews.Append( strdup(tr("flatPlus short")) );
MenuRecordingViews.Append( strdup(tr("flatPlus short + Info")) );
+ MessageColorPositions.Clear();
+ MessageColorPositions.Append( strdup(tr("vertical")) );
+ MessageColorPositions.Append( strdup(tr("hoizontal")) );
+
Add(new cOsdItem(tr("General settings"), osUnknown, true));
Add(new cOsdItem(tr("Channelinfo settings"), osUnknown, true));
Add(new cOsdItem(tr("Menu settings"), osUnknown, true));
@@ -217,6 +222,7 @@ void cFlatSetup::Store(void) {
SetupStore("EpgRerunsShow", Config.EpgRerunsShow);
SetupStore("TVScraperEPGInfoShowActors", Config.TVScraperEPGInfoShowActors);
SetupStore("TVScraperRecInfoShowActors", Config.TVScraperRecInfoShowActors);
+ SetupStore("MessageColorPosition", Config.MessageColorPosition);
Config.Init();
}
@@ -264,7 +270,7 @@ void cFlatSetupGeneral::Setup(void) {
Add(new cMenuEditBoolItem(tr("TopBar show conflicts"), &SetupConfig->TopBarRecConflictsShow));
Add(new cMenuEditIntItem(tr("Conflicts min value for red"), &SetupConfig->TopBarRecConflictsHigh));
Add(new cMenuEditIntItem(tr("Message bottom offset"), &SetupConfig->MessageOffset));
-
+ Add(new cMenuEditStraItem(tr("Message color position"), &SetupConfig->MessageColorPosition, MessageColorPositions.Size(), &MessageColorPositions[0]));
Add(new cMenuEditBoolItem(tr("TopBar border by decor-file?"), &SetupConfig->decorBorderTopBarByTheme));
if( SetupConfig->decorBorderTopBarByTheme ) {