diff --git a/src/gui/widget/stringinput.cpp b/src/gui/widget/stringinput.cpp index 306d00116..7b85123ac 100644 --- a/src/gui/widget/stringinput.cpp +++ b/src/gui/widget/stringinput.cpp @@ -389,6 +389,11 @@ int CStringInput::exec( CMenuTarget* parent, const std::string & ) strcat(value, " "); strncpy(oldval, value, size); + fb_pixel_t * pixbuf = new fb_pixel_t[(width + SHADOW_OFFSET) * (hheight + bheight + SHADOW_OFFSET)]; + + if (pixbuf != NULL) + frameBuffer->SaveScreen(x, y, width + SHADOW_OFFSET, hheight + bheight + SHADOW_OFFSET, pixbuf); + paint(); uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_MENU]); @@ -500,6 +505,12 @@ int CStringInput::exec( CMenuTarget* parent, const std::string & ) hide(); + if (pixbuf != NULL) + { + frameBuffer->RestoreScreen(x, y, width + SHADOW_OFFSET, hheight + bheight + SHADOW_OFFSET, pixbuf); + delete[] pixbuf;//Mismatching allocation and deallocation: pixbuf + } + for(int count=size-1;count>=0;count--) { if((value[count]==' ') || (value[count]==0)) @@ -532,11 +543,12 @@ int CStringInput::handleOthers(const neutrino_msg_t /*msg*/, const neutrino_msg_ void CStringInput::hide() { - frameBuffer->paintBackgroundBoxRel(x, y, width, height); + frameBuffer->paintBackgroundBoxRel(x, y, width + SHADOW_OFFSET, height + SHADOW_OFFSET); } void CStringInput::paint(bool sms) { + frameBuffer->paintBoxRel(x + SHADOW_OFFSET, y + SHADOW_OFFSET, width, hheight + bheight, COL_MENUCONTENTDARK_PLUS_0, RADIUS_LARGE, CORNER_ALL); //round frameBuffer->paintBoxRel(x, y, width, hheight, COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_TOP); //round frameBuffer->paintBoxRel(x, y + hheight, width, bheight, COL_MENUCONTENT_PLUS_0, sms ? 0 : RADIUS_LARGE, CORNER_BOTTOM);