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
|
@ -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);
|
||||
|
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |