Commit Graph

6 Commits

Author SHA1 Message Date
Pavel Sanda
c17f706a1c * status file 2018-02-15 21:48:47 +01:00
Jean-Marc Lasgouttes
c8230ab0d0 Merge remote-tracking branch 'features/properpaint' into 2.3.2-staging
This makes sure that painting actually happens at paint events, making
display more fluid.
2018-02-15 14:57:53 +01:00
Pavel Sanda
abdadcceb9 * status.23x 2018-02-15 11:56:49 +01:00
Jean-Marc Lasgouttes
2e1863b704 Implement display of roots more faithfully
This is a follow-up to 758de957.

- unify the metrics and drawing of \sqrt and \root using helper
  functions mathed_root_metrics and mathed_draw_root.

- compute the vertical spacing above the nucleus of the root following
  rule 11 of the TeXbook. In particular, it is different in inline and
  display style.

- draw the root glyph without hard-coded pixel values. Make the line
  width depend on the zoom.

more work is needed to implement properly rule 11:

- Ideally, we should use sqrt glyphs from the math fonts. Note that
  then we would get rule thickness from there.

- The positioning of the root MathData is arbitrary. It should
  follow the definition of \root...\of... in The Texbook in
  Apprendix B page 360.

Fixes bug #10814.

(cherry picked from commit 16af6e7c50)
(cherry picked from commit 6cb6f78ae9)
2018-02-15 11:34:00 +01:00
Jean-Marc Lasgouttes
1dc134fb60 Improve UndoGroupHelper and use it more
Now the helper class contains logic that checks whether buffer are
known before closing them. This avoids potential crashes.

Use it in different places to siplify code. It is not clear at this
point whether it should be used everywhere.

Followup to bug #10847.

(cherry picked from commit cd9e42dc35)
2018-02-15 10:36:17 +01:00
Jean-Marc Lasgouttes
5f6c681b76 Handle properly top/bottom of inset with mac-like cursor movement
The correct behavior is to go to position 0 going up from first row,
and to end of row when going down on last row.

The targetx value of the cursor is not updated, which makes cursor
movement more natural.

Fixes bug #10701.

(cherry picked from commit 34285cc683)
2018-02-14 17:06:03 +01:00