lex.eatLine();
string color = lex.getString();
boxbgcolor = lyx::rgbFromHexName(color);
+ lcolor.setColor("boxbgcolor", color);
} else if (token == "\\paperwidth") {
lex >> paperwidth;
} else if (token == "\\paperheight") {
#include "Buffer.h"
#include "BufferParams.h"
#include "BufferView.h"
+#include "ColorSet.h"
#include "Cursor.h"
#include "DispatchResult.h"
#include "FuncStatus.h"
}
+ColorCode InsetBox::backgroundColor(PainterInfo const &) const
+{
+ if (params_.type != "Shaded")
+ return getLayout().bgcolor();
+ // FIXME: This hardcoded color is a hack!
+ if (buffer().params().boxbgcolor == lyx::rgbFromHexName("#ff0000"))
+ return getLayout().bgcolor();
+ ColorCode c = lcolor.getFromLyXName("boxbgcolor");
+ if (c == Color_none)
+ return getLayout().bgcolor();
+ return c;
+}
+
+
void InsetBox::doDispatch(Cursor & cur, FuncRequest & cmd)
{
switch (cmd.action()) {
///
DisplayType display() const { return Inline; }
///
+ ColorCode backgroundColor(PainterInfo const &) const;
+ ///
bool allowParagraphCustomization(idx_type = 0) const { return !forcePlainLayout(); }
///
bool forcePlainLayout(idx_type = 0) const;