diff options
author | louis <louis.braun@gmx.de> | 2013-02-26 18:36:51 +0100 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2013-02-26 18:36:51 +0100 |
commit | d099b5d5f922e6773ad5c5165e951fc280c5c5c1 (patch) | |
tree | 4078905ca9b7761f29b6140a0465d9c76cb8a5d9 | |
parent | 6b4c35ae9aac8b9081a5d9f8e28fe4f4ce7458e3 (diff) | |
download | skin-nopacity-d099b5d5f922e6773ad5c5165e951fc280c5c5c1.tar.gz skin-nopacity-d099b5d5f922e6773ad5c5165e951fc280c5c5c1.tar.bz2 |
Usage of menu icons in main and setup menu configurable
-rw-r--r-- | HISTORY | 1 | ||||
-rw-r--r-- | config.c | 2 | ||||
-rw-r--r-- | config.h | 1 | ||||
-rw-r--r-- | displaymenu.c | 3 | ||||
-rw-r--r-- | menuitem.c | 22 | ||||
-rw-r--r-- | po/de_DE.po | 5 | ||||
-rw-r--r-- | setup.c | 2 |
7 files changed, 26 insertions, 10 deletions
@@ -142,3 +142,4 @@ Version 0.0.7: - display all jpegs in a recording folder in detailed recording view - Fixed a bug that Setup option narrowRecordingMenu was not stored - Fixed displaying remotetimers in main menu +- Usage of menu icons in main and setup menu configurable @@ -56,6 +56,7 @@ cNopacityConfig::cNopacityConfig() { scalePicture = 1; roundedCorners = 0; cornerRadius = 12; + useMenuIcons = 1; narrowMainMenu = 1; narrowScheduleMenu = 1; narrowChannelMenu = 1; @@ -241,6 +242,7 @@ bool cNopacityConfig::SetupParse(const char *Name, const char *Value) { else if (strcmp(Name, "scalePicture") == 0) scalePicture = atoi(Value); else if (strcmp(Name, "roundedCorners") == 0) roundedCorners = atoi(Value); else if (strcmp(Name, "cornerRadius") == 0) cornerRadius = atoi(Value); + else if (strcmp(Name, "useMenuIcons") == 0) useMenuIcons = atoi(Value); else if (strcmp(Name, "narrowMainMenu") == 0) narrowMainMenu = atoi(Value); else if (strcmp(Name, "narrowScheduleMenu") == 0) narrowScheduleMenu = atoi(Value); else if (strcmp(Name, "narrowChannelMenu") == 0) narrowChannelMenu = atoi(Value); @@ -78,6 +78,7 @@ class cNopacityConfig { int scalePicture;
int roundedCorners;
int cornerRadius;
+ int useMenuIcons;
int narrowMainMenu;
int narrowScheduleMenu;
int narrowChannelMenu;
diff --git a/displaymenu.c b/displaymenu.c index 78c60da..59730e4 100644 --- a/displaymenu.c +++ b/displaymenu.c @@ -533,7 +533,8 @@ void cNopacityDisplayMenu::SetItem(const char *Text, int Index, bool Current, bo item = new cNopacityMainMenuItem(osd, Text, Selectable); menuView->GetMenuItemSize(mcMain, &itemSize); item->SetFont(menuView->GetMenuItemFont(mcMain)); - hasIcons = true; + if (config.useMenuIcons) + hasIcons = true; } else { item = new cNopacityDefaultMenuItem(osd, Text, Selectable); menuView->GetMenuItemSize(mcUnknown, &itemSize); @@ -212,8 +212,12 @@ cString cNopacityMainMenuItem::GetIconName() { } void cNopacityMainMenuItem::CreatePixmapTextScroller(int totalWidth) { - int pixmapLeft = left + config.iconHeight + 10; - int pixmapWidth = width - config.iconHeight - 10; + int pixmapLeft = left + 10; + if (config.useMenuIcons) + pixmapLeft += config.iconHeight; + int pixmapWidth = width - 10; + if (config.useMenuIcons) + pixmapWidth -= config.iconHeight; int drawPortWidth = totalWidth + 10; pixmapTextScroller = osd->CreatePixmap(4, cRect(pixmapLeft, top + index * (height + left), pixmapWidth, height), cRect(0, 0, drawPortWidth, height)); pixmapTextScroller->Fill(clrTransparent); @@ -300,13 +304,15 @@ void cNopacityMainMenuItem::Render() { if (config.roundedCorners) DrawRoundedCorners(Theme.Color(clrMenuBorder)); if (selectable) { - cString cIcon = GetIconName(); - if (!drawn) { - cImageLoader imgLoader; - if (imgLoader.LoadIcon(*cIcon, config.iconHeight)) { - pixmapIcon->DrawImage(cPoint(1, 1), imgLoader.GetImage()); + if (config.useMenuIcons) { + cString cIcon = GetIconName(); + if (!drawn) { + cImageLoader imgLoader; + if (imgLoader.LoadIcon(*cIcon, config.iconHeight)) { + pixmapIcon->DrawImage(cPoint(1, 1), imgLoader.GetImage()); + } + drawn = true; } - drawn = true; } SetTextShort(); if (current && scrollable && !Running() && config.menuScrollSpeed) { diff --git a/po/de_DE.po b/po/de_DE.po index d2c02da..3111bef 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-20 15:36+0100\n" +"POT-Creation-Date: 2013-02-26 17:20+0100\n" "PO-Revision-Date: 2012-11-11 17:49+0200\n" "Last-Translator: louis\n" "Language-Team: \n" @@ -134,6 +134,9 @@ msgstr "Abgerundete Ecken für Menüelemente und Buttons" msgid "Fade-In Time in ms (Zero for switching off fading)" msgstr "Fade-In Zeit in ms (Null zum Abschalten)" +msgid "Use menu icons in main and setup menu" +msgstr "Menü Icons im Haupt- und Setupmenü benutzen" + msgid "Display Disk Usage in main menu" msgstr "Festplattenstatus im Hauptmenü anzeigen" @@ -101,6 +101,7 @@ void cNopacitySetup::Store(void) { SetupStore("scalePicture", config.scalePicture); SetupStore("roundedCorners", config.roundedCorners); SetupStore("cornerRadius", config.cornerRadius); + SetupStore("useMenuIcons", config.useMenuIcons); SetupStore("narrowMainMenu", config.narrowMainMenu); SetupStore("narrowScheduleMenu", config.narrowScheduleMenu); SetupStore("narrowChannelMenu", config.narrowChannelMenu); @@ -226,6 +227,7 @@ void cNopacitySetupMenuDisplay::Set(void) { Add(new cMenuEditBoolItem(tr("Scale Video size to fit into menu window"), &tmpNopacityConfig->scalePicture)); Add(new cMenuEditBoolItem(tr("Rounded Corners for menu items and buttons"), &tmpNopacityConfig->roundedCorners)); Add(new cMenuEditIntItem(tr("Fade-In Time in ms (Zero for switching off fading)"), &tmpNopacityConfig->menuFadeTime, 0, 1000)); + Add(new cMenuEditBoolItem(tr("Use menu icons in main and setup menu"), &tmpNopacityConfig->useMenuIcons)); Add(new cMenuEditBoolItem(tr("Display Disk Usage in main menu"), &tmpNopacityConfig->showDiscUsage)); Add(new cMenuEditBoolItem(tr("Display Timers in main menu"), &tmpNopacityConfig->showTimers)); Add(new cMenuEditBoolItem(tr("Show Timer Conflicts in main menu"), &tmpNopacityConfig->checkTimerConflict)); |