X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetNote.cpp;h=adacef3bae267066beec930dacb5f5b707ca6f65;hb=6775d7c3a2bccdc064dc0fb37564b8941d956541;hp=fa84c61c87c7df75914027e180e48e0fff6e3be2;hpb=11a57ce6c68e712cab9818c92a0442e96f6d58d7;p=features.git diff --git a/src/insets/InsetNote.cpp b/src/insets/InsetNote.cpp index fa84c61c87..adacef3bae 100644 --- a/src/insets/InsetNote.cpp +++ b/src/insets/InsetNote.cpp @@ -19,19 +19,15 @@ #include "BufferView.h" #include "ColorSet.h" #include "Cursor.h" -#include "DispatchResult.h" #include "Exporter.h" +#include "FontInfo.h" #include "FuncRequest.h" #include "FuncStatus.h" -#include "InsetIterator.h" +#include "InsetLayout.h" #include "LaTeXFeatures.h" #include "Lexer.h" #include "LyXRC.h" -#include "OutputParams.h" #include "output_docbook.h" -#include "ParIterator.h" -#include "TextClass.h" -#include "TocBackend.h" #include "support/debug.h" #include "support/docstream.h" @@ -299,7 +295,7 @@ void InsetNote::validate(LaTeXFeatures & features) const { switch (params_.type) { case InsetNoteParams::Comment: - if (features.runparams().flavor == OutputParams::HTML) + if (features.runparams().flavor == Flavor::Html) // we do output this but set display to "none" by default, // but people might want to use it. InsetCollapsible::validate(features); @@ -331,12 +327,15 @@ bool InsetNote::allowSpellCheck() const FontInfo InsetNote::getFont() const { FontInfo font = getLayout().font(); - // FIXME: This hardcoded color is a hack! if (params_.type == InsetNoteParams::Greyedout - && buffer().params().notefontcolor != lyx::rgbFromHexName("#cccccc")) { + && buffer().params().isnotefontcolor) { ColorCode c = lcolor.getFromLyXName("notefontcolor"); if (c != Color_none) font.setColor(c); + // This is the local color (not overridden by other documents) + ColorCode lc = lcolor.getFromLyXName("notefontcolor@" + buffer().fileName().absFileName()); + if (lc != Color_none) + font.setPaintColor(lc); } return font; }