From 5d858ab8f862aa91d31727e9452d9060d134f1cd Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 12 Sep 2017 22:30:35 +0200 Subject: [PATCH] menu: fix right offset for very long right texts Signed-off-by: Thilo Graf Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/c367c803359c494564664ce866f368942aa37e34 Author: vanhofen Date: 2017-09-12 (Tue, 12 Sep 2017) Origin message was: ------------------ - menu: fix right offset for very long right texts Signed-off-by: Thilo Graf --- src/gui/widget/menue.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index be9fff00f..a269722e0 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -256,7 +256,7 @@ void CMenuItem::paintItemCaption(const bool select_mode, const char * right_text } if (*right_text) { stringstartposOption -= (icon_w == 0 ? 0 : icon_w + OFFSET_INNER_MID); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(stringstartposOption, y+item_height - desc_height, dx- (stringstartposOption- x), right_text, item_color); + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(stringstartposOption, y+item_height - desc_height, dx - stringstartposOption + x - OFFSET_INNER_MID, right_text, item_color); } } if (desc_text && *desc_text)