mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
CVolumeBar: add enums for volume bar pos
Origin commit data
------------------
Branch: ni/coolstream
Commit: 2a63a85584
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2013-06-26 (Wed, 26 Jun 2013)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -335,13 +335,13 @@ const CMenuOptionChooser::keyval INFOBAR_SUBCHAN_DISP_POS_OPTIONS[INFOBAR_SUBCH
|
|||||||
#define VOLUMEBAR_DISP_POS_OPTIONS_COUNT 7
|
#define VOLUMEBAR_DISP_POS_OPTIONS_COUNT 7
|
||||||
const CMenuOptionChooser::keyval VOLUMEBAR_DISP_POS_OPTIONS[VOLUMEBAR_DISP_POS_OPTIONS_COUNT]=
|
const CMenuOptionChooser::keyval VOLUMEBAR_DISP_POS_OPTIONS[VOLUMEBAR_DISP_POS_OPTIONS_COUNT]=
|
||||||
{
|
{
|
||||||
{ 0 , LOCALE_SETTINGS_POS_TOP_RIGHT },
|
{ CVolumeBar::VOLUMEBAR_POS_TOP_RIGHT , LOCALE_SETTINGS_POS_TOP_RIGHT },
|
||||||
{ 1 , LOCALE_SETTINGS_POS_TOP_LEFT },
|
{ CVolumeBar::VOLUMEBAR_POS_TOP_LEFT , LOCALE_SETTINGS_POS_TOP_LEFT },
|
||||||
{ 2 , LOCALE_SETTINGS_POS_BOTTOM_LEFT },
|
{ CVolumeBar::VOLUMEBAR_POS_BOTTOM_LEFT , LOCALE_SETTINGS_POS_BOTTOM_LEFT },
|
||||||
{ 3 , LOCALE_SETTINGS_POS_BOTTOM_RIGHT },
|
{ CVolumeBar::VOLUMEBAR_POS_BOTTOM_RIGHT , LOCALE_SETTINGS_POS_BOTTOM_RIGHT },
|
||||||
{ 4 , LOCALE_SETTINGS_POS_TOP_CENTER },
|
{ CVolumeBar::VOLUMEBAR_POS_TOP_CENTER , LOCALE_SETTINGS_POS_TOP_CENTER },
|
||||||
{ 5 , LOCALE_SETTINGS_POS_BOTTOM_CENTER },
|
{ CVolumeBar::VOLUMEBAR_POS_BOTTOM_CENTER, LOCALE_SETTINGS_POS_BOTTOM_CENTER },
|
||||||
{ 6 , LOCALE_SETTINGS_POS_HIGHER_CENTER }
|
{ CVolumeBar::VOLUMEBAR_POS_HIGHER_CENTER, LOCALE_SETTINGS_POS_HIGHER_CENTER }
|
||||||
};
|
};
|
||||||
|
|
||||||
#define MENU_DISP_POS_OPTIONS_COUNT 5
|
#define MENU_DISP_POS_OPTIONS_COUNT 5
|
||||||
|
@@ -121,7 +121,7 @@ void CVolumeBar::initVolumeBarPosition()
|
|||||||
|
|
||||||
switch (g_settings.volume_pos)
|
switch (g_settings.volume_pos)
|
||||||
{
|
{
|
||||||
case 0:{// upper right
|
case VOLUMEBAR_POS_TOP_RIGHT:{
|
||||||
int x_corr = 0;
|
int x_corr = 0;
|
||||||
if (( neutrino->getMode() != CNeutrinoApp::mode_scart ) && ( neutrino->getMode() != CNeutrinoApp::mode_audio) && ( neutrino->getMode() != CNeutrinoApp::mode_pic)) {
|
if (( neutrino->getMode() != CNeutrinoApp::mode_scart ) && ( neutrino->getMode() != CNeutrinoApp::mode_audio) && ( neutrino->getMode() != CNeutrinoApp::mode_pic)) {
|
||||||
if ((neutrino->isMuted()) && (!g_settings.mode_clock))
|
if ((neutrino->isMuted()) && (!g_settings.mode_clock))
|
||||||
@@ -132,23 +132,23 @@ void CVolumeBar::initVolumeBarPosition()
|
|||||||
x = sw - width - x_corr;
|
x = sw - width - x_corr;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 1:// upper left
|
case VOLUMEBAR_POS_TOP_LEFT:
|
||||||
break;
|
break;
|
||||||
case 2:// bottom left
|
case VOLUMEBAR_POS_BOTTOM_LEFT:
|
||||||
y = (sh + frameBuffer->getScreenY()) - height - v_spacer;
|
y = (sh + frameBuffer->getScreenY()) - height - v_spacer;
|
||||||
break;
|
break;
|
||||||
case 3:// bottom right
|
case VOLUMEBAR_POS_BOTTOM_RIGHT:
|
||||||
x = sw - width;
|
x = sw - width;
|
||||||
y = (sh + frameBuffer->getScreenY()) - height - v_spacer;
|
y = (sh + frameBuffer->getScreenY()) - height - v_spacer;
|
||||||
break;
|
break;
|
||||||
case 4:// upper center
|
case VOLUMEBAR_POS_TOP_CENTER:
|
||||||
x = ((sw - width) / 2) + x - h_spacer/2;
|
x = ((sw - width) / 2) + x - h_spacer/2;
|
||||||
break;
|
break;
|
||||||
case 5:// bottom center
|
case VOLUMEBAR_POS_BOTTOM_CENTER:
|
||||||
x = ((sw - width) / 2) + x - h_spacer/2;
|
x = ((sw - width) / 2) + x - h_spacer/2;
|
||||||
y = (sh + frameBuffer->getScreenY()) - height - v_spacer;
|
y = (sh + frameBuffer->getScreenY()) - height - v_spacer;
|
||||||
break;
|
break;
|
||||||
case 6:// higher center
|
case VOLUMEBAR_POS_HIGHER_CENTER:
|
||||||
x = ((sw - width) / 2) + x - h_spacer/2;
|
x = ((sw - width) / 2) + x - h_spacer/2;
|
||||||
y = (sh + frameBuffer->getScreenY()) - sh/10;
|
y = (sh + frameBuffer->getScreenY()) - sh/10;
|
||||||
break;
|
break;
|
||||||
|
@@ -80,6 +80,17 @@ class CVolumeBar : public CComponentsForm
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
VOLUMEBAR_POS_TOP_RIGHT = 0,
|
||||||
|
VOLUMEBAR_POS_TOP_LEFT = 1,
|
||||||
|
VOLUMEBAR_POS_BOTTOM_LEFT = 2,
|
||||||
|
VOLUMEBAR_POS_BOTTOM_RIGHT = 3,
|
||||||
|
VOLUMEBAR_POS_TOP_CENTER = 4,
|
||||||
|
VOLUMEBAR_POS_BOTTOM_CENTER = 5,
|
||||||
|
VOLUMEBAR_POS_HIGHER_CENTER = 6
|
||||||
|
};
|
||||||
|
|
||||||
CVolumeBar(/*int current_volume*/);
|
CVolumeBar(/*int current_volume*/);
|
||||||
// ~CVolumeBar(); inherited from CComponentsForm
|
// ~CVolumeBar(); inherited from CComponentsForm
|
||||||
|
|
||||||
|
@@ -398,7 +398,7 @@ int CNeutrinoApp::loadSetup(const char * fname)
|
|||||||
g_settings.infobar_progressbar = configfile.getInt32("infobar_progressbar" , 1 ); // below channel name
|
g_settings.infobar_progressbar = configfile.getInt32("infobar_progressbar" , 1 ); // below channel name
|
||||||
g_settings.casystem_display = configfile.getInt32("casystem_display", 1 );//discreet ca mode default
|
g_settings.casystem_display = configfile.getInt32("casystem_display", 1 );//discreet ca mode default
|
||||||
g_settings.scrambled_message = configfile.getBool("scrambled_message", true );
|
g_settings.scrambled_message = configfile.getBool("scrambled_message", true );
|
||||||
g_settings.volume_pos = configfile.getInt32("volume_pos", 0 );
|
g_settings.volume_pos = configfile.getInt32("volume_pos", CVolumeBar::VOLUMEBAR_POS_TOP_RIGHT );
|
||||||
g_settings.volume_digits = configfile.getBool("volume_digits", true);
|
g_settings.volume_digits = configfile.getBool("volume_digits", true);
|
||||||
g_settings.menu_pos = configfile.getInt32("menu_pos", CMenuWidget::MENU_POS_CENTER);
|
g_settings.menu_pos = configfile.getInt32("menu_pos", CMenuWidget::MENU_POS_CENTER);
|
||||||
g_settings.show_menu_hints = configfile.getBool("show_menu_hints", true);
|
g_settings.show_menu_hints = configfile.getBool("show_menu_hints", true);
|
||||||
|
Reference in New Issue
Block a user