From 41528b9a8a5e6204214f87ef9ab79c7c1844d59a Mon Sep 17 00:00:00 2001 From: TangoCash Date: Fri, 12 Nov 2021 13:02:20 +0100 Subject: [PATCH] channellist: align description position to channelname height Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/3cbdfffe8c78b719445a13fc2d971698c921551f Author: TangoCash Date: 2021-11-12 (Fri, 12 Nov 2021) Origin message was: ------------------ - channellist: align description position to channelname height ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/channellist.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 4952bc1b3..acea961bd 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -2213,15 +2213,16 @@ 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; if (g_settings.channellist_epgtext_align_right) { // align right - g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString(x + width - SCROLLBAR_WIDTH - offset_right - ch_desc_len, ypos + fheight, ch_desc_len, p_event->description, ecolor); + g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString(x + width - SCROLLBAR_WIDTH - offset_right - ch_desc_len, ypos + fheight - descr_offset, ch_desc_len, p_event->description, ecolor); } else { // align left - g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString(x + OFFSET_INNER_MID + numwidth + OFFSET_INNER_MID + prg_offset + OFFSET_INNER_MID + ch_name_len, ypos + fheight, ch_desc_len, p_event->description, ecolor); + g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString(x + OFFSET_INNER_MID + numwidth + OFFSET_INNER_MID + prg_offset + OFFSET_INNER_MID + ch_name_len, ypos + fheight - descr_offset, ch_desc_len, p_event->description, ecolor); } } else