From 1cffcfd8fc61eb80f275a5aaa07f7693fb15704f Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Fri, 19 Feb 2010 20:15:34 +0000 Subject: [PATCH] scalable volumebar git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@386 e54a6e83-5905-42d5-8d5c-058d10e6a962 Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/96e54f4862db85c5b5411d643259fd324eb621e1 Author: Jacek Jendrzej Date: 2010-02-19 (Fri, 19 Feb 2010) --- data/icons/volume.png | Bin 267 -> 136 bytes data/locale/deutsch.locale | 2 ++ src/neutrino.cpp | 28 ++++++++++++++++++---------- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/data/icons/volume.png b/data/icons/volume.png index 530bdef951a22d0301cbf859c0e03e050017b0ff..c0340666594003a886b34b481b3745bc4bed1aa9 100644 GIT binary patch literal 136 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!D3?x-;bCrM;TYyi9E0F&G|NqjP^X~##j3q&S z!3+-1ZlnP@2A(dCAr*19U5b1R3Id0{zI{B+T0F^r(L@fGGZW5ik!4xCIEBw|WB1qe fnoFK9r3)F?7YTlzDlKvhsF%Uh)z4*}Q$iB}NXsed literal 267 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K5R5+M{WZ*NA13-!=z$e5NNS`=y;{X5u1_lPc zVw0```HUq&e!&b5&u*jvIcqϒJN-dxzo%fP_VU?BYe|ILXvC4VvUOj^@qCV#Ci z<8$KM_O0@~KfcIYmrY_ure!uAtey`PnoMh0yO244WBjm?fAWut_{*a$)|Wc;k8kzmxxp#RVZN z`WOBbP0l+XkKVAErf diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index eac08a2a1..6c4a5b107 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -23,6 +23,8 @@ audiomenu.ost ost audiomenu.PCMOffset Lautstärkeabsenkung PCM audiomenu.pref_lang Bevorzugte Sprache audiomenu.pref_lang_head Bevorzugte Sprachen +audiomenu.pref_subs_head Bevorzugte Untertitelsprachen +audiomenu.pref_subs Bevorzugte Untertitelsprache audiomenu.spdif_dd DolbyDigital über S/PDIF audiomenu.stereo stereo audioplayer.add Hinzufügen diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 1208e5993..1a37ba865 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -2394,7 +2394,11 @@ int CNeutrinoApp::run(int argc, char **argv) g_EpgData = new CEpgData; g_InfoViewer = new CInfoViewer; g_EventList = new EventList; - g_volscale = new CProgressBar(true, 200, 15, 50, 100, 80, true); + + int dx = 0; + int dy = 0; + frameBuffer->getIconSize(NEUTRINO_ICON_VOLUME,&dx,&dy); + g_volscale = new CProgressBar(true, dy*12.5, dy, 50, 100, 80, true); g_CamHandler = new CCAMMenuHandler(); g_CamHandler->init(); @@ -3690,8 +3694,11 @@ void CNeutrinoApp::setVolume(const neutrino_msg_t key, const bool bDoPaint, bool { neutrino_msg_t msg = key; - int dx = 256; - int dy = 40; + int dx = 0;//256 + int dy = 0;//32 + frameBuffer->getIconSize(NEUTRINO_ICON_VOLUME,&dx,&dy); + dx *=16; + dy *=2; #if 0 // orig int x = (((g_settings.screen_EndX- g_settings.screen_StartX)- dx) / 2) + g_settings.screen_StartX; int y = g_settings.screen_EndY - 100; @@ -3703,17 +3710,15 @@ void CNeutrinoApp::setVolume(const neutrino_msg_t key, const bool bDoPaint, bool int vol = g_settings.current_volume; int sw = frameBuffer->getScreenWidth(); int sh = frameBuffer->getScreenHeight(); - int borderX = x ; + switch( g_settings.volume_pos ) { case 0:// upper right x = sw - dx; break; case 1:// upper left - x = borderX; break; case 2:// bottom left - x = borderX; y = sh - dy; break; case 3:// bottom right @@ -3743,10 +3748,13 @@ void CNeutrinoApp::setVolume(const neutrino_msg_t key, const bool bDoPaint, bool g_volscale = new CProgressBar(g_settings.progressbar_color, 200, 15, 50, 100, 80, true); } #endif - frameBuffer->paintIcon(NEUTRINO_ICON_VOLUME,x,y, 0, COL_INFOBAR); - frameBuffer->paintBoxRel (x + 40, y+12, 200, 15, COL_INFOBAR_PLUS_0); + frameBuffer->paintBoxRel(x , y , dx, dy, COL_INFOBAR_SHADOW_PLUS_1, dy/2); + frameBuffer->paintBoxRel (x + dy + (dy/4)-2, y+(dy/4)-2, ((dy/2)*12.5) +4, dy/2+4, COL_INFOBAR_PLUS_3); + frameBuffer->paintBoxRel (x + dy + (dy/4), y+(dy/4), (dy/2)*12.5, dy/2, COL_INFOBAR_PLUS_0); + frameBuffer->paintIcon(NEUTRINO_ICON_VOLUME,x+dy/2,y+(dy/4), 0, COL_INFOBAR); + g_volscale->reset(); - g_volscale->paintProgressBar2(x + 41, y + 12, g_settings.current_volume); + g_volscale->paintProgressBar2(x + dy+ (dy/4), y +(dy/4), g_settings.current_volume); } neutrino_msg_data_t data; @@ -3788,7 +3796,7 @@ void CNeutrinoApp::setVolume(const neutrino_msg_t key, const bool bDoPaint, bool if (bDoPaint) { if(vol != g_settings.current_volume) { vol = g_settings.current_volume; - g_volscale->paintProgressBar2(x + 41, y + 12, g_settings.current_volume); + g_volscale->paintProgressBar2(x + dy+ (dy/4), y +(dy/4), g_settings.current_volume); } }