Different setup parameter for displayTime in horizontal and vertical mode

This commit is contained in:
kamel5 2019-04-09 13:31:42 +02:00
parent 929d8db9ba
commit 0975e97519
4 changed files with 10 additions and 2 deletions

View File

@ -10,6 +10,7 @@ cTvguideConfig::cTvguideConfig() {
channelCols = 5; channelCols = 5;
channelRows = 10; channelRows = 10;
displayTime = 160; displayTime = 160;
displayHorizontalTime = 160;
displayStatusHeader = 1; displayStatusHeader = 1;
displayChannelGroups = 1; displayChannelGroups = 1;
displayTimeBase = 1; displayTimeBase = 1;
@ -257,6 +258,7 @@ bool cTvguideConfig::SetupParse(const char *Name, const char *Value) {
else if (strcmp(Name, "channelCols") == 0) channelCols = atoi(Value); else if (strcmp(Name, "channelCols") == 0) channelCols = atoi(Value);
else if (strcmp(Name, "channelRows") == 0) channelRows = atoi(Value); else if (strcmp(Name, "channelRows") == 0) channelRows = atoi(Value);
else if (strcmp(Name, "displayTime") == 0) displayTime = atoi(Value); else if (strcmp(Name, "displayTime") == 0) displayTime = atoi(Value);
else if (strcmp(Name, "displayHorizontalTime") == 0) displayHorizontalTime = atoi(Value);
else if (strcmp(Name, "hideChannelLogos") == 0) hideChannelLogos = atoi(Value); else if (strcmp(Name, "hideChannelLogos") == 0) hideChannelLogos = atoi(Value);
else if (strcmp(Name, "logoExtension") == 0) logoExtension = atoi(Value); else if (strcmp(Name, "logoExtension") == 0) logoExtension = atoi(Value);
else if (strcmp(Name, "logoWidthRatio") == 0) logoWidthRatio = atoi(Value); else if (strcmp(Name, "logoWidthRatio") == 0) logoWidthRatio = atoi(Value);

View File

@ -58,6 +58,7 @@ class cTvguideConfig {
int channelRows; int channelRows;
int numGrids; int numGrids;
int displayTime; int displayTime;
int displayHorizontalTime;
int displayStatusHeader; int displayStatusHeader;
int displayChannelGroups; int displayChannelGroups;
int displayTimeBase; int displayTimeBase;

View File

@ -49,7 +49,7 @@ bool cGeometryManager::SetGeometry(int osdWidth, int osdHeight, bool force) {
} else if (tvguideConfig.displayMode == eHorizontal) { } else if (tvguideConfig.displayMode == eHorizontal) {
colWidth = 0; colWidth = 0;
rowHeight = (osdHeight - statusHeaderHeight - timeLineHeight - footerHeight) / tvguideConfig.channelRows; rowHeight = (osdHeight - statusHeaderHeight - timeLineHeight - footerHeight) / tvguideConfig.channelRows;
minutePixel = (osdWidth - channelHeaderWidth - channelGroupsWidth) / tvguideConfig.displayTime; minutePixel = (osdWidth - channelHeaderWidth - channelGroupsWidth) / tvguideConfig.displayHorizontalTime;
channelLogoWidth = channelHeaderWidth; channelLogoWidth = channelHeaderWidth;
channelLogoHeight = rowHeight; channelLogoHeight = rowHeight;
logoWidth = channelLogoHeight * tvguideConfig.logoWidthRatio / tvguideConfig.logoHeightRatio; logoWidth = channelLogoHeight * tvguideConfig.logoWidthRatio / tvguideConfig.logoHeightRatio;

View File

@ -77,6 +77,7 @@ void cTvguideSetup::Store(void) {
SetupStore("channelCols", tvguideConfig.channelCols); SetupStore("channelCols", tvguideConfig.channelCols);
SetupStore("channelRows", tvguideConfig.channelRows); SetupStore("channelRows", tvguideConfig.channelRows);
SetupStore("displayTime", tvguideConfig.displayTime); SetupStore("displayTime", tvguideConfig.displayTime);
SetupStore("displayHorizontalTime", tvguideConfig.displayHorizontalTime);
SetupStore("bigStepHours", tvguideConfig.bigStepHours); SetupStore("bigStepHours", tvguideConfig.bigStepHours);
SetupStore("hugeStepHours", tvguideConfig.hugeStepHours); SetupStore("hugeStepHours", tvguideConfig.hugeStepHours);
SetupStore("channelJumpMode", tvguideConfig.channelJumpMode); SetupStore("channelJumpMode", tvguideConfig.channelJumpMode);
@ -209,7 +210,11 @@ void cMenuSetupGeneral::Set(void) {
if (themes.NumThemes()) if (themes.NumThemes())
Add(new cMenuEditStraItem(cString::sprintf("%s%s", *indent, tr("Theme")), &tmpTvguideConfig->themeIndex, themes.NumThemes(), themes.Descriptions())); Add(new cMenuEditStraItem(cString::sprintf("%s%s", *indent, tr("Theme")), &tmpTvguideConfig->themeIndex, themes.NumThemes(), themes.Descriptions()));
} }
if (tmpTvguideConfig->displayMode == eVertical) {
Add(new cMenuEditIntItem(tr("Time to display in minutes"), &tmpTvguideConfig->displayTime, 60, 320)); Add(new cMenuEditIntItem(tr("Time to display in minutes"), &tmpTvguideConfig->displayTime, 60, 320));
} else if (tmpTvguideConfig->displayMode == eHorizontal) {
Add(new cMenuEditIntItem(tr("Time to display in minutes"), &tmpTvguideConfig->displayHorizontalTime, 60, 320));
}
Add(new cMenuEditBoolItem(tr("Rounded Corners"), &tmpTvguideConfig->roundedCorners)); Add(new cMenuEditBoolItem(tr("Rounded Corners"), &tmpTvguideConfig->roundedCorners));
Add(new cMenuEditStraItem(tr("Channel Jump Mode (Keys Green / Yellow)"), &tmpTvguideConfig->channelJumpMode, 2, jumpMode)); Add(new cMenuEditStraItem(tr("Channel Jump Mode (Keys Green / Yellow)"), &tmpTvguideConfig->channelJumpMode, 2, jumpMode));