summaryrefslogtreecommitdiff
path: root/displaymenuview.c
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2013-03-09 16:42:48 +0100
committerlouis <louis.braun@gmx.de>2013-03-09 16:42:48 +0100
commit3d4c1d84b7cd2ca23e3fda446a30b55a1d4878d9 (patch)
treecd8bba326fcdb4541f85e3be335b4671f21bed2a /displaymenuview.c
parentc7785076bf49db3d0ab1ae63ccb19bd3f9fe43e3 (diff)
downloadskin-nopacity-3d4c1d84b7cd2ca23e3fda446a30b55a1d4878d9.tar.gz
skin-nopacity-3d4c1d84b7cd2ca23e3fda446a30b55a1d4878d9.tar.bz2
Restructured setup menu
Diffstat (limited to 'displaymenuview.c')
-rw-r--r--displaymenuview.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/displaymenuview.c b/displaymenuview.c
index 3c856ec..420e5d1 100644
--- a/displaymenuview.c
+++ b/displaymenuview.c
@@ -62,18 +62,21 @@ void cNopacityDisplayMenuView::SetGeometry(void) {
contentWidthChannels = osdWidth * config.menuWidthChannels / 100;
contentWidthTimers = osdWidth * config.menuWidthTimers / 100;
contentWidthRecordings = osdWidth * config.menuWidthRecordings / 100;
+ contentWidthSetup = osdWidth * config.menuWidthSetup / 100;
contentWidthFull = osdWidth - widthScrollbar - spaceMenu;
contentWidthMinimum = Minimum(contentWidthMain,
contentWidthSchedules,
contentWidthChannels,
contentWidthTimers,
- contentWidthRecordings);
+ contentWidthRecordings,
+ contentWidthSetup);
menuItemWidthDefault = contentWidthFull - 4 * spaceMenu;
menuItemWidthMain = contentWidthMain - 4*spaceMenu;
menuItemWidthSchedule = contentWidthSchedules - 4*spaceMenu;
menuItemWidthChannel = contentWidthChannels - 4*spaceMenu;
menuItemWidthTimer = contentWidthTimers - 4*spaceMenu;
menuItemWidthRecording = contentWidthRecordings - 4*spaceMenu;
+ menuItemWidthSetup = contentWidthSetup - 4*spaceMenu;
menuItemHeightMain = config.iconHeight + 2;
menuItemHeightSchedule = config.menuItemLogoHeight + 2;
menuItemHeightDefault = contentHeight / config.numDefaultMenuItems - spaceMenu;
@@ -120,7 +123,7 @@ int cNopacityDisplayMenuView::GetContentWidth(eMenuCategory menuCat) {
return contentWidthFull;
case mcSetup:
if (config.narrowSetupMenu)
- return contentWidthMain;
+ return contentWidthSetup;
else
return contentWidthFull;
case mcSchedule:
@@ -275,10 +278,13 @@ void cNopacityDisplayMenuView::GetMenuItemSize(eMenuCategory menuCat, cPoint *it
itemHeight = menuItemHeightDefault;
break;
case mcMain:
- case mcSetup:
itemWidth = menuItemWidthMain;
itemHeight = menuItemHeightMain;
break;
+ case mcSetup:
+ itemWidth = menuItemWidthSetup;
+ itemHeight = menuItemHeightMain;
+ break;
case mcSchedule:
case mcScheduleNow:
case mcScheduleNext:
@@ -408,6 +414,12 @@ void cNopacityDisplayMenuView::CreateBackgroundImages(int *handleBackgrounds, in
handleBackgrounds[10] = cOsdProvider::StoreImage(imgLoader.GetImage());
imgLoader.DrawBackground(Theme.Color(clrMenuItemHigh), Theme.Color(clrMenuItemHighBlend), itemSize.X()-2, itemSize.Y()-2);
handleBackgrounds[11] = cOsdProvider::StoreImage(imgLoader.GetImage());
+ //Setup Menu
+ GetMenuItemSize(mcSetup, &itemSize);
+ imgLoader.DrawBackground(Theme.Color(clrMenuItem), Theme.Color(clrMenuItemBlend), itemSize.X()-2, itemSize.Y()-2);
+ handleBackgrounds[12] = cOsdProvider::StoreImage(imgLoader.GetImage());
+ imgLoader.DrawBackground(Theme.Color(clrMenuItemHigh), Theme.Color(clrMenuItemHighBlend), itemSize.X()-2, itemSize.Y()-2);
+ handleBackgrounds[13] = cOsdProvider::StoreImage(imgLoader.GetImage());
imgLoader.DrawBackground(Theme.Color(clrMenuBack), Theme.Color(clrButtonRed), buttonWidth-4, buttonHeight-4);
handleButtons[0] = cOsdProvider::StoreImage(imgLoader.GetImage());