summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2013-09-17 11:52:28 +0200
committerlouis <louis.braun@gmx.de>2013-09-17 11:52:28 +0200
commit82aa79801b08be8e1f22ba1c4a6778867322e246 (patch)
treeebe9f4b08011de544f1a39a3148b375b423853ed
parent9addede68ea4b8794f894a9cc7ffa36d5873eddf (diff)
downloadskin-nopacity-82aa79801b08be8e1f22ba1c4a6778867322e246.tar.gz
skin-nopacity-82aa79801b08be8e1f22ba1c4a6778867322e246.tar.bz2
changed narrow recordings menu style
-rw-r--r--HISTORY1
-rw-r--r--icons/skinIcons/recfolder.pngbin0 -> 16364 bytes
-rw-r--r--menuitem.c67
-rw-r--r--menuitem.h4
-rw-r--r--po/de_DE.po6
5 files changed, 33 insertions, 45 deletions
diff --git a/HISTORY b/HISTORY
index 7ba74ca..8a36c81 100644
--- a/HISTORY
+++ b/HISTORY
@@ -282,3 +282,4 @@ Version 0.1.4
folder. For series it is also possible to place a common poster for all
series in a folder two or three directories above the actual recording
folders. If a manual poster is found, all tvscraper information is ignored.
+- changed narrow recordings menu style
diff --git a/icons/skinIcons/recfolder.png b/icons/skinIcons/recfolder.png
new file mode 100644
index 0000000..90ab8de
--- /dev/null
+++ b/icons/skinIcons/recfolder.png
Binary files differ
diff --git a/menuitem.c b/menuitem.c
index 81990d2..23dc467 100644
--- a/menuitem.c
+++ b/menuitem.c
@@ -985,13 +985,8 @@ void cNopacityRecordingMenuItem::CreatePixmapTextScroller(int totalWidth) {
int pixmapLeft = 0;
int pixmapWidth = 0;
int drawPortWidth = totalWidth + 10;
- if (isFolder) {
- pixmapLeft = left + 10 + config.menuRecFolderSize;
- pixmapWidth = width - 10 - config.menuRecFolderSize;
- } else {
- pixmapLeft = posterWidth + left + 20;
- pixmapWidth = width - posterWidth - 20;
- }
+ pixmapLeft = posterWidth + left + 20;
+ pixmapWidth = width - posterWidth - 20;
pixmapTextScroller = osd->CreatePixmap(4, cRect(pixmapLeft, top + index * (height + spaceMenu), pixmapWidth, height), cRect(0, 0, drawPortWidth, height));
pixmapTextScroller->Fill(clrTransparent);
}
@@ -1052,10 +1047,6 @@ int cNopacityRecordingMenuItem::CheckScrollable(bool hasIcon) {
int cNopacityRecordingMenuItem::CheckScrollableRecording(void) {
int spaceLeft = spaceMenu + posterWidth + 15;
int iconWidth = 0;
- if (Recording->IsNew())
- iconWidth += font->Height() + 10;
- if (Recording->IsEdited())
- iconWidth += font->Height() + 5;
int totalTextWidth = width - spaceLeft;
strRecNameFull = strRecName.c_str();
if (font->Width(strRecName.c_str()) + iconWidth > (width - spaceLeft)) {
@@ -1067,7 +1058,7 @@ int cNopacityRecordingMenuItem::CheckScrollableRecording(void) {
}
int cNopacityRecordingMenuItem::CheckScrollableFolder(void) {
- int spaceLeft = spaceMenu + config.menuRecFolderSize;
+ int spaceLeft = spaceMenu + posterWidth + 15;
int totalTextWidth = width - spaceLeft;
strRecNameFull = strRecName.c_str();
if (font->Width(strRecName.c_str()) > (width - spaceLeft)) {
@@ -1107,19 +1098,13 @@ void cNopacityRecordingMenuItem::SetTextFullFolder(void) {
else
DrawFolderIcon();
int heightRecName = (2*height/3 - font->Height())/2 + 10;
- pixmapTextScroller->DrawText(cPoint(0, heightRecName), strRecNameFull.c_str(), clrFont, clrTransparent, font);
+ pixmapTextScroller->DrawText(cPoint(5, heightRecName), strRecNameFull.c_str(), clrFont, clrTransparent, font);
}
void cNopacityRecordingMenuItem::SetTextFullRecording(void) {
tColor clrFont = (current)?Theme.Color(clrMenuFontMenuItemHigh):Theme.Color(clrMenuFontMenuItem);
pixmapTextScroller->Fill(clrTransparent);
int textLeft = 5;
- if (Recording->IsNew()) {
- textLeft += DrawRecordingNewIcon();
- }
- if (Recording->IsEdited()) {
- textLeft += DrawRecordingEditedIcon(textLeft);
- }
int heightRecName = (height / 2 - font->Height())/2;
pixmapTextScroller->DrawText(cPoint(textLeft, heightRecName), strRecNameFull.c_str(), clrFont, clrTransparent, font);
}
@@ -1140,48 +1125,44 @@ void cNopacityRecordingMenuItem::SetTextShortFolder(void) {
else
DrawFolderIcon();
int heightRecName = (2*height/3 - font->Height())/2 + 10;
- pixmapTextScroller->DrawText(cPoint(0, heightRecName), strRecName.c_str(), clrFont, clrTransparent, font);
+ pixmapTextScroller->DrawText(cPoint(5, heightRecName), strRecName.c_str(), clrFont, clrTransparent, font);
}
void cNopacityRecordingMenuItem::SetTextShortRecording(void) {
tColor clrFont = (current)?Theme.Color(clrMenuFontMenuItemHigh):Theme.Color(clrMenuFontMenuItem);
pixmapTextScroller->Fill(clrTransparent);
int textLeft = 5;
- if (Recording->IsNew()) {
- textLeft += DrawRecordingNewIcon();
- }
- if (Recording->IsEdited()) {
- textLeft += DrawRecordingEditedIcon(textLeft);
- }
int heightRecName = (height / 2 - font->Height())/2;
pixmapTextScroller->DrawText(cPoint(textLeft, heightRecName), strRecName.c_str(), clrFont, clrTransparent, font);
}
-int cNopacityRecordingMenuItem::DrawRecordingNewIcon(void) {
- int iconNewSize = font->Height();
+void cNopacityRecordingMenuItem::DrawRecordingNewIcon(void) {
+ int iconNewSize = height/3;
cImageLoader imgLoader;
if (imgLoader.LoadIcon("skinIcons/newrecording", iconNewSize)) {
- int iconHeight = (height/2 - iconNewSize)/2;
- pixmapTextScroller->DrawImage(cPoint(1, iconHeight), imgLoader.GetImage());
+ int iconX = pixmapIcon->ViewPort().Width() - iconNewSize;
+ int iconY = height/2;
+ pixmapIcon->DrawImage(cPoint(iconX, iconY), imgLoader.GetImage());
}
- return iconNewSize;
}
-int cNopacityRecordingMenuItem::DrawRecordingEditedIcon(int startLeft) {
- int iconEditedSize = font->Height() - 10;
+void cNopacityRecordingMenuItem::DrawRecordingEditedIcon(void) {
+ int iconCutSize = height/3;
cImageLoader imgLoader;
- if (imgLoader.LoadIcon("skinIcons/recordingcutted", iconEditedSize)) {
- int iconHeight = (height/2 - iconEditedSize)/2;
- pixmapTextScroller->DrawImage(cPoint(startLeft + 5, iconHeight), imgLoader.GetImage());
+ if (imgLoader.LoadIcon("skinIcons/recordingcutted", iconCutSize)) {
+ int iconX = pixmapIcon->ViewPort().Width() - iconCutSize;
+ if (Recording->IsNew())
+ iconX -= iconCutSize;
+ int iconY = height/2;
+ pixmapIcon->DrawImage(cPoint(iconX, iconY), imgLoader.GetImage());
}
- return iconEditedSize + 5;
}
void cNopacityRecordingMenuItem::DrawFolderIcon(void) {
cImageLoader imgLoader;
- if (imgLoader.LoadIcon("skinIcons/recordingfolder", config.menuRecFolderSize)) {
- pixmapIcon->DrawImage(cPoint(1, 1), imgLoader.GetImage());
+ if (imgLoader.LoadIcon("skinIcons/recfolder", posterWidth, posterHeight)) {
+ pixmapIcon->DrawImage(cPoint(10, 1), imgLoader.GetImage());
}
}
@@ -1218,7 +1199,7 @@ void cNopacityRecordingMenuItem::DrawFolderNewSeen(void) {
int textHeight = 2*height/3 + (height/3 - fontSmall->Height())/2 - 10;
cString strTotalNew = cString::sprintf("%d %s (%d %s)", Total, (Total > 1)?tr("recordings"):tr("recording"), New, tr("new"));
tColor clrFont = (current)?Theme.Color(clrMenuFontMenuItemHigh):Theme.Color(clrMenuFontMenuItem);
- pixmapIcon->DrawText(cPoint(config.menuRecFolderSize + 10, textHeight), *strTotalNew, clrFont, clrTransparent, fontSmall);
+ pixmapIcon->DrawText(cPoint(posterWidth + 30, textHeight), *strTotalNew, clrFont, clrTransparent, fontSmall);
}
void cNopacityRecordingMenuItem::DrawPoster(void) {
@@ -1247,6 +1228,12 @@ void cNopacityRecordingMenuItem::Render() {
} else {
DrawPoster();
DrawRecDateTime();
+ if (Recording->IsNew()) {
+ DrawRecordingNewIcon();
+ }
+ if (Recording->IsEdited()) {
+ DrawRecordingEditedIcon();
+ }
SetTextShort();
}
if (current && scrollable && !Running() && config.menuScrollSpeed) {
diff --git a/menuitem.h b/menuitem.h
index a7e62dc..79711f6 100644
--- a/menuitem.h
+++ b/menuitem.h
@@ -173,8 +173,8 @@ private:
void SetTextFullRecording(void);
void SetTextShortRecording(void);
void DrawBackground(void);
- int DrawRecordingNewIcon(void);
- int DrawRecordingEditedIcon(int startLeft);
+ void DrawRecordingNewIcon(void);
+ void DrawRecordingEditedIcon(void);
void DrawFolderIcon(void);
void DrawRecDateTime(void);
void DrawFolderNewSeen(void);
diff --git a/po/de_DE.po b/po/de_DE.po
index 24dcd99..082aff5 100644
--- a/po/de_DE.po
+++ b/po/de_DE.po
@@ -60,7 +60,7 @@ msgid "Duration"
msgstr "Dauer"
msgid "recording"
-msgstr "Aufnahme"
+msgstr "Rec"
msgid "recordings"
msgstr "Aufnahmen"
@@ -387,10 +387,10 @@ msgid "Folder Icon Size"
msgstr "Order Icon Größe"
msgid "Width of manually set recording poster"
-msgstr ""
+msgstr "Breite der manuell gesetzen Poster"
msgid "Height of manually set recording poster"
-msgstr ""
+msgstr "Höhe der manuell gesetzten Poster"
msgid "simple, one common image"
msgstr "einfach, eine gemeinsame Graphik"