diff options
author | louis <louis.braun@gmx.de> | 2013-02-09 13:27:40 +0100 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2013-02-09 13:27:40 +0100 |
commit | 60efaee664776a5103d91105e78a6ac3aeeee748 (patch) | |
tree | 8fd78f1e1728acb7d0bc3408683475aa643861f2 | |
parent | 6b08851e7ceaffecee80cd58b693a961d90bae5d (diff) | |
download | skin-nopacity-60efaee664776a5103d91105e78a6ac3aeeee748.tar.gz skin-nopacity-60efaee664776a5103d91105e78a6ac3aeeee748.tar.bz2 |
Width of narrow menus (main, schedule, channel, recordings, settings) individually configurable
-rw-r--r-- | config.c | 10 | ||||
-rw-r--r-- | config.h | 5 | ||||
-rw-r--r-- | displaymenu.c | 30 | ||||
-rw-r--r-- | displaymenu.h | 3 | ||||
-rw-r--r-- | displaymenuview.c | 150 | ||||
-rw-r--r-- | displaymenuview.h | 19 | ||||
-rw-r--r-- | helpers.c | 8 | ||||
-rw-r--r-- | menuitem.c | 4 | ||||
-rw-r--r-- | po/de_DE.po | 15 | ||||
-rw-r--r-- | setup.c | 10 |
10 files changed, 171 insertions, 83 deletions
@@ -61,7 +61,10 @@ cNopacityConfig::cNopacityConfig() { numAdditionalEPGPictures = 9; menuFadeTime = 300; menuEPGWindowFadeTime = 300; - menuWidthNarrow = 30; + menuWidthMain = 30; + menuWidthSchedules = 30; + menuWidthChannels = 30; + menuWidthRecordings = 30; menuHeightInfoWindow = 20; menuScrollDelay = 1; menuScrollSpeed = 2; @@ -228,7 +231,10 @@ bool cNopacityConfig::SetupParse(const char *Name, const char *Value) { else if (strcmp(Name, "useSubtitleRerun") == 0) useSubtitleRerun = atoi(Value); else if (strcmp(Name, "displayAdditionalEPGPictures") == 0) displayAdditionalEPGPictures = atoi(Value); else if (strcmp(Name, "numAdditionalEPGPictures") == 0) numAdditionalEPGPictures = atoi(Value); - else if (strcmp(Name, "menuWidthNarrow") == 0) menuWidthNarrow = atoi(Value); + else if (strcmp(Name, "menuWidthMain") == 0) menuWidthMain = atoi(Value); + else if (strcmp(Name, "menuWidthSchedules") == 0) menuWidthSchedules = atoi(Value); + else if (strcmp(Name, "menuWidthChannels") == 0) menuWidthChannels = atoi(Value); + else if (strcmp(Name, "menuWidthRecordings") == 0) menuWidthRecordings = atoi(Value); else if (strcmp(Name, "menuWidthRightItems") == 0) menuWidthRightItems = atoi(Value); else if (strcmp(Name, "menuSizeDiskUsage") == 0) menuSizeDiskUsage = atoi(Value); else if (strcmp(Name, "menuHeightInfoWindow") == 0) menuHeightInfoWindow = atoi(Value); @@ -92,7 +92,10 @@ class cNopacityConfig { int menuInfoScrollDelay;
int menuInfoScrollSpeed;
int menuInfoScrollFrameTime;
- int menuWidthNarrow;
+ int menuWidthMain;
+ int menuWidthSchedules;
+ int menuWidthChannels;
+ int menuWidthRecordings;
int menuHeightInfoWindow;
int menuWidthRightItems;
int menuSizeDiskUsage;
diff --git a/displaymenu.c b/displaymenu.c index 0ccddad..a00d9c4 100644 --- a/displaymenu.c +++ b/displaymenu.c @@ -15,8 +15,6 @@ cNopacityDisplayMenu::cNopacityDisplayMenu(void) { menuItemIndexLast = -1; currentNumItems = 0; detailView = NULL; - contentNarrow = true; - contentNarrowLast = true; SetButtonPositions(); menuView = new cNopacityDisplayMenuView(); osd = menuView->createOsd(); @@ -39,7 +37,7 @@ cNopacityDisplayMenu::~cNopacityDisplayMenu() { delete detailView; } timers.Clear(); - for (int i=0; i<8; i++) + for (int i=0; i<10; i++) cOsdProvider::DropImage(handleBackgrounds[i]); for (int i=0; i<4; i++) cOsdProvider::DropImage(handleButtons[i]); @@ -194,21 +192,7 @@ void cNopacityDisplayMenu::SetMenuCategory(eMenuCategory MenuCategory) { 27 mcCam */ menuCategoryLast = this->MenuCategory(); - contentNarrowLast = contentNarrow; cSkinDisplayMenu::SetMenuCategory(MenuCategory); - switch (MenuCategory) { - case mcMain: - case mcSchedule: - case mcScheduleNow: - case mcScheduleNext: - case mcChannel: - case mcSetup: - case mcRecording: - contentNarrow = true; - break; - default: - contentNarrow = false; - } if ((menuCategoryLast == mcMain) && (MenuCategory != mcMain)) { if (config.showDiscUsage) { menuView->ShowDiskUsage(false); @@ -241,7 +225,7 @@ void cNopacityDisplayMenu::SetTitle(const char *Title) { menuView->ShowHeaderLogo(false); left += menuView->DrawHeaderIcon(MenuCategory()); } - menuView->AdjustContentBackground(contentNarrow, contentNarrowLast, videoWindowRect); + menuView->AdjustContentBackground(this->MenuCategory(), menuCategoryLast, videoWindowRect); menuView->DrawHeaderLabel(left, title); } } @@ -318,7 +302,7 @@ bool cNopacityDisplayMenu::SetItemEvent(const cEvent *Event, int Index, bool Cur item->SetFontEPGWindow(menuView->GetEPGWindowFont()); int spaceTop = menuView->GetMenuTop(currentNumItems, itemSize.Y()); item->SetGeometry(Index, spaceTop, menuView->spaceMenu, itemSize.X(), itemSize.Y()); - item->SetTextWindow(menuView->GetDescriptionTextWindowSize()); + item->SetTextWindow(menuView->GetDescriptionTextWindowSize(mcSchedule)); item->SetCurrent(Current); item->SetBackgrounds(handleBackgrounds); item->CreateText(); @@ -396,7 +380,7 @@ bool cNopacityDisplayMenu::SetItemRecording(const cRecording *Recording, int Ind item->SetFontEPGWindow(menuView->GetEPGWindowFont()); int spaceTop = menuView->GetMenuTop(currentNumItems, itemSize.Y()); item->SetGeometry(Index, spaceTop, menuView->spaceMenu, itemSize.X(), itemSize.Y()); - item->SetTextWindow(menuView->GetDescriptionTextWindowSize()); + item->SetTextWindow(menuView->GetDescriptionTextWindowSize(mcRecording)); item->SetCurrent(Current); item->SetBackgrounds(handleBackgrounds); item->CreateText(); @@ -548,7 +532,7 @@ void cNopacityDisplayMenu::SetScrollbar(int Total, int Offset) { void cNopacityDisplayMenu::SetEvent(const cEvent *Event) { if (!Event) return; - menuView->AdjustContentBackground(false, contentNarrowLast, videoWindowRect); + menuView->AdjustContentBackground(this->MenuCategory(), menuCategoryLast, videoWindowRect); detailView = new cNopacityMenuDetailEventView(osd, Event); menuView->SetDetailViewSize(dvEvent, detailView); detailView->SetFonts(); @@ -570,7 +554,7 @@ void cNopacityDisplayMenu::SetRecording(const cRecording *Recording) { if (!Info) { return; } - menuView->AdjustContentBackground(false, contentNarrowLast, videoWindowRect); + menuView->AdjustContentBackground(this->MenuCategory(), menuCategoryLast, videoWindowRect); detailView = new cNopacityMenuDetailRecordingView(osd, Recording); menuView->SetDetailViewSize(dvRecording, detailView); detailView->SetFonts(); @@ -588,7 +572,7 @@ void cNopacityDisplayMenu::SetRecording(const cRecording *Recording) { void cNopacityDisplayMenu::SetText(const char *Text, bool FixedFont) { if (!Text) return; - menuView->AdjustContentBackground(false, contentNarrowLast, videoWindowRect); + menuView->AdjustContentBackground(this->MenuCategory(), menuCategoryLast, videoWindowRect); detailView = new cNopacityMenuDetailTextView(osd, Text); menuView->SetDetailViewSize(dvText, detailView); detailView->SetFonts(); diff --git a/displaymenu.h b/displaymenu.h index 97a4931..6dc74f5 100644 --- a/displaymenu.h +++ b/displaymenu.h @@ -17,10 +17,9 @@ private: bool timersDrawn; int menuItemIndexLast; int currentNumItems; - bool contentNarrow, contentNarrowLast; cList<cNopacityTimer> timers; cList<cNopacityMenuItem> menuItems; - int handleBackgrounds[8]; + int handleBackgrounds[10]; int handleButtons[4]; int positionButtons[4]; cRect videoWindowRect; diff --git a/displaymenuview.c b/displaymenuview.c index c688f7f..405f0b1 100644 --- a/displaymenuview.c +++ b/displaymenuview.c @@ -55,10 +55,16 @@ void cNopacityDisplayMenuView::SetGeometry(void) { headerHeight = osdHeight * config.headerHeight / 100; footerHeight = osdHeight * config.footerHeight / 100; contentHeight = osdHeight - headerHeight - footerHeight; - contentWidthNarrow = osdWidth * config.menuWidthNarrow / 100; + contentWidthMain = osdWidth * config.menuWidthMain / 100; + contentWidthSchedules = osdWidth * config.menuWidthSchedules / 100; + contentWidthChannels = osdWidth * config.menuWidthChannels / 100; + contentWidthRecordings = osdWidth * config.menuWidthRecordings / 100; contentWidthFull = osdWidth - widthScrollbar - spaceMenu; menuItemWidthDefault = contentWidthFull - 4 * spaceMenu; - menuItemWidthMain = contentWidthNarrow - 4*spaceMenu; + menuItemWidthMain = contentWidthMain - 4*spaceMenu; + menuItemWidthSchedule = contentWidthSchedules - 4*spaceMenu; + menuItemWidthChannel = contentWidthChannels - 4*spaceMenu; + menuItemWidthRecording = contentWidthRecordings - 4*spaceMenu; menuItemHeightMain = config.iconHeight + 2; menuItemHeightSchedule = config.menuItemLogoHeight + 2; menuItemHeightDefault = contentHeight / config.numDefaultMenuItems - spaceMenu; @@ -74,22 +80,62 @@ void cNopacityDisplayMenuView::SetGeometry(void) { } void cNopacityDisplayMenuView::SetDescriptionTextWindowSize(void) { - int x = 2 * spaceMenu + contentWidthNarrow + widthScrollbar; + int xSchedules = 2 * spaceMenu + contentWidthSchedules + widthScrollbar; + int xRecordings = 2 * spaceMenu + contentWidthRecordings + widthScrollbar; int height = config.menuHeightInfoWindow * (contentHeight - 2*spaceMenu) / 100; int y = headerHeight + (contentHeight - height - spaceMenu); - int width = osdWidth - x - spaceMenu; - textWindowSize = cRect(x,y,width,height); + int widthSchedules = osdWidth - xSchedules - spaceMenu; + int widthRecordings = osdWidth - xRecordings - spaceMenu; + textWindowSizeSchedules = cRect(xSchedules,y,widthSchedules,height); + textWindowSizeRecordings = cRect(xRecordings,y,widthRecordings,height); } +cRect *cNopacityDisplayMenuView::GetDescriptionTextWindowSize(eMenuCategory menuCat) { + switch (menuCat) { + case mcSchedule: + return &textWindowSizeSchedules; + case mcRecording: + return &textWindowSizeRecordings; + default: + return NULL; + } + return NULL; +} + +int cNopacityDisplayMenuView::GetContentWidth(eMenuCategory menuCat) { + switch (menuCat) { + case mcMain: + case mcSetup: + return contentWidthMain; + case mcSchedule: + case mcScheduleNow: + case mcScheduleNext: + return contentWidthSchedules; + case mcChannel: + return contentWidthChannels; + case mcRecording: + return contentWidthRecordings; + default: + return contentWidthFull; + } + return contentWidthFull; +} + + void cNopacityDisplayMenuView::CreatePixmaps(void) { pixmapHeader = osd->CreatePixmap(1, cRect(0, 0, osdWidth, headerHeight)); pixmapHeaderLogo = osd->CreatePixmap(-1, cRect(0, 0, config.menuHeaderLogoWidth, config.menuHeaderLogoHeight)); pixmapHeaderLabel = osd->CreatePixmap(2, cRect(0, 0, osdWidth - dateWidth, headerHeight)); pixmapDate = osd->CreatePixmap(2, cRect(osdWidth - dateWidth, 0, dateWidth, headerHeight)); pixmapFooter = osd->CreatePixmap(1, cRect(0, osdHeight-footerHeight, osdWidth, footerHeight)); + int drawPortWidth = osdWidth + contentWidthFull + - Minimum(contentWidthMain, + contentWidthSchedules, + contentWidthChannels, + contentWidthRecordings); pixmapContent = osd->CreatePixmap(1, cRect(0, headerHeight, osdWidth, contentHeight), - cRect(0, 0, osdWidth + contentWidthFull - contentWidthNarrow, contentHeight)); - pixmapScrollbar = osd->CreatePixmap(2, cRect(contentWidthNarrow, headerHeight + spaceMenu, widthScrollbar, contentHeight - 2 * spaceMenu)); + cRect(0, 0, drawPortWidth, contentHeight)); + pixmapScrollbar = osd->CreatePixmap(2, cRect(contentWidthMain, headerHeight + spaceMenu, widthScrollbar, contentHeight - 2 * spaceMenu)); pixmapDiskUsage = osd->CreatePixmap(2, cRect(osdWidth - diskUsageWidth - 10, headerHeight + spaceMenu, diskUsageWidth, diskUsageHeight)); pixmapDiskUsageIcon = osd->CreatePixmap(3, cRect(osdWidth - diskUsageWidth - 8, headerHeight + spaceMenu + 2, diskUsageWidth - 4, diskUsageHeight - 4)); pixmapDiskUsageLabel = osd->CreatePixmap(4, cRect(osdWidth - diskUsageWidth - 8, headerHeight + spaceMenu + 2, diskUsageWidth - 4, diskUsageHeight - 4)); @@ -151,6 +197,7 @@ cFont *cNopacityDisplayMenuView::GetMenuItemFont(eMenuCategory menuCat) { case mcUnknown: return fontMenuitemDefault; case mcMain: + case mcSetup: return fontMenuitemLarge; case mcSchedule: return fontMenuitemSchedule; @@ -191,21 +238,22 @@ void cNopacityDisplayMenuView::GetMenuItemSize(eMenuCategory menuCat, cPoint *it itemHeight = menuItemHeightDefault; break; case mcMain: + case mcSetup: itemWidth = menuItemWidthMain; itemHeight = menuItemHeightMain; break; case mcSchedule: case mcScheduleNow: case mcScheduleNext: - itemWidth = menuItemWidthMain; + itemWidth = menuItemWidthSchedule; itemHeight = menuItemHeightSchedule; break; case mcChannel: - itemWidth = menuItemWidthMain; + itemWidth = menuItemWidthChannel; itemHeight = menuItemHeightSchedule; break; case mcRecording: - itemWidth = menuItemWidthMain; + itemWidth = menuItemWidthRecording; itemHeight = menuItemHeightRecordings; break; default: @@ -275,23 +323,37 @@ const cFont *cNopacityDisplayMenuView::GetTextAreaFont(bool FixedFont) { void cNopacityDisplayMenuView::CreateBackgroundImages(int *handleBackgrounds, int *handleButtons) { cImageLoader imgLoader; + //Default Menus imgLoader.DrawBackground(Theme.Color(clrMenuItem), Theme.Color(clrMenuItemBlend), menuItemWidthDefault-2, menuItemHeightDefault-2); handleBackgrounds[0] = cOsdProvider::StoreImage(imgLoader.GetImage()); imgLoader.DrawBackground(Theme.Color(clrMenuItemHigh), Theme.Color(clrMenuItemHighBlend), menuItemWidthDefault-2, menuItemHeightDefault-2); handleBackgrounds[1] = cOsdProvider::StoreImage(imgLoader.GetImage()); - imgLoader.DrawBackground(Theme.Color(clrMenuItem), Theme.Color(clrMenuItemBlend), menuItemWidthMain-2, menuItemHeightMain-2); + //Main Menu + cPoint itemSize; + GetMenuItemSize(mcMain, &itemSize); + imgLoader.DrawBackground(Theme.Color(clrMenuItem), Theme.Color(clrMenuItemBlend), itemSize.X()-2, itemSize.Y()-2); handleBackgrounds[2] = cOsdProvider::StoreImage(imgLoader.GetImage()); - imgLoader.DrawBackground(Theme.Color(clrMenuItemHigh), Theme.Color(clrMenuItemHighBlend), menuItemWidthMain-2, menuItemHeightMain-2); + imgLoader.DrawBackground(Theme.Color(clrMenuItemHigh), Theme.Color(clrMenuItemHighBlend), itemSize.X()-2, itemSize.Y()-2); handleBackgrounds[3] = cOsdProvider::StoreImage(imgLoader.GetImage()); - imgLoader.DrawBackground(Theme.Color(clrMenuItem), Theme.Color(clrMenuItemBlend), menuItemWidthMain-2, menuItemHeightSchedule-2); + //Schedules Menu + GetMenuItemSize(mcSchedule, &itemSize); + imgLoader.DrawBackground(Theme.Color(clrMenuItem), Theme.Color(clrMenuItemBlend), itemSize.X()-2, itemSize.Y()-2); handleBackgrounds[4] = cOsdProvider::StoreImage(imgLoader.GetImage()); - imgLoader.DrawBackground(Theme.Color(clrMenuItemHigh), Theme.Color(clrMenuItemHighBlend), menuItemWidthMain-2, menuItemHeightSchedule-2); + imgLoader.DrawBackground(Theme.Color(clrMenuItemHigh), Theme.Color(clrMenuItemHighBlend), itemSize.X()-2, itemSize.Y()-2); handleBackgrounds[5] = cOsdProvider::StoreImage(imgLoader.GetImage()); - imgLoader.DrawBackground(Theme.Color(clrMenuItem), Theme.Color(clrMenuItemBlend), menuItemWidthMain-2, menuItemHeightRecordings-2); + //Channels Menu + GetMenuItemSize(mcChannel, &itemSize); + imgLoader.DrawBackground(Theme.Color(clrMenuItem), Theme.Color(clrMenuItemBlend), itemSize.X()-2, itemSize.Y()-2); handleBackgrounds[6] = cOsdProvider::StoreImage(imgLoader.GetImage()); - imgLoader.DrawBackground(Theme.Color(clrMenuItemHigh), Theme.Color(clrMenuItemHighBlend), menuItemWidthMain-2, menuItemHeightRecordings-2); + imgLoader.DrawBackground(Theme.Color(clrMenuItemHigh), Theme.Color(clrMenuItemHighBlend), itemSize.X()-2, itemSize.Y()-2); handleBackgrounds[7] = cOsdProvider::StoreImage(imgLoader.GetImage()); - + //Recordings Menu + GetMenuItemSize(mcRecording, &itemSize); + imgLoader.DrawBackground(Theme.Color(clrMenuItem), Theme.Color(clrMenuItemBlend), itemSize.X()-2, itemSize.Y()-2); + handleBackgrounds[8] = cOsdProvider::StoreImage(imgLoader.GetImage()); + imgLoader.DrawBackground(Theme.Color(clrMenuItemHigh), Theme.Color(clrMenuItemHighBlend), itemSize.X()-2, itemSize.Y()-2); + handleBackgrounds[9] = cOsdProvider::StoreImage(imgLoader.GetImage()); + imgLoader.DrawBackground(Theme.Color(clrMenuBack), Theme.Color(clrButtonRed), buttonWidth-4, buttonHeight-4); handleButtons[0] = cOsdProvider::StoreImage(imgLoader.GetImage()); imgLoader.DrawBackground(Theme.Color(clrMenuBack), Theme.Color(clrButtonGreen), buttonWidth-4, buttonHeight-4); @@ -310,11 +372,14 @@ void cNopacityDisplayMenuView::DrawBorderDecoration() { int borderWidth = 2; int radius = 10; - + int minContentWidth = Minimum(contentWidthMain, + contentWidthSchedules, + contentWidthChannels, + contentWidthRecordings); pixmapContent->Fill(clrTransparent); pixmapContent->DrawRectangle(cRect(0, 0, contentWidthFull-radius, contentHeight), Theme.Color(clrMenuBack)); - pixmapContent->DrawRectangle(cRect(contentWidthFull, 0, osdWidth - contentWidthNarrow, borderWidth), Theme.Color(clrMenuBorder)); - pixmapContent->DrawRectangle(cRect(contentWidthFull, contentHeight - borderWidth, osdWidth - contentWidthNarrow, borderWidth), Theme.Color(clrMenuBorder)); + pixmapContent->DrawRectangle(cRect(contentWidthFull, 0, osdWidth - minContentWidth, borderWidth), Theme.Color(clrMenuBorder)); + pixmapContent->DrawRectangle(cRect(contentWidthFull, contentHeight - borderWidth, osdWidth - minContentWidth, borderWidth), Theme.Color(clrMenuBorder)); pixmapContent->DrawRectangle(cRect(contentWidthFull - radius, 0, radius, radius), Theme.Color(clrMenuBack)); pixmapContent->DrawEllipse(cRect(contentWidthFull - radius, 0, radius, radius), Theme.Color(clrMenuBorder),2); pixmapContent->DrawEllipse(cRect(contentWidthFull - radius + borderWidth, borderWidth, radius-borderWidth, radius-borderWidth), clrTransparent, 2); @@ -325,30 +390,31 @@ void cNopacityDisplayMenuView::DrawBorderDecoration() { } -void cNopacityDisplayMenuView::AdjustContentBackground(bool contentNarrow, bool contentNarrowLast, cRect & vidWin) { - if (contentNarrow) { - pixmapContent->SetDrawPortPoint(cPoint(contentWidthNarrow - contentWidthFull, 0)); - if (config.scalePicture) { - // ask output device to scale down - cRect availableRect( - osdLeft + contentWidthNarrow + widthScrollbar + 2 * spaceMenu, - osdTop + headerHeight, - contentWidthFull - osdLeft - contentWidthNarrow - widthScrollbar - 4 * spaceMenu, - contentHeight);// - osdTop - headerHeight); - vidWin = cDevice::PrimaryDevice()->CanScaleVideo(availableRect); +void cNopacityDisplayMenuView::AdjustContentBackground(eMenuCategory menuCat, eMenuCategory menuCatLast, cRect & vidWin) { + int contentWidth = GetContentWidth(menuCat); + int contentWidthLast = GetContentWidth(menuCatLast); + if (contentWidth != contentWidthLast) { + if (contentWidth == contentWidthFull) { + pixmapContent->SetDrawPortPoint(cPoint(0, 0)); + if (config.scalePicture) { + // ask output device to restore full size + vidWin = cDevice::PrimaryDevice()->CanScaleVideo(cRect::Null); + } + } else { + pixmapContent->SetDrawPortPoint(cPoint(contentWidth - contentWidthFull, 0)); + if (config.scalePicture) { + // ask output device to scale down + cRect availableRect( + osdLeft + contentWidth + widthScrollbar + 2 * spaceMenu, + osdTop + headerHeight, + contentWidthFull - osdLeft - contentWidth - widthScrollbar - 4 * spaceMenu, + contentHeight);// - osdTop - headerHeight); + vidWin = cDevice::PrimaryDevice()->CanScaleVideo(availableRect); + } } - } else { - pixmapContent->SetDrawPortPoint(cPoint(0, 0)); - if (config.scalePicture) { - // ask output device to restore full size - vidWin = cDevice::PrimaryDevice()->CanScaleVideo(cRect::Null); - } - } - if (contentNarrow != contentNarrowLast) { - osd->DestroyPixmap(pixmapScrollbar); - int contentWidth = (contentNarrow)?contentWidthNarrow:contentWidthFull; - pixmapScrollbar = osd->CreatePixmap(2, cRect(contentWidth , headerHeight + spaceMenu, widthScrollbar, osdHeight - headerHeight - footerHeight - 2*spaceMenu)); } + osd->DestroyPixmap(pixmapScrollbar); + pixmapScrollbar = osd->CreatePixmap(2, cRect(contentWidth , headerHeight + spaceMenu, widthScrollbar, osdHeight - headerHeight - footerHeight - 2*spaceMenu)); } void cNopacityDisplayMenuView::DrawHeaderLogo(void) { diff --git a/displaymenuview.h b/displaymenuview.h index 9412449..e3d0b6d 100644 --- a/displaymenuview.h +++ b/displaymenuview.h @@ -42,18 +42,25 @@ class cNopacityDisplayMenuView { int widthScrollbar; int dateWidth; int headerHeight, footerHeight, contentHeight; - int contentWidthNarrow, contentWidthFull; + int contentWidthFull; + int contentWidthMain; + int contentWidthSchedules; + int contentWidthChannels; + int contentWidthRecordings; int menuItemWidthDefault, menuItemHeightDefault; int menuItemWidthMain, menuItemHeightMain; - int menuItemHeightSchedule; - int menuItemHeightRecordings; + int menuItemWidthSchedule, menuItemHeightSchedule; + int menuItemWidthChannel; + int menuItemWidthRecording, menuItemHeightRecordings; int diskUsageWidth, diskUsageHeight; int timersWidth; int buttonsBorder, buttonWidth, buttonHeight; int messageWidth, messageHeight; int avrgFontWidth; - cRect textWindowSize; + cRect textWindowSizeSchedules; + cRect textWindowSizeRecordings; void SetDescriptionTextWindowSize(void); + int GetContentWidth(eMenuCategory menuCat); public: cNopacityDisplayMenuView(); virtual ~cNopacityDisplayMenuView(void); @@ -75,9 +82,9 @@ class cNopacityDisplayMenuView { int GetWidthDefaultMenu(void) {return menuItemWidthDefault;}; int GetTextAreaWidth(void); const cFont *GetTextAreaFont(bool FixedFont); - cRect *GetDescriptionTextWindowSize(void) {return &textWindowSize;}; + cRect *GetDescriptionTextWindowSize(eMenuCategory menuCat); void CreateBackgroundImages(int *handleBackgrounds, int *handleButtons); - void AdjustContentBackground(bool contentNarrow, bool contentNarrowLast, cRect & vidWin); + void AdjustContentBackground(eMenuCategory menuCat, eMenuCategory menuCatLast, cRect & vidWin); void DrawBorderDecoration(void); int ShowHeaderLogo(bool show); void DrawHeaderLogo(void); @@ -35,4 +35,12 @@ static void DrawBlendedBackground(cPixmap *pixmap, tColor color, tColor colorBle if (i == end) cont = false; } +} + +static int Minimum(int a, int b, int c, int d) { + int min = a; + if (b < min) min = b; + if (c < min) min = c; + if (d < min) min = d; + return min; }
\ No newline at end of file @@ -567,7 +567,7 @@ void cNopacityChannelMenuItem::DrawBackground(int handleBackground) { void cNopacityChannelMenuItem::Render() { - int handleBgrd = (current)?handleBackgrounds[5]:handleBackgrounds[4]; + int handleBgrd = (current)?handleBackgrounds[7]:handleBackgrounds[6]; if (selectable) { //Channels DrawBackground(handleBgrd); @@ -807,7 +807,7 @@ void cNopacityRecordingMenuItem::DrawFolderNewSeen(void) { void cNopacityRecordingMenuItem::Render() { - int handleBgrd = (current)?handleBackgrounds[7]:handleBackgrounds[6]; + int handleBgrd = (current)?handleBackgrounds[9]:handleBackgrounds[8]; if (selectable) { pixmap->Fill(Theme.Color(clrMenuBorder)); pixmap->DrawImage(cPoint(1, 1), handleBgrd); diff --git a/po/de_DE.po b/po/de_DE.po index 11cd06c..5e1fbbc 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: skinnopacity 0.0.1\n" "Report-Msgid-Bugs-To: <see README>\n" -"POT-Creation-Date: 2013-02-03 17:28+0100\n" +"POT-Creation-Date: 2013-02-08 17:20+0100\n" "PO-Revision-Date: 2012-11-11 17:49+0200\n" "Last-Translator: louis\n" "Language-Team: \n" @@ -155,8 +155,17 @@ msgstr "Weitere EPG Bilder in der detaillierten EPG Ansicht anzeigen" msgid "Number of EPG pictures to display" msgstr "Anzahl der zusätzlichen EPG Bilder" -msgid "Width of narrow Menu Bar (Percent of OSD Width)" -msgstr "Breite der schmalen Menüleiste (Proz. der OSD Breite)" +msgid "Width of Main and Setup Menu (Percent of OSD Width)" +msgstr "Breite des Haupt und Setup Menüs (Proz. der OSD Breite)" + +msgid "Width of Schedules Menu (Percent of OSD Width)" +msgstr "Breite des Programm Menüs (Proz. der OSD Breite)" + +msgid "Width of Channels Menu (Percent of OSD Width)" +msgstr "Breite des Kanalmenüs (Proz. der OSD Breite)" + +msgid "Width of Recordings Menu (Percent of OSD Width)" +msgstr "Breite des Aufzeichnugsmenüs (Proz. der OSD Breite)" msgid "Size of Disc Usage (square, Percent of OSD Width)" msgstr "Größe des Festplattenstatus (quadratisch, Proz. der OSD Breite)" @@ -107,7 +107,10 @@ void cNopacitySetup::Store(void) { SetupStore("menuFadeTime", config.menuFadeTime); SetupStore("menuScrollDelay", config.menuScrollDelay); SetupStore("menuScrollSpeed", config.menuScrollSpeed); - SetupStore("menuWidthNarrow", config.menuWidthNarrow); + SetupStore("menuWidthMain", config.menuWidthMain); + SetupStore("menuWidthSchedules", config.menuWidthSchedules); + SetupStore("menuWidthChannels", config.menuWidthChannels); + SetupStore("menuWidthRecordings", config.menuWidthRecordings); SetupStore("menuWidthRightItems", config.menuWidthRightItems); SetupStore("menuSizeDiskUsage", config.menuSizeDiskUsage); SetupStore("menuHeightInfoWindow", config.menuHeightInfoWindow); @@ -231,7 +234,10 @@ cNopacitySetupMenuDisplayGeometry::cNopacitySetupMenuDisplayGeometry(cNopacityCo void cNopacitySetupMenuDisplayGeometry::Set(void) { int currentItem = Current(); Clear(); - Add(new cMenuEditIntItem(tr("Width of narrow Menu Bar (Percent of OSD Width)"), &tmpNopacityConfig->menuWidthNarrow, 10, 100)); + Add(new cMenuEditIntItem(tr("Width of Main and Setup Menu (Percent of OSD Width)"), &tmpNopacityConfig->menuWidthMain, 10, 100)); + Add(new cMenuEditIntItem(tr("Width of Schedules Menu (Percent of OSD Width)"), &tmpNopacityConfig->menuWidthSchedules, 10, 100)); + Add(new cMenuEditIntItem(tr("Width of Channels Menu (Percent of OSD Width)"), &tmpNopacityConfig->menuWidthChannels, 10, 100)); + Add(new cMenuEditIntItem(tr("Width of Recordings Menu (Percent of OSD Width)"), &tmpNopacityConfig->menuWidthRecordings, 10, 100)); Add(new cMenuEditIntItem(tr("Size of Disc Usage (square, Percent of OSD Width)"), &tmpNopacityConfig->menuSizeDiskUsage, 2, 100)); Add(new cMenuEditIntItem(tr("Width of Timers Display (Percent of OSD Width)"), &tmpNopacityConfig->menuWidthRightItems, 5, 100)); Add(new cMenuEditIntItem(tr("Height of EPG Info Window (Percent of OSD Height)"), &tmpNopacityConfig->menuHeightInfoWindow, 10, 100)); |