diff --git a/src/ChangeLog b/src/ChangeLog index 509ed76d57..ba9844954b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2003-02-07 Jean-Marc Lasgouttes + + * text.C (getLengthMarkerHeight): + (drawLengthMarker): make the `symbolic' lengths (small/med/big) + visible on screen too. + 2003-02-05 Angus Leeming * lyxserver.C (read_ready): revert my patch of 11 September last year diff --git a/src/text.C b/src/text.C index b7a327d61c..d9f7ed110e 100644 --- a/src/text.C +++ b/src/text.C @@ -3235,13 +3235,12 @@ void LyXText::paintRowDepthBar(DrawRowParams & p) int LyXText::getLengthMarkerHeight(BufferView * bv, VSpace const & vsp) const { + if (vsp.kind() == VSpace::NONE) + return 0; + int const arrow_size = 4; int const space_size = int(vsp.inPixels(bv)); - if (vsp.kind() != VSpace::LENGTH) { - return space_size; - } - LyXFont font; font.decSize(); int const min_size = max(3 * arrow_size, @@ -3258,6 +3257,9 @@ int LyXText::getLengthMarkerHeight(BufferView * bv, VSpace const & vsp) const int LyXText::drawLengthMarker(DrawRowParams & p, string const & prefix, VSpace const & vsp, int start) { + if (vsp.kind() == VSpace::NONE) + return 0; + int const arrow_size = 4; int const size = getLengthMarkerHeight(p.bv, vsp); int const end = start + size; @@ -3268,10 +3270,11 @@ int LyXText::drawLengthMarker(DrawRowParams & p, string const & prefix, int ty1, ty2; // y-values for bottom arrow int by1, by2; + + str = prefix + " (" + vsp.asLyXCommand() + ")"; + switch (vsp.kind()) { - case VSpace::LENGTH: - { - str = prefix + " (" + vsp.asLyXCommand() + ')'; + case VSpace::LENGTH: { // adding or removing space bool const added = !(vsp.length().len().value() < 0.0); ty1 = added ? (start + arrow_size) : start; @@ -3280,14 +3283,10 @@ int LyXText::drawLengthMarker(DrawRowParams & p, string const & prefix, by2 = added ? end : (end - arrow_size); break; } - case VSpace::VFILL: - str = prefix + _(" (vertical fill)"); + default: ty1 = ty2 = start; by1 = by2 = end; break; - default: - // nothing to draw here - return size; } int const leftx = p.xo + leftMargin(p.bv, p.row); @@ -3307,6 +3306,9 @@ int LyXText::drawLengthMarker(DrawRowParams & p, string const & prefix, start + ((end - start) / 2) + d, str, font); + if (vsp.kind() != VSpace::LENGTH && vsp.kind() != VSpace::VFILL ) + return size; + // top arrow p.pain->line(leftx, ty1, midx, ty2, LColor::added_space); p.pain->line(midx, ty2, rightx, ty1, LColor::added_space); diff --git a/status.13x b/status.13x index b15fa7f869..4f6ea5639d 100644 --- a/status.13x +++ b/status.13x @@ -22,6 +22,9 @@ What's new ** Updates +- when there is vertical space between paragraphs, the amount of space + is also indicated in the small/medium/large case [bug #814] + ** Bug fixes - fix bug where opening the tabular dialog would mark the document as