CInfoClock: Fix size & position calculation

This commit is contained in:
M. Liebmann
2013-12-10 20:48:30 +01:00
parent e9673d8798
commit a4dc972774

View File

@@ -124,7 +124,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_y + clock_height + v_spacer; y = clock_y + clock_height + v_spacer + SHADOW_OFFSET;
} }
x = sw - width - x_corr; x = sw - width - x_corr;
break; break;
@@ -298,7 +298,10 @@ void CVolumeHelper::initInfoClock(Font** font)
int t1 = (*clock_font)->getMaxDigitWidth(); int t1 = (*clock_font)->getMaxDigitWidth();
int t2 = (*clock_font)->getRenderWidth(":"); int t2 = (*clock_font)->getRenderWidth(":");
clock_dy = digit_h + (int)((float)digit_offset * 1.3); clock_dy = digit_h + (int)((float)digit_offset * 1.3);
clock_dx = t1*7 + t2*2; if (g_settings.infoClockSeconds)
clock_dx = t1*7 + t2*2;
else
clock_dx = t1*5 + t2*1;
clock_ax = sw - clock_dx; clock_ax = sw - clock_dx;
clock_ay = y; clock_ay = y;
vol_ay = y; vol_ay = y;