mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
add a new color to distinguish \newpage from \pagebreak
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21785 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
b897636173
commit
98a856a301
@ -159,7 +159,8 @@ ColorSet::ColorSet()
|
||||
{ Color_tabularonoffline, N_("table on/off line"), "tabularonoffline",
|
||||
"LightSteelBlue", "tabularonoffline" },
|
||||
{ Color_bottomarea, N_("bottom area"), "bottomarea", "grey40", "bottomarea" },
|
||||
{ Color_pagebreak, N_("page break"), "pagebreak", "RoyalBlue", "pagebreak" },
|
||||
{ Color_newpage, N_("new page"), "newpage", "Blue", "newpage" },
|
||||
{ Color_pagebreak, N_("page break / line break"), "pagebreak", "RoyalBlue", "pagebreak" },
|
||||
{ Color_buttonframe, N_("frame of button"), "buttonframe", "#dcd2c8", "buttonframe" },
|
||||
{ Color_buttonbg, N_("button background"), "buttonbg", "#dcd2c8", "buttonbg" },
|
||||
{ Color_buttonhoverbg, N_("button background under focus"), "buttonhoverbg", "#C7C7CA", "buttonhoverbg" },
|
||||
|
@ -137,6 +137,8 @@ enum ColorCode
|
||||
Color_tabularonoffline,
|
||||
/// Bottom area color
|
||||
Color_bottomarea,
|
||||
/// New page color
|
||||
Color_newpage,
|
||||
/// Page break color
|
||||
Color_pagebreak,
|
||||
|
||||
|
@ -55,7 +55,7 @@ void InsetNewpage::metrics(MetricsInfo & mi, Dimension & dim) const
|
||||
void InsetNewpage::draw(PainterInfo & pi, int x, int y) const
|
||||
{
|
||||
FontInfo font;
|
||||
font.setColor(Color_pagebreak);
|
||||
font.setColor(ColorName());
|
||||
font.decSize();
|
||||
|
||||
Dimension const dim = dimension(*pi.base.bv);
|
||||
@ -72,9 +72,9 @@ void InsetNewpage::draw(PainterInfo & pi, int x, int y) const
|
||||
Color_none, Color_none);
|
||||
|
||||
pi.pain.line(x, y, text_start, y,
|
||||
Color_pagebreak, Painter::line_onoffdash);
|
||||
ColorName(), Painter::line_onoffdash);
|
||||
pi.pain.line(text_end, y, int(x + dim.wid), y,
|
||||
Color_pagebreak, Painter::line_onoffdash);
|
||||
ColorName(), Painter::line_onoffdash);
|
||||
}
|
||||
|
||||
|
||||
|
@ -50,6 +50,8 @@ public:
|
||||
|
||||
virtual std::string getCmdName() const { return "\\newpage"; }
|
||||
|
||||
virtual ColorCode ColorName() const { return Color_newpage; }
|
||||
|
||||
private:
|
||||
virtual Inset * clone() const
|
||||
{
|
||||
@ -66,6 +68,8 @@ public:
|
||||
|
||||
std::string getCmdName() const { return "\\pagebreak"; }
|
||||
|
||||
ColorCode ColorName() const { return Color_pagebreak; }
|
||||
|
||||
private:
|
||||
virtual Inset * clone() const
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user