From: Uwe Stöhr Date: Wed, 19 Aug 2009 00:10:09 +0000 (+0000) Subject: BufferView.cpp: for the new Search dialog: paint also the range behind the work area... X-Git-Tag: 2.0.0~5650 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=503844cb4c233e19394bef4d611bbfc5a8b3341d;p=lyx.git BufferView.cpp: for the new Search dialog: paint also the range behind the work area with the same color as the work area This avoids confusion as discussed in this thread: http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg153997.html ; this patch is from Vincent git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31136 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/BufferView.cpp b/src/BufferView.cpp index ec1f157040..feae8cc97f 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -2338,8 +2338,14 @@ void BufferView::draw(frontend::Painter & pain) // and possibly grey out below pair lastpm = tm.last(); int const y2 = lastpm.second->position() + lastpm.second->descent(); - if (y2 < height_) - pain.fillRectangle(0, y2, width_, height_ - y2, Color_bottomarea); + + if (y2 < height_) { + bool const embedded_workarea = buffer().isUnnamed() + && buffer().fileName().extension() == "internal"; + Color color = embedded_workarea ? Color_background + : Color_bottomarea; + pain.fillRectangle(0, y2, width_, height_ - y2, color); + } break; } LYXERR(Debug::PAINTING, "\n\t\t*** END DRAWING ***");