Braces and arrows now retain their shape much better when squished into
really narrow insets. And they no longer extend outside such narrow niches.
Before, braces would deform into a completely different shape, and all
of them would extend outside insets narrower than an arrowhead.
Easy test: Put 15 arrows/braces in a row, and resize the main window
smaller till the insets have under 6 pixels each.
No change of format or functionality, just a drawing improvement.
Helge Hafting
Index: InsetSpace.cpp
===================================================================
--- InsetSpace.cpp (revisjon 24695)
+++ InsetSpace.cpp (arbeidskopi)
@@ -240,7 +240,18 @@
int const y0 = y + desc - 1;
int const y1 = y - asc + oddheight - 1;
int const y2 = (y0 + y1) / 2;
- int const xoffset = (y0 - y1) / 2;
+ int xoffset = (y0 - y1) / 2;
+
+ //Two tests for very narrow insets
+ if (xoffset > x1 - x0 && (
+ params_.kind == InsetSpaceParams::LEFTARROWFILL ||
+ params_.kind == InsetSpaceParams::RIGHTARROWFILL))
+ xoffset = x1 - x0;
+ if (xoffset * 6 > (x1 - x0) && (
+ params_.kind == InsetSpaceParams::UPBRACEFILL ||
+ params_.kind == InsetSpaceParams::DOWNBRACEFILL))
+ xoffset = (x1 - x0) / 6;
+
int const x2 = x0 + xoffset;
int const x3 = x1 - xoffset;
int const xm = (x0 + x1) / 2;