summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY2
-rw-r--r--baserender.c44
-rw-r--r--baserender.h13
-rw-r--r--config.c2
-rw-r--r--config.h1
-rw-r--r--displaymenu.h6
-rw-r--r--po/de_DE.po9
-rw-r--r--setup.c5
8 files changed, 51 insertions, 31 deletions
diff --git a/HISTORY b/HISTORY
index a8715f1d..c49ea1ba 100644
--- a/HISTORY
+++ b/HISTORY
@@ -7,6 +7,8 @@ VDR Plugin 'skinflatplus' Revision History
- [fix] menu has full width if no scrollbar is needed
- [update] TopBar title align right
- [add] add free minutes in disk usage
+- [add] add topbar font size option
+- [add] add message bottom offset option
2013-23-09: Version 0.0.1
difference to skinflat
diff --git a/baserender.c b/baserender.c
index ca2aa0b2..64eeeb1c 100644
--- a/baserender.c
+++ b/baserender.c
@@ -229,7 +229,7 @@ void cFlatBaseRender::ButtonsSet(const char *Red, const char *Green, const char
void cFlatBaseRender::MessageCreate(void) {
messageHeight = fontHeight + marginItem*2;
- int top = osdHeight - osdHeight/10 - messageHeight;
+ int top = osdHeight - Config.MessageOffset - messageHeight - Config.decorBorderMessageSize;
messagePixmap = osd->CreatePixmap(5, cRect(Config.decorBorderMessageSize, top, osdWidth - Config.decorBorderMessageSize*2, messageHeight));
messagePixmap->Fill(clrTransparent);
}
@@ -258,14 +258,14 @@ void cFlatBaseRender::MessageSet(eMessageType Type, const char *Text) {
int textWidth = font->Width(Text);
messagePixmap->DrawText(cPoint((osdWidth - textWidth) / 2, marginItem), Text, Theme.Color(clrMessageFont), Theme.Color(clrMessageBg), font);
- int top = osdHeight - osdHeight/10 - messageHeight;
- DecorBorderDraw(Config.decorBorderMessageSize, top, osdWidth - Config.decorBorderMessageSize*2, messageHeight, Config.decorBorderMessageSize, Config.decorBorderMessageType, Config.decorBorderMessageFg, Config.decorBorderMessageBg);
+ int top = osdHeight - Config.MessageOffset - messageHeight - Config.decorBorderMessageSize;
+ DecorBorderDraw(Config.decorBorderMessageSize, top, osdWidth - Config.decorBorderMessageSize*2, messageHeight, Config.decorBorderMessageSize, Config.decorBorderMessageType, Config.decorBorderMessageFg, Config.decorBorderMessageBg, BorderMessage);
}
void cFlatBaseRender::MessageClear(void) {
messagePixmap->Fill(clrTransparent);
- int top = osdHeight - osdHeight/10 - messageHeight;
- DecorBorderClear(Config.decorBorderMessageSize, top, osdWidth - Config.decorBorderMessageSize*2, messageHeight, Config.decorBorderMessageSize);
+ DecorBorderClearByFrom(BorderMessage);
+ DecorBorderRedrawAll();
}
void cFlatBaseRender::ContentCreate(int Left, int Top, int Width, int Height, bool FixedFont) {
@@ -792,7 +792,7 @@ void cFlatBaseRender::DecorBorderClear(int Left, int Top, int Width, int Height,
}
void cFlatBaseRender::DecorBorderClearByFrom(int From) {
- std::list<sBorderFrom>::iterator it;
+ std::list<sDecorBorder>::iterator it;
for( it = Borders.begin(); it != Borders.end(); ) {
if( (*it).From == From ) {
DecorBorderClear((*it).Left, (*it).Top, (*it).Width, (*it).Height, (*it).Size);
@@ -802,24 +802,36 @@ void cFlatBaseRender::DecorBorderClearByFrom(int From) {
}
}
+void cFlatBaseRender::DecorBorderRedrawAll(void) {
+ std::list<sDecorBorder>::iterator it;
+ for( it = Borders.begin(); it != Borders.end(); it++) {
+ DecorBorderDraw((*it).Left, (*it).Top, (*it).Width, (*it).Height, (*it).Size, (*it).Type, (*it).ColorFg, (*it).ColorBg, (*it).From, false);
+ }
+}
+
void cFlatBaseRender::DecorBorderClearAll(void) {
if( decorPixmap )
decorPixmap->Fill(clrTransparent);
}
-void cFlatBaseRender::DecorBorderDraw(int Left, int Top, int Width, int Height, int Size, int Type, tColor ColorFg, tColor ColorBg, int From) {
+void cFlatBaseRender::DecorBorderDraw(int Left, int Top, int Width, int Height, int Size, int Type, tColor ColorFg, tColor ColorBg, int From, bool Store) {
if( Size == 0 || Type <= 0 )
return;
- sBorderFrom f;
- f.Left = Left;
- f.Top = Top;
- f.Width = Width;
- f.Height = Height;
- f.Size = Size;
- f.From = From;
-
- Borders.push_back(f);
+ if( Store ) {
+ sDecorBorder f;
+ f.Left = Left;
+ f.Top = Top;
+ f.Width = Width;
+ f.Height = Height;
+ f.Size = Size;
+ f.Type = Type;
+ f.ColorFg = ColorFg;
+ f.ColorBg = ColorBg;
+ f.From = From;
+
+ Borders.push_back(f);
+ }
int LeftDecor = Left - Size;
int TopDecor = Top - Size;
diff --git a/baserender.h b/baserender.h
index 65d8f197..df0a91ea 100644
--- a/baserender.h
+++ b/baserender.h
@@ -7,12 +7,14 @@
enum eBorder {
BorderMenuItem = 1,
BorderRecordJump = 2,
- BorderMenuRecord = 3
+ BorderMenuRecord = 3,
+ BorderMessage = 4
};
-struct sBorderFrom {
+struct sDecorBorder {
+ int Left, Top, Width, Height, Size, Type;
+ tColor ColorFg, ColorBg;
int From;
- int Left, Top, Width, Height, Size;
};
class cFlatBaseRender
@@ -78,7 +80,7 @@ class cFlatBaseRender
cTextWrapper contentWrapper;
cPixmap *decorPixmap;
- std::list<sBorderFrom> Borders; // for clear specific Borders (clear only MenuItems and not TopBar)
+ std::list<sDecorBorder> Borders; // for clear specific Borders (clear only MenuItems and not TopBar)
void contentDraw(void);
double ScrollbarSize(void);
@@ -143,8 +145,9 @@ class cFlatBaseRender
bool ContentScroll(bool Up, bool Page);
void ContentClear(void);
- void DecorBorderDraw(int Left, int Top, int Width, int Height, int Size, int Type, tColor ColorFg, tColor ColorBg, int From = 0);
+ void DecorBorderDraw(int Left, int Top, int Width, int Height, int Size, int Type, tColor ColorFg, tColor ColorBg, int From = 0, bool Store = true);
void DecorBorderClear(int Left, int Top, int Width, int Height, int Size);
void DecorBorderClearAll(void);
+ void DecorBorderRedrawAll(void);
void DecorBorderClearByFrom(int From);
};
diff --git a/config.c b/config.c
index c0a6eafd..fe751191 100644
--- a/config.c
+++ b/config.c
@@ -15,6 +15,7 @@ cFlatConfig::cFlatConfig(void) {
marginOsdVer = 5;
marginOsdHor = 5;
TopBarFontSize = 0.05;
+ MessageOffset = 50;
decorBorderChannelByTheme = 1;
decorBorderChannelTypeUser = 0;
@@ -136,6 +137,7 @@ bool cFlatConfig::SetupParse(const char *Name, const char *Value) {
else if (strcmp(Name, "MenuItemPadding") == 0) MenuItemPadding = atoi(Value);
else if (strcmp(Name, "marginOsdVer") == 0) marginOsdVer = atoi(Value);
else if (strcmp(Name, "marginOsdHor") == 0) marginOsdHor = atoi(Value);
+ else if (strcmp(Name, "MessageOffset") == 0) MessageOffset = atoi(Value);
else if (strcmp(Name, "TopBarFontSize") == 0) TopBarFontSize = atod(Value);
else return false;
return true;
diff --git a/config.h b/config.h
index b74b3d85..7580a407 100644
--- a/config.h
+++ b/config.h
@@ -150,6 +150,7 @@ class cFlatConfig
int MenuItemPadding;
int marginOsdVer, marginOsdHor;
+ int MessageOffset;
double TopBarFontSize;
};
diff --git a/displaymenu.h b/displaymenu.h
index aad214eb..a3424c84 100644
--- a/displaymenu.h
+++ b/displaymenu.h
@@ -3,12 +3,6 @@
#include "baserender.h"
#include <list>
-struct sDecorBorder {
- int Left, Top, Width, Height, Size, Type;
- tColor ColorFg, ColorBg;
- int From;
-};
-
class cFlatDisplayMenu : public cFlatBaseRender, public cSkinDisplayMenu {
private:
cPixmap *menuPixmap;
diff --git a/po/de_DE.po b/po/de_DE.po
index d8eaa54d..4656a1df 100644
--- a/po/de_DE.po
+++ b/po/de_DE.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: vdr-skinflat 0.0.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2013-11-16 12:51+0100\n"
+"POT-Creation-Date: 2013-11-16 14:19+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"
@@ -100,7 +100,7 @@ msgid "Show empty color-buttons"
msgstr "Zeige leere Farbtasten"
msgid "Show Diskusage stats"
-msgstr ""
+msgstr "Zeige HDD Verbrauch"
msgid "OSD vertical margin"
msgstr "OSD vertikaler Rand"
@@ -109,7 +109,10 @@ msgid "OSD horizontal margin"
msgstr "OSD horizontaler Rand"
msgid "TopBar font size"
-msgstr ""
+msgstr "TopBar Font Größe"
+
+msgid "Message bottom offset"
+msgstr "Meldung unterer Abstand"
msgid "TopBar border by theme?"
msgstr "TopBar Rand vom Theme?"
diff --git a/setup.c b/setup.c
index 1b31dfe6..cfa7b72c 100644
--- a/setup.c
+++ b/setup.c
@@ -132,6 +132,8 @@ void cFlatSetup::Store(void) {
SetupStore("marginOsdVer", Config.marginOsdVer);
SetupStore("marginOsdHor", Config.marginOsdHor);
SetupStore("TopBarFontSize", dtoa(Config.TopBarFontSize));
+ SetupStore("MessageOffset", Config.MessageOffset);
+
Config.Init();
}
@@ -163,7 +165,8 @@ void cFlatSetupGeneral::Setup(void) {
Add(new cMenuEditIntItem(tr("OSD vertical margin"), &SetupConfig->marginOsdVer));
Add(new cMenuEditIntItem(tr("OSD horizontal margin"), &SetupConfig->marginOsdHor));
Add(new cMenuEditPrcItem(tr("TopBar font size"), &SetupConfig->TopBarFontSize, 0.01, 0.2, 1));
-
+ Add(new cMenuEditIntItem(tr("Message bottom offset"), &SetupConfig->MessageOffset));
+
Add(new cMenuEditBoolItem(tr("TopBar border by theme?"), &SetupConfig->decorBorderTopBarByTheme));
if( SetupConfig->decorBorderTopBarByTheme ) {
cString type = cString::sprintf("%s:\t%s", tr("TopBar border type"), Bordertypes[SetupConfig->decorBorderTopBarTypeTheme]);