Adjust the horizontal constraint label margin to equal vertical.

Right now, horizontally placed labels appear more cramped than
those that are placed vertically.
pull/348/head
whitequark 2018-07-31 17:13:39 +00:00
parent 1a2911fb51
commit eda294efb5
7 changed files with 1 additions and 1 deletions

View File

@ -113,7 +113,7 @@ int Constraint::DoLineTrimmedAgainstBox(Canvas *canvas, Canvas::hStroke hcs,
const Camera &camera = canvas->GetCamera();
double th = Style::TextHeight(GetStyle()) / camera.scale;
double pixels = 1.0 / camera.scale;
double swidth = VectorFont::Builtin()->GetWidth(th, Label()) + 4 * pixels,
double swidth = VectorFont::Builtin()->GetWidth(th, Label()) + 8 * pixels,
sheight = VectorFont::Builtin()->GetCapHeight(th) + 8 * pixels;
Vector gu = camera.projUp.WithMagnitude(1),
gr = camera.projRight.WithMagnitude(1);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB