- fonts: add and use own font for all footers

This commit is contained in:
svenhoefer
2016-08-15 18:54:28 +02:00
parent 080cda9716
commit 54f2ac510f
26 changed files with 46 additions and 40 deletions

View File

@@ -108,7 +108,7 @@ void CInfoViewerBB::Init()
bbButtonInfo[i].x = -1;
}
InfoHeightY_Info = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight() + 5;
InfoHeightY_Info = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]->getHeight() + 5;
initBBOffset();
changePB();
@@ -146,7 +146,7 @@ void CInfoViewerBB::getBBIconInfo()
bbIconMaxH = 0;
initBBOffset();
BBarY = g_InfoViewer->BoxEndY + bottom_bar_offset;
BBarFontY = BBarY + InfoHeightY_Info - (InfoHeightY_Info - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight()) / 2; /* center in buttonbar */
BBarFontY = BBarY + InfoHeightY_Info - (InfoHeightY_Info - g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]->getHeight()) / 2; /* center in buttonbar */
bbIconMinX = g_InfoViewer->BoxEndX - 8; //should be 10px, but 2px will be reduced for each icon
CNeutrinoApp* neutrino = CNeutrinoApp::getInstance();
@@ -286,7 +286,7 @@ void CInfoViewerBB::getBBButtonInfo()
if (text == g_Locale->getText(LOCALE_MPKEY_AUDIO) && !g_settings.infobar_buttons_usertitle)
text = CMoviePlayerGui::getInstance(false).CurrentAudioName(); // use instance_mp
}
bbButtonInfo[i].w = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(text) + w + 10;
bbButtonInfo[i].w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]->getRenderWidth(text) + w + 10;
bbButtonInfo[i].cx = w + 5;
bbButtonInfo[i].h = h;
bbButtonInfo[i].text = text;
@@ -431,7 +431,7 @@ void CInfoViewerBB::showBBButtons(bool paintFooter)
if (bbButtonInfo[i].active) {
frameBuffer->paintIcon(bbButtonInfo[i].icon, bbButtonInfo[i].x, BBarY, InfoHeightY_Info);
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(bbButtonInfo[i].x + bbButtonInfo[i].cx, BBarFontY,
g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]->RenderString(bbButtonInfo[i].x + bbButtonInfo[i].cx, BBarFontY,
bbButtonInfo[i].w - bbButtonInfo[i].cx, bbButtonInfo[i].text, COL_MENUFOOT_TEXT);
}
}