From def5620e5810df552283febcaff7f0999d25bb92 Mon Sep 17 00:00:00 2001 From: Martin Vermeer Date: Mon, 27 Aug 2007 20:27:02 +0000 Subject: [PATCH] Fix black float background git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19839 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/InsetCollapsable.cpp | 4 +++- src/insets/InsetText.cpp | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/insets/InsetCollapsable.cpp b/src/insets/InsetCollapsable.cpp index f91ed5a12f..db4eeff37d 100644 --- a/src/insets/InsetCollapsable.cpp +++ b/src/insets/InsetCollapsable.cpp @@ -84,6 +84,8 @@ InsetCollapsable::InsetCollapsable setDrawFrame(true); setFrameColor(Color::collapsableframe); setButtonLabel(); + // Fallback for lacking inset layout item + layout_.bgcolor = Color::background; } @@ -247,7 +249,7 @@ bool InsetCollapsable::setMouseHover(bool mouse_hover) void InsetCollapsable::draw(PainterInfo & pi, int x, int y) const { autoOpen_ = pi.base.bv->cursor().isInside(this); - + text_.background_color_ = backgroundColor(); const int xx = x + TEXT_TO_INSET_OFFSET; // Draw button first -- top, left or only diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp index dbce51b93d..caff61676c 100644 --- a/src/insets/InsetText.cpp +++ b/src/insets/InsetText.cpp @@ -194,7 +194,6 @@ void InsetText::draw(PainterInfo & pi, int x, int y) const TextMetrics & tm = pi.base.bv->textMetrics(&text_); - text_.background_color_ = backgroundColor(); text_.draw(pi, x + border_, y); if (drawFrame_) { -- 2.39.5