mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-10 20:04:46 +00:00
Do not hardcode the background color of the preview at two places.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32562 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
bf5a35a293
commit
5a530cca94
@ -595,8 +595,8 @@ void PreviewLoader::Impl::startLoading()
|
|||||||
cs << pconverter_->command << ' ' << pconverter_->to << ' '
|
cs << pconverter_->command << ' ' << pconverter_->to << ' '
|
||||||
<< quoteName(latexfile.toFilesystemEncoding()) << ' '
|
<< quoteName(latexfile.toFilesystemEncoding()) << ' '
|
||||||
<< int(font_scaling_factor_) << ' '
|
<< int(font_scaling_factor_) << ' '
|
||||||
<< theApp()->hexName(Color_preview) << ' '
|
<< theApp()->hexName(PreviewLoader::foregroundColor()) << ' '
|
||||||
<< theApp()->hexName(Color_background);
|
<< theApp()->hexName(PreviewLoader::backgroundColor());
|
||||||
|
|
||||||
string const command = libScriptSearch(cs.str());
|
string const command = libScriptSearch(cs.str());
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
#include <boost/signal.hpp>
|
#include <boost/signal.hpp>
|
||||||
|
|
||||||
|
#include "ColorCode.h"
|
||||||
|
|
||||||
namespace lyx {
|
namespace lyx {
|
||||||
|
|
||||||
@ -85,6 +86,10 @@ public:
|
|||||||
|
|
||||||
/// Which buffer owns this loader.
|
/// Which buffer owns this loader.
|
||||||
Buffer const & buffer() const;
|
Buffer const & buffer() const;
|
||||||
|
/// The background color used
|
||||||
|
static ColorCode backgroundColor() { return Color_background; }
|
||||||
|
/// The foreground color used
|
||||||
|
static ColorCode foregroundColor() { return Color_preview; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// noncopyable
|
/// noncopyable
|
||||||
|
@ -39,6 +39,7 @@
|
|||||||
#include "insets/RenderPreview.h"
|
#include "insets/RenderPreview.h"
|
||||||
|
|
||||||
#include "graphics/PreviewImage.h"
|
#include "graphics/PreviewImage.h"
|
||||||
|
#include "graphics/PreviewLoader.h"
|
||||||
|
|
||||||
#include "frontends/Painter.h"
|
#include "frontends/Painter.h"
|
||||||
|
|
||||||
@ -373,7 +374,7 @@ void InsetMathHull::metrics(MetricsInfo & mi, Dimension & dim) const
|
|||||||
ColorCode InsetMathHull::backgroundColor(PainterInfo const & pi) const
|
ColorCode InsetMathHull::backgroundColor(PainterInfo const & pi) const
|
||||||
{
|
{
|
||||||
if (previewState(pi.base.bv))
|
if (previewState(pi.base.bv))
|
||||||
return Color_background;
|
return graphics::PreviewLoader::backgroundColor();
|
||||||
return Color_mathbg;
|
return Color_mathbg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user