summaryrefslogtreecommitdiff
path: root/displaychannelview.c
diff options
context:
space:
mode:
authorkamel5 <vdr.kamel5 (at) gmx (dot) net>2021-12-20 12:09:44 +0100
committerkamel5 <vdr.kamel5 (at) gmx (dot) net>2022-01-12 14:09:05 +0100
commit5965aff32d9b5a031aa3778e2ff010e9258cc344 (patch)
tree282b376a904ad077224e26bf4d44df0c4f3ae326 /displaychannelview.c
parent05fad81bd159645b6be0de5c61d578de0d1eae37 (diff)
downloadskin-nopacity-5965aff32d9b5a031aa3778e2ff010e9258cc344.tar.gz
skin-nopacity-5965aff32d9b5a031aa3778e2ff010e9258cc344.tar.bz2
Rework GetScreenResolutionIcon()
Diffstat (limited to 'displaychannelview.c')
-rw-r--r--displaychannelview.c35
1 files changed, 3 insertions, 32 deletions
diff --git a/displaychannelview.c b/displaychannelview.c
index 6f7ce3c..aa3f13a 100644
--- a/displaychannelview.c
+++ b/displaychannelview.c
@@ -531,44 +531,15 @@ void cNopacityDisplayChannelView::DrawScreenResolution(void) {
} else {
resolutionIcon = GetScreenResolutionIcon();
}
+ if (strcasecmp(resolutionIcon, "") == 0)
+ return;
int iconX = 5 * (statusIconBorder + statusIconSize);
- cImage *imgRes = imgCache->GetSkinIcon(*resolutionIcon, 3*statusIconSize, statusIconSize);
+ cImage *imgRes = imgCache->GetSkinIcon(*resolutionIcon, 3 * statusIconSize, statusIconSize);
if (imgRes)
pixmapStatusIcons->DrawImage(cPoint(iconX,statusIconBorder), *imgRes);
}
-cString cNopacityDisplayChannelView::GetScreenResolutionIcon(void) {
- int screenWidth = 0;
- int screenHeight = 0;
- double aspect = 0;
- cDevice::PrimaryDevice()->GetVideoSize(screenWidth, screenHeight, aspect);
- cString iconName("");
- switch (screenWidth) {
- case 7680: // 7680 x 4320 = 8K UHD
- case 3840: // 3840 x 2160 = 4K UHD
- iconName = "skinIcons/uhd4k";
- break;
- case 1920:
- case 1440:
- iconName = "skinIcons/hd1080i";
- break;
- case 1280:
- if (screenHeight == 720)
- iconName = "skinIcons/hd720p";
- else
- iconName = "skinIcons/hd1080i";
- break;
- case 720:
- iconName = "skinIcons/sd576i";
- break;
- default:
- iconName = "skinIcons/sd576i";
- break;
- }
- return iconName;
-}
-
void cNopacityDisplayChannelView::ClearStatusIcons(void) {
pixmapStatusIcons->Fill(clrTransparent);
pixmapStatusIconsBackground->Fill(clrTransparent);