mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-01 01:41:12 +02:00
- Fixes display problems when setting 'mute icon volume at 0'
- Fixes problems with neutrino getMode() switching
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@2160 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Branch: ni/coolstream
Commit: 01a520ab17
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2012-03-24 (Sat, 24 Mar 2012)
Origin message was:
------------------
* Problems with display volume control (patch by snafed)
- Fixes display problems when setting 'mute icon volume at 0'
- Fixes problems with neutrino getMode() switching
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@2160 e54a6e83-5905-42d5-8d5c-058d10e6a962
------------------
This commit was generated by Migit
67 lines
1.9 KiB
C++
67 lines
1.9 KiB
C++
/*
|
|
volume bar - Neutrino-GUI
|
|
|
|
Copyright (C) 2001 Steffen Hehn 'McClean'
|
|
and some other guys
|
|
Homepage: http://dbox.cyberphoria.org/
|
|
|
|
Copyright (C) 2011-2012 M. Liebmann (micha-bbg)
|
|
|
|
License: GPL
|
|
|
|
This library is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU Library General Public
|
|
License as published by the Free Software Foundation; either
|
|
version 2 of the License, or (at your option) any later version.
|
|
|
|
This library is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Library General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Library General Public
|
|
License along with this library; if not, write to the
|
|
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
Boston, MA 02110-1301, USA.
|
|
*/
|
|
|
|
#ifndef __CVOLUME__
|
|
#define __CVOLUME__
|
|
|
|
#define ROUNDED g_settings.rounded_corners ? vbar_h/2 : 0
|
|
|
|
class CVolume
|
|
{
|
|
private:
|
|
void refreshVolumebar(int current_volume);
|
|
|
|
int x, y, sy, sw, sh;
|
|
int mute_ax, mute_ay, mute_dy, mute_ay_old;
|
|
int mute_icon_dx, mute_icon_dy;
|
|
int icon_w, icon_h, icon_x, icon_y;
|
|
int vbar_w, vbar_h;
|
|
int progress_w, progress_h, progress_x, progress_y, pB;
|
|
int digit_w, digit_h, digit_offset, digit_x, digit_y, digit_b_x, digit_b_w;
|
|
int VolumeFont, colShadow, colBar, colFrame, colContent;
|
|
int ShadowOffset;
|
|
int rounded;
|
|
int m_mode;
|
|
bool paintShadow, paintDigits, MuteIconFrame;
|
|
|
|
public:
|
|
CVolume();
|
|
~CVolume();
|
|
static CVolume* getInstance();
|
|
|
|
int spacer, mute_dx;
|
|
void Init();
|
|
void AudioMute(int newValue, bool isEvent= false);
|
|
void setvol(int vol);
|
|
void setVolume(const neutrino_msg_t key, const bool bDoPaint = true, bool nowait = false);
|
|
int getStartPosTop(){ return sy; }
|
|
int getEndPosRight(){ return sw; }
|
|
};
|
|
|
|
|
|
#endif // __CVOLUME__
|