]> git.lyx.org Git - features.git/commitdiff
BufferView.cpp: for the new Search dialog: paint also the range behind the work area...
authorUwe Stöhr <uwestoehr@web.de>
Wed, 19 Aug 2009 00:10:09 +0000 (00:10 +0000)
committerUwe Stöhr <uwestoehr@web.de>
Wed, 19 Aug 2009 00:10:09 +0000 (00:10 +0000)
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

src/BufferView.cpp

index ec1f15704095df8eaa45af178939744c56f5bdf8..feae8cc97f4fb228ba4010fd5f47f45ad8d8cd7e 100644 (file)
@@ -2338,8 +2338,14 @@ void BufferView::draw(frontend::Painter & pain)
                // and possibly grey out below
                pair<pit_type, ParagraphMetrics const *> 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  ***");