diff options
author | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2019-08-29 14:48:09 +0200 |
---|---|---|
committer | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2020-03-24 15:18:53 +0100 |
commit | c3fd79e041d20a221c5d6effb00cfc60d50dfd9e (patch) | |
tree | 482168726854459bcdf7a048ff143c28a0e973aa | |
parent | d991048cfc487a5f01014f141a66d3cb92276c90 (diff) | |
download | skin-lcarsng-c3fd79e041d20a221c5d6effb00cfc60d50dfd9e.tar.gz skin-lcarsng-c3fd79e041d20a221c5d6effb00cfc60d50dfd9e.tar.bz2 |
Add margin
-rw-r--r-- | config.c | 16 | ||||
-rw-r--r-- | config.h | 8 | ||||
-rw-r--r-- | displaychannel.c | 6 | ||||
-rw-r--r-- | displaychannel.h | 1 | ||||
-rw-r--r-- | displaymenu.c | 6 | ||||
-rw-r--r-- | displaymenu.h | 1 | ||||
-rw-r--r-- | displaymessage.c | 2 | ||||
-rw-r--r-- | displaymessage.h | 1 | ||||
-rw-r--r-- | displayreplay.c | 2 | ||||
-rw-r--r-- | displayreplay.h | 1 | ||||
-rw-r--r-- | displaytracks.c | 2 | ||||
-rw-r--r-- | displaytracks.h | 1 | ||||
-rw-r--r-- | displayvolume.c | 2 | ||||
-rw-r--r-- | displayvolume.h | 1 | ||||
-rw-r--r-- | lcarsng.c | 3 | ||||
-rw-r--r-- | lcarsng.h | 2 | ||||
-rw-r--r-- | setup.c | 20 | ||||
-rw-r--r-- | setup.h | 5 |
18 files changed, 48 insertions, 32 deletions
@@ -23,7 +23,7 @@ cLCARSNGConfig::cLCARSNGConfig(void) mcRecordingScaled = false; // mcRecordingInfo, // mcRecordingEdit, - mcPluginScaled = false; +// mcPluginScaled = false; // mcPluginSetup, mcSetupScaled = false; // mcSetupOsd, @@ -37,9 +37,9 @@ cLCARSNGConfig::cLCARSNGConfig(void) // mcSetupPlugins, mcCommandScaled = false; mcEventScaled = false; - mcTextScaled = false; - mcFolderScaled = false; - mcCamScaled = false; +// mcTextScaled = false; +// mcFolderScaled = false; +// mcCamScaled = false; } bool cLCARSNGConfig::SetupParse(const char *Name, const char *Value) @@ -50,13 +50,13 @@ bool cLCARSNGConfig::SetupParse(const char *Name, const char *Value) else if (!strcasecmp(Name, "ChannelMenue")) mcChannelScaled = atoi(Value); else if (!strcasecmp(Name, "TimerMenue")) mcTimerScaled = atoi(Value); else if (!strcasecmp(Name, "RecordingMenue")) mcRecordingScaled = atoi(Value); - else if (!strcasecmp(Name, "PluginMenue")) mcPluginScaled = atoi(Value); +// else if (!strcasecmp(Name, "PluginMenue")) mcPluginScaled = atoi(Value); else if (!strcasecmp(Name, "SetupMenue")) mcSetupScaled = atoi(Value); else if (!strcasecmp(Name, "CommandMenue")) mcCommandScaled = atoi(Value); else if (!strcasecmp(Name, "EventMenue")) mcEventScaled = atoi(Value); - else if (!strcasecmp(Name, "TextMenue")) mcTextScaled = atoi(Value); - else if (!strcasecmp(Name, "FolderMenue")) mcFolderScaled = atoi(Value); - else if (!strcasecmp(Name, "CamMenue")) mcCamScaled = atoi(Value); +// else if (!strcasecmp(Name, "TextMenue")) mcTextScaled = atoi(Value); +// else if (!strcasecmp(Name, "FolderMenue")) mcFolderScaled = atoi(Value); +// else if (!strcasecmp(Name, "CamMenue")) mcCamScaled = atoi(Value); else return false; return true; @@ -16,7 +16,7 @@ public: int mcRecordingScaled; // mcRecordingInfo, // mcRecordingEdit, - int mcPluginScaled; +// int mcPluginScaled; // mcPluginSetup, int mcSetupScaled; // mcSetupOsd, @@ -30,9 +30,9 @@ public: // mcSetupPlugins, int mcCommandScaled; int mcEventScaled; - int mcTextScaled; - int mcFolderScaled; - int mcCamScaled; +// int mcTextScaled; +// int mcFolderScaled; +// int mcCamScaled; bool SetupParse(const char *Name, const char *Value); cLCARSNGConfig(void); }; diff --git a/displaychannel.c b/displaychannel.c index 2942a1f..8773614 100644 --- a/displaychannel.c +++ b/displaychannel.c @@ -9,6 +9,7 @@ #include "lcarsng.h" #include "displaychannel.h" +#include "config.h" #include <vdr/font.h> #include <vdr/menu.h> #include <vdr/osd.h> @@ -56,6 +57,7 @@ cLCARSNGDisplayChannel::cLCARSNGDisplayChannel(bool WithInfo):cThread("LCARS Dis message = false; lastOn = false; On = false; + Margin = Config.Margin; int d = 5 * lineHeight; int d1 = 3 * lineHeight; xc00 = 0; @@ -294,9 +296,9 @@ void cLCARSNGDisplayChannel::DrawEventRec(const cEvent *Present, const cEvent *F eTimerMatch TimerMatch = tmNone; const cTimer *Timer = Timers->GetMatch(e, &TimerMatch); if (Timer && Timer->HasFlags(tfActive) && TimerMatch == tmFull) - osd->DrawEllipse(xc10m + Gap, y + Gap, xc10n - Gap - 1, y + lineHeight - Gap - 1, recColor, 0); + osd->DrawEllipse(xc10m + Gap, y + Gap + Margin, xc10n - Gap - 1, y + lineHeight - Gap - 1, recColor, 0); else - osd->DrawRectangle(xc10m + Gap, y, xc10n - Gap - 1, y + lineHeight - 1, Theme.Color(clrBackground)); + osd->DrawRectangle(xc10m + Gap, y + Margin, xc10n - Gap - 1, y + lineHeight - 1, Theme.Color(clrBackground)); } } } diff --git a/displaychannel.h b/displaychannel.h index d9aee8b..cf35d4c 100644 --- a/displaychannel.h +++ b/displaychannel.h @@ -34,6 +34,7 @@ private: int lineHeight; bool lastOn; bool On; + int Margin; cFont *tinyFont; cFont *tallFont; tColor frameColorFg; diff --git a/displaymenu.c b/displaymenu.c index 5f0923a..fabedd2 100644 --- a/displaymenu.c +++ b/displaymenu.c @@ -9,6 +9,7 @@ #include "lcarsng.h" #include "displaymenu.h" +#include "config.h" #include <vdr/font.h> #include <vdr/menu.h> #include <vdr/osd.h> @@ -58,6 +59,7 @@ cLCARSNGDisplayMenu::cLCARSNGDisplayMenu(void) frameColorBg = Theme.Color(clrMenuFrameBg); frameColorMg = Theme.Color(clrMenuFrameMg); currentIndex = -1; + Margin = Config.Margin; // The outer frame: int d = 5 * lineHeight; xa00 = 0; @@ -72,7 +74,7 @@ cLCARSNGDisplayMenu::cLCARSNGDisplayMenu(void) xa07 = xa08 - Gap; yt00 = 0; - yt01 = yt00 + lineHeight + Margin; + yt01 = yt00 + lineHeight + 2* Margin; yt02 = yt01 + lineHeight + Margin; yt03 = yt01 + d / 4; yt04 = yt02 + Gap; @@ -113,7 +115,7 @@ cLCARSNGDisplayMenu::cLCARSNGDisplayMenu(void) yb082 = yb081 + Gap; yb15 = cOsd::OsdHeight(); - yb14 = yb15 - lineHeight - Margin; + yb14 = yb15 - lineHeight - 2 * Margin; yb13 = yb14 - lineHeight - Margin; yb12 = yb14 - d / 4; yb11 = yb15 - d / 2; diff --git a/displaymenu.h b/displaymenu.h index bf3ef47..64108ea 100644 --- a/displaymenu.h +++ b/displaymenu.h @@ -92,6 +92,7 @@ private: const cRecording *lastRecording; cString lastHeader; int lastSeen; + int Margin; static cBitmap bmArrowUp, bmArrowDown, bmTransferMode; void DrawMainFrameUpper(tColor Color); void DrawMainFrameLower(void); diff --git a/displaymessage.c b/displaymessage.c index dc4b0e5..531fe54 100644 --- a/displaymessage.c +++ b/displaymessage.c @@ -1,5 +1,6 @@ #include "lcarsng.h" #include "displaymessage.h" +#include "config.h" #include <vdr/font.h> // --- cLCARSNGDisplayMessage ---------------------------------------------- @@ -8,6 +9,7 @@ cLCARSNGDisplayMessage::cLCARSNGDisplayMessage(void) { const cFont *font = cFont::GetFont(fontOsd); int lineHeight = font->Height(); + Margin = Config.Margin; x0 = 0; x1 = lineHeight / 2; x2 = lineHeight; diff --git a/displaymessage.h b/displaymessage.h index 854a359..7b55b48 100644 --- a/displaymessage.h +++ b/displaymessage.h @@ -8,6 +8,7 @@ private: cOsd *osd; int x0, x1, x2, x3, x4, x5, x6, x7; int y0, y1; + int Margin; public: cLCARSNGDisplayMessage(void); virtual ~cLCARSNGDisplayMessage(); diff --git a/displayreplay.c b/displayreplay.c index 04ea6c0..9c9e8a8 100644 --- a/displayreplay.c +++ b/displayreplay.c @@ -25,6 +25,7 @@ #include "lcarsng.h" #include "displayreplay.h" +#include "config.h" #include <vdr/font.h> #include <vdr/menu.h> #include <vdr/osd.h> @@ -56,6 +57,7 @@ cLCARSNGDisplayReplay::cLCARSNGDisplayReplay(bool ModeOnly):cThread("LCARS Displ frameColorBg = Theme.Color(clrReplayFrameBg); frameColorFg = Theme.Color(clrReplayFrameFg); frameColorMg = Theme.Color(clrReplayFrameMg); + Margin = Config.Margin; lastCurrentWidth = 0; lastTotalWidth = 0; memset(&lastTrackId, 0, sizeof(lastTrackId)); diff --git a/displayreplay.h b/displayreplay.h index 6b7fde2..ca16d01 100644 --- a/displayreplay.h +++ b/displayreplay.h @@ -27,6 +27,7 @@ class cLCARSNGDisplayReplay : public cSkinDisplayReplay, cThread { private: cOsd *osd; const cFont *font; + int Margin; int xp00, xp01, xp02, xp03, xp04, xp05, xp06, xp07, xp08, xp09, xp10, xp11, xp12, xp13, xp14, xp15; int yp00, yp01, yp02, yp03, yp04, yp05, yp06, yp07, yp08, yp09; bool modeOnly; diff --git a/displaytracks.c b/displaytracks.c index 0f923da..46c0d1b 100644 --- a/displaytracks.c +++ b/displaytracks.c @@ -1,5 +1,6 @@ #include "lcarsng.h" #include "displaytracks.h" +#include "config.h" #include <vdr/font.h> // --- cLCARSNGDisplayTracks ----------------------------------------------- @@ -16,6 +17,7 @@ cLCARSNGDisplayTracks::cLCARSNGDisplayTracks(const char *Title, int NumTracks, c frameColorBg = Theme.Color(clrTrackFrameBg); frameColorMg = Theme.Color(clrTrackFrameMg); currentIndex = -1; + Margin = Config.Margin; xt00 = 0; xt01 = xt00 + lineHeight / 2; xt02 = xt01 + Gap; diff --git a/displaytracks.h b/displaytracks.h index cd0a458..e7c3d0b 100644 --- a/displaytracks.h +++ b/displaytracks.h @@ -7,6 +7,7 @@ class cLCARSNGDisplayTracks : public cSkinDisplayTracks { private: cOsd *osd; + int Margin; int xt00, xt01, xt02, xt03, xt04, xt05, xt06, xt07, xt08, xt09, xt10, xt11, xt12; int yt00, yt01, yt02, yt03, yt04, yt05, yt06, yt07; int lineHeight; diff --git a/displayvolume.c b/displayvolume.c index da73d5a..025e3d6 100644 --- a/displayvolume.c +++ b/displayvolume.c @@ -1,4 +1,5 @@ #include "lcarsng.h" +#include "config.h" #include "displayvolume.h" #include <vdr/font.h> @@ -10,6 +11,7 @@ cLCARSNGDisplayVolume::cLCARSNGDisplayVolume(void) int lineHeight = font->Height(); frameColor = Theme.Color(clrVolumeFrame); mute = -1; + Margin = Config.Margin; x0 = 0; x1 = lineHeight / 2; x2 = lineHeight; diff --git a/displayvolume.h b/displayvolume.h index d77c7b1..7220dba 100644 --- a/displayvolume.h +++ b/displayvolume.h @@ -6,6 +6,7 @@ class cLCARSNGDisplayVolume : public cSkinDisplayVolume { private: cOsd *osd; + int Margin; int x0, x1, x2, x3, x4, x5, x6, x7; int y0, y1; tColor frameColor; @@ -24,6 +24,7 @@ // http://www.bracercom.com/tutorial/content/lcars_manifesto/the_lcars_manifesto.html #include "lcarsng.h" +#include "config.h" #include "displaychannel.h" #include "displaymenu.h" #include "displaymessage.h" @@ -194,7 +195,7 @@ void DrawDevicePosition(cOsd *Osd, const cPositioner *Positioner, int x0, int y0 void DrawRectangleOutline(cOsd *Osd, int x1, int y1, int x2, int y2, tColor Color1, tColor Color2, int usage) { Osd->DrawRectangle(x1, y1, x2, y2, Color1); - Osd->DrawRectangle(x1 + ((usage & muLeft) ? Margin : 0), y1 + ((usage & muTop) ? Margin : 0), x2 - ((usage & muRight) ? Margin : 0), y2 - ((usage & muBottom) ? Margin : 0), Color2); + Osd->DrawRectangle(x1 + ((usage & muLeft) ? Config.Margin : 0), y1 + ((usage & muTop) ? Config.Margin : 0), x2 - ((usage & muRight) ? Config.Margin : 0), y2 - ((usage & muBottom) ? Config.Margin : 0), Color2); } static time_t lastDiskSpaceCheck = 0; @@ -57,7 +57,7 @@ #include "symbols/volume.xpm" #define Gap (Setup.FontOsdSize / 5 & ~1) // must be even -#define Margin (Gap / 2) +//#define Margin (Gap / 2) #define TextFrame (Setup.FontOsdSize / TEXT_ALIGN_BORDER) #define TextSpacing (2 * TextFrame) #define SymbolSpacing TextSpacing @@ -5,6 +5,8 @@ #include "config.h" #include "setup.h" +cLCARSNGConfig tmpConfig; + /******************** MenuSetup ********************/ cLCARSNGSetup::cLCARSNGSetup() { @@ -13,20 +15,20 @@ cLCARSNGSetup::cLCARSNGSetup() { int currentItem = Current(); SetCols(45); - Add(new cMenuEditIntItem(tr("Margin"), &tmpConfig.Margin, 0, 3)); + Add(new cMenuEditIntItem(tr("Margin"), &tmpConfig.Margin, 0, 5)); Add(new cOsdItem(tr("Scaled video in menue:"), osUnknown, false)); Add(new cMenuEditBoolItem(tr("MainMenue"), &tmpConfig.mcMainScaled)); Add(new cMenuEditBoolItem(tr("ScheduleMenue"), &tmpConfig.mcScheduleScaled)); Add(new cMenuEditBoolItem(tr("ChannelMenue"), &tmpConfig.mcChannelScaled)); Add(new cMenuEditBoolItem(tr("TimerMenue"), &tmpConfig.mcTimerScaled)); Add(new cMenuEditBoolItem(tr("RecordingMenue"), &tmpConfig.mcRecordingScaled)); - Add(new cMenuEditBoolItem(tr("PluginMenue"), &tmpConfig.mcPluginScaled)); +// Add(new cMenuEditBoolItem(tr("PluginMenue"), &tmpConfig.mcPluginScaled)); Add(new cMenuEditBoolItem(tr("SetupMenue"), &tmpConfig.mcSetupScaled)); Add(new cMenuEditBoolItem(tr("CommandMenue"), &tmpConfig.mcCommandScaled)); Add(new cMenuEditBoolItem(tr("EventMenue"), &tmpConfig.mcEventScaled)); - Add(new cMenuEditBoolItem(tr("TextMenue"), &tmpConfig.mcTextScaled)); - Add(new cMenuEditBoolItem(tr("FolderMenue"), &tmpConfig.mcFolderScaled)); - Add(new cMenuEditBoolItem(tr("CamMenue"), &tmpConfig.mcCamScaled)); +// Add(new cMenuEditBoolItem(tr("TextMenue"), &tmpConfig.mcTextScaled)); +// Add(new cMenuEditBoolItem(tr("FolderMenue"), &tmpConfig.mcFolderScaled)); +// Add(new cMenuEditBoolItem(tr("CamMenue"), &tmpConfig.mcCamScaled)); SetCurrent(Get(currentItem)); Display(); @@ -41,11 +43,11 @@ void cLCARSNGSetup::Store(void) { SetupStore("ChannelMenue", Config.mcChannelScaled); SetupStore("TimerMenue", Config.mcTimerScaled); SetupStore("RecordingMenue", Config.mcRecordingScaled); - SetupStore("PluginMenue", Config.mcPluginScaled); +// SetupStore("PluginMenue", Config.mcPluginScaled); SetupStore("SetupMenue", Config.mcSetupScaled); SetupStore("CommandMenue", Config.mcCommandScaled); SetupStore("EventMenue", Config.mcEventScaled); - SetupStore("TextMenue", Config.mcTextScaled); - SetupStore("FolderMenue", Config.mcFolderScaled); - SetupStore("CamMenue", Config.mcCamScaled); +// SetupStore("TextMenue", Config.mcTextScaled); +// SetupStore("FolderMenue", Config.mcFolderScaled); +// SetupStore("CamMenue", Config.mcCamScaled); } @@ -1,13 +1,8 @@ #include <vdr/menu.h> -//#include "config.h" - -//extern cLCARSNGConfig config; class cLCARSNGSetup : public cMenuSetupPage { protected: virtual void Store(void); -private: - cLCARSNGConfig tmpConfig; public: cLCARSNGSetup(void); }; |