mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-03 08:28:25 +00:00
Add marks to indicate when a row is too large
A dotted line is shown on the left or on the right to indicate that a part of the row is not visible. Add a color code for the scroll indicator
This commit is contained in:
parent
c6e1db7682
commit
52236503d3
@ -238,6 +238,7 @@ ColorSet::ColorSet()
|
|||||||
{ Color_urllabel, N_("URL label"), "urllabel", "blue", "urllabel" },
|
{ Color_urllabel, N_("URL label"), "urllabel", "blue", "urllabel" },
|
||||||
{ Color_urltext, N_("URL text"), "urltext", "blue", "urltext" },
|
{ Color_urltext, N_("URL text"), "urltext", "blue", "urltext" },
|
||||||
{ Color_depthbar, N_("depth bar"), "depthbar", "IndianRed", "depthbar" },
|
{ Color_depthbar, N_("depth bar"), "depthbar", "IndianRed", "depthbar" },
|
||||||
|
{ Color_scroll, N_("scroll indicator"), "scroll", "IndianRed", "scroll" },
|
||||||
{ Color_language, N_("language"), "language", "Blue", "language" },
|
{ Color_language, N_("language"), "language", "Blue", "language" },
|
||||||
{ Color_command, N_("command inset"), "command", "black", "command" },
|
{ Color_command, N_("command inset"), "command", "black", "command" },
|
||||||
{ Color_commandbg, N_("command inset background"), "commandbg", "azure", "commandbg" },
|
{ Color_commandbg, N_("command inset background"), "commandbg", "azure", "commandbg" },
|
||||||
|
@ -91,6 +91,8 @@ enum ColorCode {
|
|||||||
|
|
||||||
/// Color for the depth bars in the margin
|
/// Color for the depth bars in the margin
|
||||||
Color_depthbar,
|
Color_depthbar,
|
||||||
|
/// Color that indicates when a row can be scrolled
|
||||||
|
Color_scroll,
|
||||||
/// Color for marking foreign language words
|
/// Color for marking foreign language words
|
||||||
Color_language,
|
Color_language,
|
||||||
|
|
||||||
|
@ -439,6 +439,23 @@ int RowPainter::paintAppendixStart(int y)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void RowPainter::paintTooLargeMarks(bool const left, bool const right)
|
||||||
|
{
|
||||||
|
if (left)
|
||||||
|
pi_.pain.line(dotted_line_thickness_, yo_ - row_.ascent(),
|
||||||
|
dotted_line_thickness_, yo_ + row_.descent(),
|
||||||
|
Color_scroll,
|
||||||
|
Painter::line_onoffdash, dotted_line_thickness_);
|
||||||
|
if (right) {
|
||||||
|
int const wwidth = pi_.base.bv->workWidth() - dotted_line_thickness_;
|
||||||
|
pi_.pain.line(wwidth, yo_ - row_.ascent(),
|
||||||
|
wwidth, yo_ + row_.descent(),
|
||||||
|
Color_scroll,
|
||||||
|
Painter::line_onoffdash, dotted_line_thickness_);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void RowPainter::paintFirst()
|
void RowPainter::paintFirst()
|
||||||
{
|
{
|
||||||
BufferParams const & bparams = pi_.base.bv->buffer().params();
|
BufferParams const & bparams = pi_.base.bv->buffer().params();
|
||||||
|
@ -66,6 +66,7 @@ public:
|
|||||||
void paintAppendix();
|
void paintAppendix();
|
||||||
void paintDepthBar();
|
void paintDepthBar();
|
||||||
void paintChangeBar();
|
void paintChangeBar();
|
||||||
|
void paintTooLargeMarks(bool const left, bool const right);
|
||||||
void paintFirst();
|
void paintFirst();
|
||||||
void paintLast();
|
void paintLast();
|
||||||
void paintText();
|
void paintText();
|
||||||
|
@ -1942,6 +1942,8 @@ void TextMetrics::drawParagraph(PainterInfo & pi, pit_type const pit, int const
|
|||||||
rp.paintLast();
|
rp.paintLast();
|
||||||
if (i == 0 && is_rtl)
|
if (i == 0 && is_rtl)
|
||||||
rp.paintFirst();
|
rp.paintFirst();
|
||||||
|
rp.paintTooLargeMarks(row_x < 0,
|
||||||
|
row_x + row.width() > bv_->workWidth());
|
||||||
y += row.descent();
|
y += row.descent();
|
||||||
|
|
||||||
// Restore full_repaint status.
|
// Restore full_repaint status.
|
||||||
|
Loading…
Reference in New Issue
Block a user