summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkamel5 <vdr.kamel5 (at) gmx (dot) net>2021-01-30 17:43:58 +0100
committerkamel5 <vdr.kamel5 (at) gmx (dot) net>2021-03-11 14:53:41 +0100
commitc54f7ba74ff8f1a363142c68bf215ee42c965ac9 (patch)
treee3d6327d8aec59b331a4a82d9f89bfc0ea025dad
parent2816e3ab2b384abc7d24fbead0d4126d8818c2d1 (diff)
downloadskin-nopacity-c54f7ba74ff8f1a363142c68bf215ee42c965ac9.tar.gz
skin-nopacity-c54f7ba74ff8f1a363142c68bf215ee42c965ac9.tar.bz2
Elimintae cNopacityMenuItem::SetFont*
Fonts assigned in constructor of cNopacityMainMenuItem*. Therefore SetFont(), SetFontSmall(), SetFontEPGWindow() and SetFontEPGWindowLarge() can be deleted.
-rw-r--r--displaymenu.c17
-rw-r--r--displaytracks.c1
-rw-r--r--menuitem.c18
-rw-r--r--menuitem.h12
4 files changed, 22 insertions, 26 deletions
diff --git a/displaymenu.c b/displaymenu.c
index 86045f6..6207a9e 100644
--- a/displaymenu.c
+++ b/displaymenu.c
@@ -367,10 +367,6 @@ bool cNopacityDisplayMenu::SetItemEvent(const cEvent *Event, int Index, bool Cur
cPoint itemSize;
menuItems[Index].reset(item);
menuView->GetMenuItemSize(MenuCategory(), &itemSize);
- item->SetFont(fontManager->menuItemSchedule);
- item->SetFontSmall(fontManager->menuItemScheduleSmall);
- item->SetFontEPGWindow(fontManager->menuEPGInfoWindow);
- item->SetFontEPGWindowLarge(fontManager->menuEPGInfoWindowLarge);
int spaceTop = menuView->GetMenuTop(currentNumItems, itemSize.Y());
item->SetGeometry(Index, spaceTop, menuView->GetMenuItemLeft(itemSize.X()), itemSize.X(), itemSize.Y(), geoManager->menuSpace);
item->SetTextWindow(menuView->GetDescriptionTextWindowSize(mcSchedule));
@@ -409,10 +405,6 @@ bool cNopacityDisplayMenu::SetItemTimer(const cTimer *Timer, int Index, bool Cur
cPoint itemSize;
menuItems[Index].reset(item);
menuView->GetMenuItemSize(MenuCategory(), &itemSize);
- item->SetFont(fontManager->menuItemTimers);
- item->SetFontSmall(fontManager->menuItemTimersSmall);
- item->SetFontEPGWindow(fontManager->menuEPGInfoWindow);
- item->SetFontEPGWindowLarge(fontManager->menuEPGInfoWindowLarge);
int spaceTop = menuView->GetMenuTop(currentNumItems, itemSize.Y());
item->SetGeometry(Index, spaceTop, menuView->GetMenuItemLeft(itemSize.X()), itemSize.X(), itemSize.Y(), geoManager->menuSpace);
item->SetTextWindow(menuView->GetDescriptionTextWindowSize(mcTimer));
@@ -451,9 +443,6 @@ bool cNopacityDisplayMenu::SetItemChannel(const cChannel *Channel, int Index, bo
cPoint itemSize;
menuItems[Index].reset(item);
menuView->GetMenuItemSize(MenuCategory(), &itemSize);
- item->SetFont(fontManager->menuItemChannel);
- item->SetFontSmall(fontManager->menuItemChannelSmall);
- item->SetFontEPGWindow(fontManager->menuEPGInfoWindow);
int spaceTop = menuView->GetMenuTop(currentNumItems, itemSize.Y());
item->SetGeometry(Index, spaceTop, menuView->GetMenuItemLeft(itemSize.X()), itemSize.X(), itemSize.Y(), geoManager->menuSpace);
item->SetTextWindow(menuView->GetDescriptionTextWindowSize(mcChannel));
@@ -496,10 +485,6 @@ bool cNopacityDisplayMenu::SetItemRecording(const cRecording *Recording, int Ind
cPoint itemSize;
menuItems[Index].reset(item);
menuView->GetMenuItemSize(MenuCategory(), &itemSize);
- item->SetFont(fontManager->menuItemRecordings);
- item->SetFontSmall(fontManager->menuItemRecordingsSmall);
- item->SetFontEPGWindow(fontManager->menuEPGInfoWindow);
- item->SetFontEPGWindowLarge(fontManager->menuEPGInfoWindowLarge);
int spaceTop = menuView->GetMenuTop(currentNumItems, itemSize.Y());
item->SetGeometry(Index, spaceTop, menuView->GetMenuItemLeft(itemSize.X()), itemSize.X(), itemSize.Y(), geoManager->menuSpace);
item->SetTextWindow(menuView->GetDescriptionTextWindowSize(mcRecording));
@@ -553,14 +538,12 @@ void cNopacityDisplayMenu::SetItem(const char *Text, int Index, bool Current, bo
item = new cNopacityMainMenuItem(osd, Text, Selectable, isSetup);
menuItems[Index].reset(item);
menuView->GetMenuItemSize(MenuCategory(), &itemSize);
- item->SetFont(fontManager->menuItemLarge);
if (config.GetValue("useMenuIcons"))
hasIcons = true;
} else {
item = new cNopacityDefaultMenuItem(osd, Text, Selectable);
menuItems[Index].reset(item);
menuView->GetMenuItemSize(mcUnknown, &itemSize);
- item->SetFont(fontManager->menuItemDefault);
}
int spaceTop = menuView->GetMenuTop(currentNumItems, itemSize.Y());
item->SetGeometry(Index, spaceTop, menuView->GetMenuItemLeft(itemSize.X()), itemSize.X(), itemSize.Y(), geoManager->menuSpace);
diff --git a/displaytracks.c b/displaytracks.c
index afc5def..9fd41eb 100644
--- a/displaytracks.c
+++ b/displaytracks.c
@@ -121,7 +121,6 @@ void cNopacityDisplayTracks::SetItem(const char *Text, int Index, bool Current)
menuItems.resize(Index+4);
menuItems[Index].reset(item);
item->SetCurrent(Current);
- item->SetFont(fontManager->trackText);
item->SetGeometry(Index, menuItemHeight+4, 2, menuItemWidth, menuItemHeight, 4);
item->CreatePixmapBackground();
item->CreatePixmapStatic();
diff --git a/menuitem.c b/menuitem.c
index dad98b4..6fc6295 100644
--- a/menuitem.c
+++ b/menuitem.c
@@ -227,6 +227,7 @@ void cNopacityMenuItem::DrawChannelLogoBackground(void) {
// cNopacityMainMenuItem -------------
cNopacityMainMenuItem::cNopacityMainMenuItem(cOsd *osd, const char *text, bool sel, bool setup) : cNopacityMenuItem (osd, text, sel) {
this->isSetup = setup;
+ font = fontManager->menuItemLarge;
}
cNopacityMainMenuItem::~cNopacityMainMenuItem(void) {
@@ -447,6 +448,10 @@ cNopacityScheduleMenuItem::cNopacityScheduleMenuItem(cOsd *osd, const cEvent *Ev
strSubTitleFull = "";
scrollTitle = false;
scrollSubTitle = false;
+ font = fontManager->menuItemSchedule;
+ fontSmall = fontManager->menuItemScheduleSmall;
+ fontEPGWindow = fontManager->menuEPGInfoWindow;
+ fontEPGWindowLarge = fontManager->menuEPGInfoWindowLarge;
}
cNopacityScheduleMenuItem::~cNopacityScheduleMenuItem(void) {
@@ -681,6 +686,9 @@ cNopacityChannelMenuItem::cNopacityChannelMenuItem(cOsd *osd, const cChannel *Ch
strEpgInfo = "";
strEpgInfoFull = "";
strTimeInfo = "";
+ font = fontManager->menuItemChannel;
+ fontSmall = fontManager->menuItemChannelSmall;
+ fontEPGWindow = fontManager->menuEPGInfoWindow;
}
cNopacityChannelMenuItem::~cNopacityChannelMenuItem(void) {
@@ -920,6 +928,10 @@ void cNopacityChannelMenuItem::Render() {
cNopacityTimerMenuItem::cNopacityTimerMenuItem(cOsd *osd, const cTimer *Timer, bool sel, cRect *vidWin) : cNopacityMenuItem (osd, "", sel) {
this->Timer = Timer;
this->vidWin = vidWin;
+ font = fontManager->menuItemTimers;
+ fontSmall = fontManager->menuItemTimersSmall;
+ fontEPGWindow = fontManager->menuEPGInfoWindow;
+ fontEPGWindowLarge = fontManager->menuEPGInfoWindowLarge;
}
cNopacityTimerMenuItem::~cNopacityTimerMenuItem(void) {
@@ -1126,6 +1138,10 @@ cNopacityRecordingMenuItem::cNopacityRecordingMenuItem(cOsd *osd, const cRecordi
manualPosterPath = "";
hasPoster = false;
hasThumb = false;
+ font = fontManager->menuItemRecordings;
+ fontSmall = fontManager->menuItemRecordingsSmall;
+ fontEPGWindow = fontManager->menuEPGInfoWindow;
+ fontEPGWindowLarge = fontManager->menuEPGInfoWindowLarge;
}
cNopacityRecordingMenuItem::~cNopacityRecordingMenuItem(void) {
@@ -1447,6 +1463,7 @@ void cNopacityRecordingMenuItem::Render() {
cNopacityDefaultMenuItem::cNopacityDefaultMenuItem(cOsd *osd, const char *text, bool sel) : cNopacityMenuItem (osd, text, sel) {
scrollCol = -1;
+ font = fontManager->menuItemDefault;
}
cNopacityDefaultMenuItem::~cNopacityDefaultMenuItem(void) {
@@ -1654,6 +1671,7 @@ void cNopacityDefaultMenuItem::Render() {
// cNopacityTrackMenuItem -------------
cNopacityTrackMenuItem::cNopacityTrackMenuItem(cOsd *osd, const char *text) : cNopacityMenuItem (osd, text, true) {
+ font = fontManager->trackText;
}
cNopacityTrackMenuItem::~cNopacityTrackMenuItem(void) {
diff --git a/menuitem.h b/menuitem.h
index 835f507..fc7ba0b 100644
--- a/menuitem.h
+++ b/menuitem.h
@@ -18,10 +18,10 @@ protected:
bool wasCurrent;
bool scrollable;
bool drawn;
- cFont *font;
- cFont *fontSmall;
- cFont *fontEPGWindow;
- cFont *fontEPGWindowLarge;
+ cFont *font = NULL;
+ cFont *fontSmall = NULL;
+ cFont *fontEPGWindow = NULL;
+ cFont *fontEPGWindowLarge = NULL;
int width, height;
int top, left;
int spaceMenu;
@@ -47,10 +47,6 @@ public:
void CreatePixmapStatic(void);
virtual void CreatePixmapTextScroller(int totalWidth);
void SetGeometry(int index, int top, int left, int width, int height, int spaceMenu);
- void SetFont(cFont *font) {this->font = font;}
- void SetFontSmall(cFont *fontSmall) {this->fontSmall = fontSmall;}
- void SetFontEPGWindow(cFont *font) {this->fontEPGWindow = font;}
- void SetFontEPGWindowLarge(cFont *font) {this->fontEPGWindowLarge = font;}
void SetCurrent(bool cur);
void SetAlpha(int alpha) {this->pixmapBackground->SetAlpha(alpha);}
void SetAlphaIcon(int alpha) {if (pixmapStatic) this->pixmapStatic->SetAlpha(alpha);}