From d892a700afdd7c2ad373410bbd2ada0388d39c01 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Tue, 30 Apr 2013 13:50:13 +0200 Subject: [PATCH] - eventlist: re-align prev/next channelnames in header --- src/gui/eventlist.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index 5e0deae15..22766bed1 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -854,10 +854,10 @@ void CNeutrinoEventList::paintDescription(int index) void CNeutrinoEventList::paintHead(std::string _channelname, std::string _channelname_prev, std::string _channelname_next) { - const short font_h = 8; frameBuffer->paintBoxRel(x,y, full_width,theight+0, COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_TOP); - int name_width = full_width/3 ; + const short font_h = 8 /* FONT_TYPE_EVENTLIST_ITEMLARGE */; + short pn_y_off = std::max((theight - g_Font[font_h]->getHeight()) / 2, 0); short prev_len = g_Font[font_h]->getRenderWidth(_channelname_prev.c_str(),true); short next_len = g_Font[font_h]->getRenderWidth(_channelname_next.c_str(),true); short middle_len = g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_TITLE]->getRenderWidth(_channelname.c_str(),true); @@ -873,9 +873,9 @@ void CNeutrinoEventList::paintHead(std::string _channelname, std::string _channe middle_offset = 0; } - g_Font[font_h]->RenderString(x+4,y+theight+1, full_width, _channelname_prev.c_str(), COL_INFOBAR, 0, true); // UTF-8 - g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_TITLE]->RenderString(x+prev_len+middle_offset,y+theight+1, full_width, _channelname.c_str(), COL_MENUHEAD, 0, true); // UTF-8 - g_Font[font_h]->RenderString(x+(name_width*3)- next_len,y+theight+1, full_width, _channelname_next.c_str(), COL_INFOBAR, 0, true); // UTF-8 + g_Font[font_h]->RenderString(x+10,y+theight-pn_y_off+1, prev_len, _channelname_prev.c_str(), COL_INFOBAR, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_TITLE]->RenderString(x+prev_len+middle_offset,y+theight+1, middle_len, _channelname.c_str(), COL_MENUHEAD, 0, true); // UTF-8 + g_Font[font_h]->RenderString(x+full_width-next_len-10,y+theight-pn_y_off+1, next_len, _channelname_next.c_str(), COL_INFOBAR, 0, true); // UTF-8 }