diff --git a/src/gui/widget/stringinput.cpp b/src/gui/widget/stringinput.cpp index 1056de39f..bceccca9b 100644 --- a/src/gui/widget/stringinput.cpp +++ b/src/gui/widget/stringinput.cpp @@ -532,13 +532,20 @@ const char * CStringInput::getHint1(void) return g_Locale->getText(hint_1); } -void CStringInput::paint() +void CStringInput::paint(bool buttons) { int iconoffset; int icol_w, icol_h; + int radius; + + /* if there's a button bar below the stringinput (SMS), no rounded corners */ + if (buttons) + radius = 0; + else + radius = RADIUS_LARGE; frameBuffer->paintBoxRel(x, y, width, hheight, COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_TOP); //round - frameBuffer->paintBoxRel(x, y + hheight, width, height - hheight, COL_MENUCONTENT_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM); + frameBuffer->paintBoxRel(x, y + hheight, width, height - hheight, COL_MENUCONTENT_PLUS_0, radius, CORNER_BOTTOM); if (!(iconfile.empty())) { @@ -743,9 +750,9 @@ const struct button_label CStringInputSMSButtons[2] = { NEUTRINO_ICON_BUTTON_YELLOW, LOCALE_STRINGINPUT_CLEAR } }; -void CStringInputSMS::paint() +void CStringInputSMS::paint(bool /*unused*/) { - CStringInput::paint(); + CStringInput::paint(true); frameBuffer->paintIcon(NEUTRINO_ICON_NUMERIC_PAD, x+20+140, y+ hheight+ mheight+ iheight* 3+ 30, 0, COL_MENUCONTENT); diff --git a/src/gui/widget/stringinput.h b/src/gui/widget/stringinput.h index f5b139c9b..0da2a07f2 100644 --- a/src/gui/widget/stringinput.h +++ b/src/gui/widget/stringinput.h @@ -70,7 +70,7 @@ class CStringInput : public CMenuTarget virtual void init(); virtual const char * getHint1(void); - virtual void paint(); + virtual void paint(bool buttons = false); virtual void paintChar(int pos, char c); virtual void paintChar(int pos); @@ -121,7 +121,7 @@ class CStringInputSMS : public CStringInput virtual void keyLeftPressed(); virtual void keyRightPressed(); - virtual void paint(); + virtual void paint(bool dummy = false); void initSMS(const char * const Valid_Chars); public: