channellist, align channelname and description to the same baseline

This commit is contained in:
TangoCash
2022-05-06 23:41:05 +02:00
committed by Thilo Graf
parent 6a962eef51
commit c03b1f800f
2 changed files with 3 additions and 1 deletions

View File

@@ -90,6 +90,8 @@ class Font
int getWidestWidth(void);
int getSize(){return font.width;}
int setSize(int isize);
int getAscender(){return ascender;}
int getDescender(){return descender * -1;}
Font(FBFontRenderClass *render, FTC_FaceID faceid, const int isize, const fontmodifier _stylemodifier);
~Font(){}

View File

@@ -2216,7 +2216,7 @@ void CChannelList::paintItem(int pos, const bool firstpaint)
}
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x + OFFSET_INNER_MID + numwidth + OFFSET_INNER_MID + prg_offset + OFFSET_INNER_MID, ypos + fheight, ch_name_len, nameAndDescription, color);
int descr_offset = fheight/2 - g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->getHeight()/2;
int descr_offset = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getDescender() - g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->getDescender();
if (g_settings.channellist_epgtext_align_right)
{
// align right