From 52a158b6d7ff662d883e84ac57d120ca1786bb79 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20St=C3=B6hr?= Date: Sun, 17 May 2015 23:20:43 +0200 Subject: [PATCH] InsetBox.cpp: add visual feedback for frame color - the idea is to color the box inset frame according to the fame color of the box (if there is any). To keep the WYSIWYM principle the frame thickness and box separation are not taken into account. However this should be possible if anybody would like that. - besides this, use the correct conversion command for the background color --- src/insets/InsetBox.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/insets/InsetBox.cpp b/src/insets/InsetBox.cpp index 20968d89d6..c5bd4ee446 100644 --- a/src/insets/InsetBox.cpp +++ b/src/insets/InsetBox.cpp @@ -158,6 +158,12 @@ void InsetBox::setButtonLabel() label = bformat(_("%1$s (%2$s, %3$s)"), type, inner, frame); setLabel(label); + + // set the frame color for the inset if the type is Boxed + if (btype == Boxed) + setFrameColor(lcolor.getFromLaTeXName(params_.framecolor)); + else + setFrameColor(Color_collapsableframe); } @@ -210,7 +216,7 @@ ColorCode InsetBox::backgroundColor(PainterInfo const &) const } else { if (params_.backgroundcolor == "none") return getLayout().bgcolor(); - ColorCode boxbackground = lcolor.getFromLyXName(params_.backgroundcolor); + ColorCode boxbackground = lcolor.getFromLaTeXName(params_.backgroundcolor); return boxbackground; } return getLayout().bgcolor(); -- 2.39.2