From 236ca5395438fc1792ad9fbf2f6f602e081ae29c Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 8 Jan 2017 15:03:25 +0100 Subject: [PATCH] CVolumeHelper: fix info clock position after changed clock osd settings After increased clock height settings, position of infoclock was wrong. Old font instance and old width were not changed related to new instance. TODO: It works but procedure with helper class seems is rather elaborate and should be thoroughly revised. I recommend callbacks via native type save signal/slot handler. --- src/gui/volumebar.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gui/volumebar.cpp b/src/gui/volumebar.cpp index acf528f1e..982c15e12 100644 --- a/src/gui/volumebar.cpp +++ b/src/gui/volumebar.cpp @@ -293,13 +293,13 @@ void CVolumeHelper::Init(Font* font) void CVolumeHelper::initInfoClock(Font* font) { - if (clock_font == NULL){ - if (font == NULL) { - clock_font = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]; - } - else - clock_font = font; + if (font == NULL) { + int dx = 0; + int dy = g_settings.infoClockFontSize; + clock_font = *CNeutrinoFonts::getInstance()->getDynFont(dx, dy, g_settings.infoClockSeconds ? "%H:%M:%S" : "%H:%M"); } + else + clock_font = font; digit_offset = (clock_font)->getDigitOffset(); digit_h = (clock_font)->getDigitHeight();