From 187efdbf19ae91de7154e423a179ebfa0870e77f Mon Sep 17 00:00:00 2001 From: vanhofen Date: Wed, 19 Oct 2016 10:06:36 +0200 Subject: [PATCH] stringinput_ext: use getItemColors function Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/54b2a6da910c9ddc5055fb4b2a76ab0753a8c0e6 Author: vanhofen Date: 2016-10-19 (Wed, 19 Oct 2016) Origin message was: ------------------ - stringinput_ext: use getItemColors function --- src/gui/widget/stringinput_ext.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/gui/widget/stringinput_ext.cpp b/src/gui/widget/stringinput_ext.cpp index 2d04e833b..4b4923e00 100644 --- a/src/gui/widget/stringinput_ext.cpp +++ b/src/gui/widget/stringinput_ext.cpp @@ -350,19 +350,10 @@ void CExtendedInput_Item_Char::paint(int x, int y, bool focusGained ) fb_pixel_t color; fb_pixel_t bgcolor; - if (focusGained) - { - color = COL_MENUCONTENTSELECTED_TEXT; - bgcolor = COL_MENUCONTENTSELECTED_PLUS_0; - } - else - { - color = COL_MENUCONTENT_TEXT; - bgcolor = COL_MENUCONTENT_PLUS_0; - } + getItemColors(color, bgcolor, focusGained); - frameBuffer->paintBoxRel(xpos, ypos, input_w, input_h, COL_MENUCONTENT_PLUS_2); - frameBuffer->paintBoxRel(xpos+ 1, ypos+ 1, input_w- 2, input_h- 2, bgcolor); + frameBuffer->paintBoxRel(xpos, ypos, input_w, input_h, bgcolor); + frameBuffer->paintBoxFrame(xpos, ypos, input_w, input_h, 1, COL_MENUCONTENT_PLUS_2); int ch_w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(ch); int ch_x = xpos + std::max(input_w/2 - ch_w/2, 0);