mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 16:01:10 +02:00
Rework positioning of volumebar / mute icon / info clock
- Is required for custom icons
Origin commit data
------------------
Branch: ni/coolstream
Commit: cfd7b4b16b
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2013-05-10 (Fri, 10 May 2013)
Origin message was:
------------------
* Rework positioning of volumebar / mute icon / info clock
- Is required for custom icons
------------------
This commit was generated by Migit
This commit is contained in:
@@ -39,6 +39,7 @@ CAudioMute::CAudioMute()
|
|||||||
mute_dx = 0;
|
mute_dx = 0;
|
||||||
mute_dy = 0;
|
mute_dy = 0;
|
||||||
mute_ay_old = -1;
|
mute_ay_old = -1;
|
||||||
|
CVolumeHelper::getInstance()->refresh();
|
||||||
CVolumeHelper::getInstance()->getMuteIconDimensions(&mute_ax, &mute_ay, &mute_dx, &mute_dy);
|
CVolumeHelper::getInstance()->getMuteIconDimensions(&mute_ax, &mute_ay, &mute_dx, &mute_dy);
|
||||||
mIcon = new CComponentsPicture(mute_ax, mute_ay, mute_dx, mute_dy, NEUTRINO_ICON_BUTTON_MUTE);
|
mIcon = new CComponentsPicture(mute_ax, mute_ay, mute_dx, mute_dy, NEUTRINO_ICON_BUTTON_MUTE);
|
||||||
}
|
}
|
||||||
@@ -74,7 +75,7 @@ void CAudioMute::AudioMute(int newValue, bool isEvent)
|
|||||||
mute_ay_old = mute_ay;
|
mute_ay_old = mute_ay;
|
||||||
}
|
}
|
||||||
if ((g_settings.mode_clock) && (doInit))
|
if ((g_settings.mode_clock) && (doInit))
|
||||||
CInfoClock::getInstance(true)->ClearDisplay();
|
CInfoClock::getInstance()->ClearDisplay();
|
||||||
|
|
||||||
if (newValue)
|
if (newValue)
|
||||||
mIcon->paint();
|
mIcon->paint();
|
||||||
@@ -82,6 +83,6 @@ void CAudioMute::AudioMute(int newValue, bool isEvent)
|
|||||||
mIcon->hide();
|
mIcon->hide();
|
||||||
|
|
||||||
if (doInit)
|
if (doInit)
|
||||||
CInfoClock::getInstance(true)->Init(true);
|
CVolumeHelper::getInstance()->refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -17,12 +17,12 @@
|
|||||||
|
|
||||||
#define YOFF 0
|
#define YOFF 0
|
||||||
|
|
||||||
CInfoClock::CInfoClock(bool noVolume)
|
CInfoClock::CInfoClock()
|
||||||
{
|
{
|
||||||
frameBuffer = CFrameBuffer::getInstance();
|
frameBuffer = CFrameBuffer::getInstance();
|
||||||
x = y = clock_x = 0;
|
x = y = clock_x = 0;
|
||||||
time_height = time_width = thrTimer = 0;
|
time_height = time_width = thrTimer = 0;
|
||||||
Init(noVolume);
|
Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
CInfoClock::~CInfoClock()
|
CInfoClock::~CInfoClock()
|
||||||
@@ -32,53 +32,35 @@ CInfoClock::~CInfoClock()
|
|||||||
thrTimer = 0;
|
thrTimer = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CInfoClock::Init(bool noVolume)
|
void CInfoClock::Init()
|
||||||
{
|
{
|
||||||
static int mute_dx = 0, mute_dy = 0, y_org = 0, spacer = 0;
|
CVolumeHelper::getInstance()->refresh();
|
||||||
int mute_corrY = 0;
|
CVolumeHelper::getInstance()->getInfoClockDimensions(&clock_x, &y, &time_width, &time_height, &digit_h, &digit_offset);
|
||||||
if (!noVolume) {
|
|
||||||
CVolumeHelper *vh = CVolumeHelper::getInstance();
|
|
||||||
int dummy;
|
|
||||||
vh->getDimensions(&dummy, &y, &x, &dummy);
|
|
||||||
vh->getMuteIconDimensions(&dummy, &dummy, &mute_dx, &mute_dy);
|
|
||||||
vh->getSpacer(&spacer, &dummy);
|
|
||||||
y_org = y;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
y = y_org;
|
|
||||||
|
|
||||||
digit_offset = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getDigitOffset();
|
|
||||||
digit_h = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getDigitHeight();
|
|
||||||
int t1 = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getRenderWidth(widest_number);
|
|
||||||
int t2 = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getRenderWidth(":");
|
|
||||||
time_height = digit_h + (int)((float)digit_offset * 1.5);
|
|
||||||
time_width = t1*6 + t2*2;
|
|
||||||
clock_x = x - time_width;
|
|
||||||
if (CNeutrinoApp::getInstance()->isMuted()) {
|
|
||||||
clock_x -= (mute_dx + spacer);
|
|
||||||
if (mute_dy > time_height)
|
|
||||||
y += (mute_dy - time_height) / 2;
|
|
||||||
else
|
|
||||||
mute_corrY = (time_height - mute_dy) / 2;
|
|
||||||
CVolumeHelper::getInstance()->setMuteIconCorrY(mute_corrY);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CInfoClock* CInfoClock::getInstance(bool noVolume)
|
CInfoClock* CInfoClock::getInstance()
|
||||||
{
|
{
|
||||||
static CInfoClock* InfoClock = NULL;
|
static CInfoClock* InfoClock = NULL;
|
||||||
if(!InfoClock)
|
if(!InfoClock)
|
||||||
InfoClock = new CInfoClock(noVolume);
|
InfoClock = new CInfoClock();
|
||||||
return InfoClock;
|
return InfoClock;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CInfoClock::paintTime( bool show_dot)
|
void CInfoClock::paintTime( bool show_dot)
|
||||||
{
|
{
|
||||||
char timestr[20];
|
char timestr[20];
|
||||||
|
int dummy, mute_dx, h_spacer;
|
||||||
time_t tm = time(0);
|
time_t tm = time(0);
|
||||||
strftime((char*) ×tr, sizeof(timestr), "%H:%M:%S", localtime(&tm));
|
strftime((char*) ×tr, sizeof(timestr), "%H:%M:%S", localtime(&tm));
|
||||||
timestr[2] = show_dot ? ':':'.';
|
timestr[2] = show_dot ? ':':'.';
|
||||||
|
|
||||||
|
CVolumeHelper *cvh = CVolumeHelper::getInstance();
|
||||||
|
cvh->getInfoClockDimensions(&clock_x, &y, &time_width, &time_height, &digit_h, &digit_offset);
|
||||||
|
cvh->getMuteIconDimensions(&dummy, &dummy, &mute_dx, &dummy);
|
||||||
|
cvh->getSpacer(&h_spacer, &dummy);
|
||||||
|
if (CNeutrinoApp::getInstance()->isMuted())
|
||||||
|
clock_x -= (mute_dx + h_spacer);
|
||||||
|
|
||||||
int x_diff = (time_width - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getRenderWidth(timestr)) / 2;
|
int x_diff = (time_width - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getRenderWidth(timestr)) / 2;
|
||||||
frameBuffer->paintBoxRel(clock_x, y, time_width, time_height, COL_MENUCONTENT_PLUS_0, RADIUS_SMALL);
|
frameBuffer->paintBoxRel(clock_x, y, time_width, time_height, COL_MENUCONTENT_PLUS_0, RADIUS_SMALL);
|
||||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->RenderString(clock_x + x_diff, y + digit_h + digit_offset + ((time_height - digit_h) / 2), time_width, timestr, COL_MENUCONTENT);
|
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->RenderString(clock_x + x_diff, y + digit_h + digit_offset + ((time_height - digit_h) / 2), time_width, timestr, COL_MENUCONTENT);
|
||||||
@@ -104,6 +86,7 @@ void* CInfoClock::TimerProc(void *arg)
|
|||||||
void CInfoClock::ClearDisplay()
|
void CInfoClock::ClearDisplay()
|
||||||
{
|
{
|
||||||
frameBuffer->paintBackgroundBoxRel(clock_x, y, time_width, time_height);
|
frameBuffer->paintBackgroundBoxRel(clock_x, y, time_width, time_height);
|
||||||
|
Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CInfoClock::StartClock()
|
void CInfoClock::StartClock()
|
||||||
|
@@ -20,15 +20,15 @@ class CInfoClock
|
|||||||
void paintTime( bool show_dot);
|
void paintTime( bool show_dot);
|
||||||
int time_offset, digit_offset, digit_h;
|
int time_offset, digit_offset, digit_h;
|
||||||
int x, y, clock_x;
|
int x, y, clock_x;
|
||||||
|
void Init();
|
||||||
static void CleanUpProc(void* arg);
|
static void CleanUpProc(void* arg);
|
||||||
static void* TimerProc(void *arg);
|
static void* TimerProc(void *arg);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CInfoClock(bool noVolume=false);
|
CInfoClock();
|
||||||
~CInfoClock();
|
~CInfoClock();
|
||||||
static CInfoClock* getInstance(bool noVolume=false);
|
static CInfoClock* getInstance();
|
||||||
|
|
||||||
void Init(bool noVolume=false);
|
|
||||||
void StartClock();
|
void StartClock();
|
||||||
void StopClock();
|
void StopClock();
|
||||||
void ClearDisplay();
|
void ClearDisplay();
|
||||||
|
@@ -28,7 +28,6 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#include "gui/volumebar.h"
|
#include "gui/volumebar.h"
|
||||||
|
|
||||||
#include <global.h>
|
#include <global.h>
|
||||||
@@ -37,6 +36,9 @@
|
|||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
//default vol_height
|
||||||
|
#define VOL_HEIGHT 36
|
||||||
|
|
||||||
CVolumeBar::CVolumeBar()
|
CVolumeBar::CVolumeBar()
|
||||||
{
|
{
|
||||||
initVarVolumeBar();
|
initVarVolumeBar();
|
||||||
@@ -47,7 +49,6 @@ void CVolumeBar::initVarVolumeBar()
|
|||||||
//init inherited variables
|
//init inherited variables
|
||||||
initVarForm();
|
initVarForm();
|
||||||
col_body = COL_MENUCONTENT_PLUS_0;
|
col_body = COL_MENUCONTENT_PLUS_0;
|
||||||
height = 36; //default height
|
|
||||||
|
|
||||||
//init variables this
|
//init variables this
|
||||||
|
|
||||||
@@ -57,12 +58,6 @@ void CVolumeBar::initVarVolumeBar()
|
|||||||
//items
|
//items
|
||||||
//icon object
|
//icon object
|
||||||
vb_icon = NULL;
|
vb_icon = NULL;
|
||||||
// icon whith / height
|
|
||||||
int tmp_h = 0;
|
|
||||||
frameBuffer->getIconSize(NEUTRINO_ICON_VOLUME, &icon_w, &tmp_h);
|
|
||||||
icon_w += 12;
|
|
||||||
tmp_h += 4;
|
|
||||||
height = max(height, tmp_h);
|
|
||||||
|
|
||||||
//progressbar object
|
//progressbar object
|
||||||
vb_pb = NULL;
|
vb_pb = NULL;
|
||||||
@@ -87,16 +82,14 @@ void CVolumeBar::initVarVolumeBar()
|
|||||||
//calculates size referred for possible activated clock or/and mute icon
|
//calculates size referred for possible activated clock or/and mute icon
|
||||||
void CVolumeBar::initVolumeBarSize()
|
void CVolumeBar::initVolumeBarSize()
|
||||||
{
|
{
|
||||||
int tmp_h = height;
|
// digit whith
|
||||||
|
if (g_settings.volume_digits)
|
||||||
// digit whith / height
|
|
||||||
if (g_settings.volume_digits) {
|
|
||||||
tmp_h = g_Font[VolumeFont]->getDigitHeight() + (g_Font[VolumeFont]->getDigitOffset() * 18) / 10;
|
|
||||||
height = max(height, tmp_h);
|
|
||||||
digit_w = g_Font[VolumeFont]->getRenderWidth("100 ");
|
digit_w = g_Font[VolumeFont]->getRenderWidth("100 ");
|
||||||
}
|
|
||||||
else
|
else
|
||||||
digit_w = 0;
|
digit_w = 0;
|
||||||
|
int dummy = 0;
|
||||||
|
frameBuffer->getIconSize(NEUTRINO_ICON_VOLUME, &icon_w, &dummy);
|
||||||
|
icon_w += 12;
|
||||||
|
|
||||||
//adapt x-pos
|
//adapt x-pos
|
||||||
icon_x = corner_rad + 2;
|
icon_x = corner_rad + 2;
|
||||||
@@ -112,30 +105,19 @@ void CVolumeBar::initVolumeBarSize()
|
|||||||
CVolumeHelper *cvh = CVolumeHelper::getInstance();
|
CVolumeHelper *cvh = CVolumeHelper::getInstance();
|
||||||
cvh->getSpacer(&h_spacer, &v_spacer);
|
cvh->getSpacer(&h_spacer, &v_spacer);
|
||||||
cvh->getDimensions(&x, &y, &sw, &sh);
|
cvh->getDimensions(&x, &y, &sw, &sh);
|
||||||
|
cvh->getVolBarDimensions(&y, &height);
|
||||||
|
|
||||||
// mute icon
|
// mute icon
|
||||||
cvh->getMuteIconDimensions(&mute_ax, &mute_ay, &mute_dx, &mute_dy);
|
cvh->getMuteIconDimensions(&mute_ax, &mute_ay, &mute_dx, &mute_dy);
|
||||||
|
// info clock
|
||||||
clock_height = 0;
|
cvh->getInfoClockDimensions(&dummy, &clock_y, &clock_width, &clock_height, &dummy, &dummy);
|
||||||
int clock_width = 0;
|
|
||||||
int mute_corrY = 0;
|
int mute_corrY = 0;
|
||||||
if ((g_settings.mode_clock) && (g_settings.volume_pos == 0)) {
|
if (mute_dy < height)
|
||||||
// Clock and MuteIcon in a line.
|
|
||||||
clock_height = CInfoClock::getInstance(true)->time_height;
|
|
||||||
clock_width = CInfoClock::getInstance(true)->time_width;
|
|
||||||
mute_corrY = (clock_height - mute_dy) / 2;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// Volume level and MuteIcon in a line.
|
|
||||||
if (mute_dy > height)
|
|
||||||
y += (mute_dy - height) / 2;
|
|
||||||
else
|
|
||||||
mute_corrY = (height - mute_dy) / 2;
|
mute_corrY = (height - mute_dy) / 2;
|
||||||
}
|
|
||||||
cvh->setMuteIconCorrY(mute_corrY);
|
cvh->setMuteIconCorrY(mute_corrY);
|
||||||
|
|
||||||
if ((g_settings.mode_clock) && (!CNeutrinoApp::getInstance()->isMuted()))
|
if ((g_settings.mode_clock) && (!CNeutrinoApp::getInstance()->isMuted()))
|
||||||
frameBuffer->paintBackgroundBoxRel(sw - clock_width, y, clock_width, clock_height);
|
CInfoClock::getInstance()->ClearDisplay();
|
||||||
|
|
||||||
vb_pbh = height-8;
|
vb_pbh = height-8;
|
||||||
vb_pby = height/2-vb_pbh/2;
|
vb_pby = height/2-vb_pbh/2;
|
||||||
@@ -154,7 +136,7 @@ void CVolumeBar::initVolumeBarPosition()
|
|||||||
if ((neutrino->isMuted()) && (!g_settings.mode_clock))
|
if ((neutrino->isMuted()) && (!g_settings.mode_clock))
|
||||||
x_corr = mute_dx + h_spacer;
|
x_corr = mute_dx + h_spacer;
|
||||||
if (g_settings.mode_clock)
|
if (g_settings.mode_clock)
|
||||||
y += clock_height + v_spacer / 2;
|
y += max(clock_y + clock_height, mute_ay + mute_dy) /*+ v_spacer / 2*/;
|
||||||
}
|
}
|
||||||
x = sw - width - x_corr;
|
x = sw - width - x_corr;
|
||||||
break;
|
break;
|
||||||
@@ -290,22 +272,75 @@ CVolumeHelper::CVolumeHelper()
|
|||||||
h_spacer = 11;
|
h_spacer = 11;
|
||||||
v_spacer = 6;
|
v_spacer = 6;
|
||||||
|
|
||||||
CFrameBuffer *frameBuffer = CFrameBuffer::getInstance();
|
frameBuffer = CFrameBuffer::getInstance();
|
||||||
|
|
||||||
|
Init();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CVolumeHelper::Init()
|
||||||
|
{
|
||||||
|
|
||||||
x = frameBuffer->getScreenX() + h_spacer;
|
x = frameBuffer->getScreenX() + h_spacer;
|
||||||
y = frameBuffer->getScreenY() + v_spacer;
|
y = frameBuffer->getScreenY() + v_spacer;
|
||||||
sw = g_settings.screen_EndX - h_spacer;
|
sw = g_settings.screen_EndX - h_spacer;
|
||||||
sh = frameBuffer->getScreenHeight();
|
sh = frameBuffer->getScreenHeight();
|
||||||
|
|
||||||
int mute_icon_dx = 0;
|
initVolBarHeight();
|
||||||
int mute_icon_dy = 0;
|
initMuteIcon();
|
||||||
frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_MUTE, &mute_icon_dx, &mute_icon_dy);
|
initInfoClock();
|
||||||
mute_dx = mute_icon_dx;
|
}
|
||||||
mute_dy = mute_icon_dy;
|
|
||||||
mute_dx += mute_icon_dx / 4;
|
void CVolumeHelper::initInfoClock()
|
||||||
mute_dy += mute_icon_dx / 4;
|
{
|
||||||
|
digit_offset = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getDigitOffset();
|
||||||
|
digit_h = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getDigitHeight();
|
||||||
|
int t1 = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getRenderWidth(widest_number);
|
||||||
|
int t2 = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getRenderWidth(":");
|
||||||
|
clock_dy = digit_h + (int)((float)digit_offset * 1.5);
|
||||||
|
clock_dx = t1*6 + t2*2;
|
||||||
|
clock_ax = sw - clock_dx;
|
||||||
|
clock_ay = y;
|
||||||
|
vol_ay = y;
|
||||||
|
mute_corrY = 0;
|
||||||
|
|
||||||
|
if (g_settings.mode_clock) {
|
||||||
|
if (mute_dy > clock_dy)
|
||||||
|
clock_ay += (mute_dy - clock_dy) / 2;
|
||||||
|
else
|
||||||
|
mute_corrY = (clock_dy - mute_dy) / 2;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (mute_dy > vol_height)
|
||||||
|
vol_ay += (mute_dy - vol_height) / 2;
|
||||||
|
else
|
||||||
|
mute_corrY = (vol_height - mute_dy) / 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CVolumeHelper::initMuteIcon()
|
||||||
|
{
|
||||||
|
frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_MUTE, &mute_dx, &mute_dy);
|
||||||
mute_ax = sw - mute_dx;
|
mute_ax = sw - mute_dx;
|
||||||
mute_ay = y;
|
mute_ay = y;
|
||||||
mute_corrY = 0;
|
}
|
||||||
|
|
||||||
|
void CVolumeHelper::initVolBarHeight()
|
||||||
|
{
|
||||||
|
vol_height = VOL_HEIGHT;
|
||||||
|
int tmp_h = 0;
|
||||||
|
int dummy = 0;
|
||||||
|
frameBuffer->getIconSize(NEUTRINO_ICON_VOLUME, &dummy, &tmp_h);
|
||||||
|
tmp_h += 4;
|
||||||
|
vol_height = max(vol_height, tmp_h);
|
||||||
|
if (g_settings.volume_digits) {
|
||||||
|
tmp_h = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getDigitHeight() + (g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getDigitOffset() * 18) / 10;
|
||||||
|
vol_height = max(vol_height, tmp_h);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CVolumeHelper::refresh()
|
||||||
|
{
|
||||||
|
Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
CVolumeHelper* CVolumeHelper::getInstance()
|
CVolumeHelper* CVolumeHelper::getInstance()
|
||||||
|
@@ -44,7 +44,7 @@ class CVolumeBar : public CComponentsForm
|
|||||||
int h_spacer, v_spacer;
|
int h_spacer, v_spacer;
|
||||||
|
|
||||||
//clock
|
//clock
|
||||||
int clock_height;
|
int clock_y, clock_width, clock_height;
|
||||||
|
|
||||||
//volume value
|
//volume value
|
||||||
char *vb_vol;
|
char *vb_vol;
|
||||||
@@ -82,7 +82,15 @@ class CVolumeHelper
|
|||||||
private:
|
private:
|
||||||
int x, y, sw, sh;
|
int x, y, sw, sh;
|
||||||
int mute_ax, mute_ay, mute_dx, mute_dy, mute_corrY;
|
int mute_ax, mute_ay, mute_dx, mute_dy, mute_corrY;
|
||||||
|
int clock_ax, clock_ay, clock_dx, clock_dy, digit_h, digit_offset;
|
||||||
int h_spacer, v_spacer;
|
int h_spacer, v_spacer;
|
||||||
|
int vol_ay, vol_height;
|
||||||
|
CFrameBuffer *frameBuffer;
|
||||||
|
|
||||||
|
void Init();
|
||||||
|
void initVolBarHeight();
|
||||||
|
void initMuteIcon();
|
||||||
|
void initInfoClock();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@@ -92,7 +100,10 @@ class CVolumeHelper
|
|||||||
void getSpacer(int *h, int *v) { *h = h_spacer; *v = v_spacer; }
|
void getSpacer(int *h, int *v) { *h = h_spacer; *v = v_spacer; }
|
||||||
void getDimensions(int *_x, int *_y, int *_sw, int *_sh) { *_x = x; *_y = y; *_sw = sw; *_sh = sh; }
|
void getDimensions(int *_x, int *_y, int *_sw, int *_sh) { *_x = x; *_y = y; *_sw = sw; *_sh = sh; }
|
||||||
void getMuteIconDimensions(int *_x, int *_y, int *w, int *h) { *_x = mute_ax; *_y = mute_ay+mute_corrY; *w = mute_dx; *h = mute_dy; }
|
void getMuteIconDimensions(int *_x, int *_y, int *w, int *h) { *_x = mute_ax; *_y = mute_ay+mute_corrY; *w = mute_dx; *h = mute_dy; }
|
||||||
|
void getInfoClockDimensions(int *_x, int *_y, int *w, int *h, int *d_h, int *d_o) { *_x = clock_ax; *_y = clock_ay; *w = clock_dx; *h = clock_dy, *d_h = digit_h, *d_o = digit_offset; }
|
||||||
|
void getVolBarDimensions(int *_y, int *_dy) { *_y = vol_ay; *_dy = vol_height; }
|
||||||
void setMuteIconCorrY(int corr) { mute_corrY = corr; }
|
void setMuteIconCorrY(int corr) { mute_corrY = corr; }
|
||||||
|
void refresh();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -243,8 +243,8 @@ bool CFontSizeNotifier::changeNotify(const neutrino_locale_t, void *)
|
|||||||
CNeutrinoApp::getInstance()->SetupFonts();
|
CNeutrinoApp::getInstance()->SetupFonts();
|
||||||
|
|
||||||
hintBox.hide();
|
hintBox.hide();
|
||||||
/* recalculate infoclock */
|
/* recalculate infoclock/muteicon/volumebar */
|
||||||
CInfoClock::getInstance()->Init();
|
CVolumeHelper::getInstance()->refresh();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user