From 433889d1205dadace7246ca4f0fac5dc978bf0ea Mon Sep 17 00:00:00 2001 From: satbaby Date: Thu, 18 Feb 2010 11:38:15 +0000 Subject: [PATCH] -fiix for scalable mute icon git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@369 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/neutrino.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 3f1ee08df..63ee9ea13 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -3645,8 +3645,13 @@ void CNeutrinoApp::saveEpg() void CNeutrinoApp::AudioMute( int newValue, bool isEvent ) { //printf("MUTE: val %d current %d event %d\n", newValue, current_muted, isEvent); - int dx = 40; - int dy = 40; + int dx = 0; + int dy = 0; + frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_MUTE,&dx,&dy); + int offset = (dx/4); + dx += offset; + dy += offset; + int x = g_settings.screen_EndX-dx; int y = g_settings.screen_StartY; @@ -3661,7 +3666,7 @@ printf("AudioMute: current %d new %d isEvent: %d\n", current_muted, newValue, is { if( current_muted ) { frameBuffer->paintBoxRel(x, y, dx, dy, COL_INFOBAR_PLUS_0); - frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_MUTE, x+5, y+5); + frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_MUTE, x+(offset/2), y+(offset/2)); } else frameBuffer->paintBackgroundBoxRel(x, y, dx, dy);