mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
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
This commit is contained in:
parent
61448d8cb2
commit
52a158b6d7
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user