diff options
author | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2021-07-10 14:42:41 +0200 |
---|---|---|
committer | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2021-07-12 14:00:56 +0200 |
commit | fdcad235c08d27bd114c660539b47f4b50ffcfc2 (patch) | |
tree | d6844434c2c630dee3ea8c0bb7e38ce96597d3bc | |
parent | e3678982b816da0e447aa16d378db497cfd0e211 (diff) | |
download | skin-nopacity-fdcad235c08d27bd114c660539b47f4b50ffcfc2.tar.gz skin-nopacity-fdcad235c08d27bd114c660539b47f4b50ffcfc2.tar.bz2 |
Add new icons
- add icon "recordingerror" to show recordings with TS errors
- add icon "uhd4k" to show 4k video resolution
-rw-r--r-- | displaychannelview.c | 4 | ||||
-rw-r--r-- | displayreplay.c | 5 | ||||
-rw-r--r-- | icons/darkred/skinIcons/uhd4k.png | bin | 0 -> 8629 bytes | |||
-rw-r--r-- | icons/darkred/skinIcons/uhd4k_rec.png | bin | 0 -> 8629 bytes | |||
-rw-r--r-- | icons/darkredNG/skinIcons/uhd4k.png | bin | 0 -> 8629 bytes | |||
-rw-r--r-- | icons/darkredNG/skinIcons/uhd4k_rec.png | bin | 0 -> 8629 bytes | |||
-rw-r--r-- | icons/default/skinIcons/uhd4k.png | bin | 0 -> 9074 bytes | |||
-rw-r--r-- | icons/default/skinIcons/uhd4k_rec.png | bin | 0 -> 9074 bytes | |||
-rw-r--r-- | icons/light/skinIcons/uhd4k.png | bin | 0 -> 9074 bytes | |||
-rw-r--r-- | icons/light/skinIcons/uhd4k_rec.png | bin | 0 -> 9074 bytes | |||
-rw-r--r-- | icons/skinIcons/recordingerror.png | bin | 0 -> 7829 bytes | |||
-rw-r--r-- | icons/skinIcons/uhd4k.png | bin | 0 -> 9074 bytes | |||
-rw-r--r-- | icons/skinIcons/uhd4k_rec.png | bin | 0 -> 9074 bytes | |||
-rw-r--r-- | menuitem.c | 44 | ||||
-rw-r--r-- | menuitem.h | 3 |
15 files changed, 30 insertions, 26 deletions
diff --git a/displaychannelview.c b/displaychannelview.c index 143f2e1..5096cdf 100644 --- a/displaychannelview.c +++ b/displaychannelview.c @@ -545,6 +545,10 @@ cString cNopacityDisplayChannelView::GetScreenResolutionIcon(void) { cDevice::PrimaryDevice()->GetVideoSize(screenWidth, screenHeight, aspect); cString iconName(""); switch (screenWidth) { + case 4320: // 7680 x 4320 = 8K UHD + case 2160: // 3840 x 2160 = 4K UHD + iconName = "skinIcons/uhd4k"; + break; case 1920: case 1440: iconName = "skinIcons/hd1080i"; diff --git a/displayreplay.c b/displayreplay.c index 3dd578c..0f583bd 100644 --- a/displayreplay.c +++ b/displayreplay.c @@ -273,8 +273,13 @@ void cNopacityDisplayReplay::DrawScreenResolution(void) { int screenHeight = 0; double aspect = 0; cDevice::PrimaryDevice()->GetVideoSize(screenWidth, screenHeight, aspect); +// esyslog ("skinnopacity: %s %s %d %ix%i\n", __FILE__, __func__, __LINE__, screenWidth, screenHeight); cString iconName(""); switch (screenWidth) { + case 4320: // 7680 x 4320 = 8K UHD + case 2160: // 3840 x 2160 = 4K UHD + iconName = "skinIcons/uhd4k"; + break; case 1920: case 1440: iconName = "skinIcons/hd1080i_rec"; diff --git a/icons/darkred/skinIcons/uhd4k.png b/icons/darkred/skinIcons/uhd4k.png Binary files differnew file mode 100644 index 0000000..5c37623 --- /dev/null +++ b/icons/darkred/skinIcons/uhd4k.png diff --git a/icons/darkred/skinIcons/uhd4k_rec.png b/icons/darkred/skinIcons/uhd4k_rec.png Binary files differnew file mode 100644 index 0000000..5c37623 --- /dev/null +++ b/icons/darkred/skinIcons/uhd4k_rec.png diff --git a/icons/darkredNG/skinIcons/uhd4k.png b/icons/darkredNG/skinIcons/uhd4k.png Binary files differnew file mode 100644 index 0000000..5c37623 --- /dev/null +++ b/icons/darkredNG/skinIcons/uhd4k.png diff --git a/icons/darkredNG/skinIcons/uhd4k_rec.png b/icons/darkredNG/skinIcons/uhd4k_rec.png Binary files differnew file mode 100644 index 0000000..5c37623 --- /dev/null +++ b/icons/darkredNG/skinIcons/uhd4k_rec.png diff --git a/icons/default/skinIcons/uhd4k.png b/icons/default/skinIcons/uhd4k.png Binary files differnew file mode 100644 index 0000000..540ff61 --- /dev/null +++ b/icons/default/skinIcons/uhd4k.png diff --git a/icons/default/skinIcons/uhd4k_rec.png b/icons/default/skinIcons/uhd4k_rec.png Binary files differnew file mode 100644 index 0000000..540ff61 --- /dev/null +++ b/icons/default/skinIcons/uhd4k_rec.png diff --git a/icons/light/skinIcons/uhd4k.png b/icons/light/skinIcons/uhd4k.png Binary files differnew file mode 100644 index 0000000..540ff61 --- /dev/null +++ b/icons/light/skinIcons/uhd4k.png diff --git a/icons/light/skinIcons/uhd4k_rec.png b/icons/light/skinIcons/uhd4k_rec.png Binary files differnew file mode 100644 index 0000000..540ff61 --- /dev/null +++ b/icons/light/skinIcons/uhd4k_rec.png diff --git a/icons/skinIcons/recordingerror.png b/icons/skinIcons/recordingerror.png Binary files differnew file mode 100644 index 0000000..aa85ab2 --- /dev/null +++ b/icons/skinIcons/recordingerror.png diff --git a/icons/skinIcons/uhd4k.png b/icons/skinIcons/uhd4k.png Binary files differnew file mode 100644 index 0000000..540ff61 --- /dev/null +++ b/icons/skinIcons/uhd4k.png diff --git a/icons/skinIcons/uhd4k_rec.png b/icons/skinIcons/uhd4k_rec.png Binary files differnew file mode 100644 index 0000000..540ff61 --- /dev/null +++ b/icons/skinIcons/uhd4k_rec.png @@ -1334,27 +1334,28 @@ void cNopacityRecordingMenuItem::SetTextShortRecording(void) { pixmapTextScroller->DrawText(cPoint(textLeft, heightRecName), strRecName.c_str(), clrFont, clrTransparent, font); } +void cNopacityRecordingMenuItem::DrawRecordingIcons(void) { + int iconSize = height / 3; + int iconX = pixmapStatic->ViewPort().Width(); + int iconY = height / 2; + + cImage *imgIconNew = imgCache->GetSkinIcon("skinIcons/newrecording", iconSize, iconSize); + if (imgIconNew && Recording->IsNew()) { + iconX -= iconSize; + pixmapStatic->DrawImage(cPoint(iconX, iconY), *imgIconNew); + } -void cNopacityRecordingMenuItem::DrawRecordingNewIcon(void) { - int iconNewSize = height/3; - - cImage *imgIcon = imgCache->GetSkinIcon("skinIcons/newrecording", iconNewSize, iconNewSize); - if (imgIcon) { - int iconX = pixmapStatic->ViewPort().Width() - iconNewSize; - int iconY = height/2; - pixmapStatic->DrawImage(cPoint(iconX, iconY), *imgIcon); + cImage *imgIconCut = imgCache->GetSkinIcon("skinIcons/recordingcutted", iconSize, iconSize); + if (imgIconCut && Recording->IsEdited()) { + iconX -= iconSize; + pixmapStatic->DrawImage(cPoint(iconX, iconY), *imgIconCut); } -} -void cNopacityRecordingMenuItem::DrawRecordingEditedIcon(void) { - int iconCutSize = height/3; - cImage *imgIcon = imgCache->GetSkinIcon("skinIcons/recordingcutted", iconCutSize, iconCutSize); - if (imgIcon) { - int iconX = pixmapStatic->ViewPort().Width() - iconCutSize; - if (Recording->IsNew()) - iconX -= iconCutSize; - int iconY = height/2; - pixmapStatic->DrawImage(cPoint(iconX, iconY), *imgIcon); + cImage *imgIconErr = imgCache->GetSkinIcon("skinIcons/recordingerror", iconSize, iconSize); + const cRecordingInfo *Info = Recording->Info(); + if (imgIconErr && Info && (Info->Errors() > 0)) { + iconX -= iconSize; + pixmapStatic->DrawImage(cPoint(iconX, iconY), *imgIconErr); } } @@ -1431,12 +1432,7 @@ void cNopacityRecordingMenuItem::Render(bool initial, bool fadeout) { } else { DrawPoster(); DrawRecDateTime(); - if (Recording->IsNew()) { - DrawRecordingNewIcon(); - } - if (Recording->IsEdited()) { - DrawRecordingEditedIcon(); - } + DrawRecordingIcons(); SetTextShort(); } if (current && scrollable && !Running() && config.GetValue("menuScrollSpeed")) { @@ -177,8 +177,7 @@ private: void SetTextFullRecording(void); void SetTextShortRecording(void); void DrawBackground(void); - void DrawRecordingNewIcon(void); - void DrawRecordingEditedIcon(void); + void DrawRecordingIcons(void); void DrawFolderIcon(void); void DrawRecDateTime(void); void DrawFolderNewSeen(void); |