n2a icon indicating copy to clipboard operation
n2a copied to clipboard

UI: Equation tree should scroll to edit full height of field

Open frothga opened this issue 5 years ago • 1 comments

When font scale (Settings:Look & Feel) is set larger than 1, and edit takes place right at bottom of viewport, equation tree does not scroll far enough to show a full line of the entire cell editor. It is possible to manually scroll (with mouse scroll wheel) during editing, but this is annoying. The cell editor gets inserted at full size, so that is not a problem.

A related problem is that only the first line of the multi-line editor is shown.

Part of the problem is the sequencing in BasicTreeUI.startEditing(). It first scrolls to visible, then determines size of cell editor. To hack around this, we could temporarily set the cell renderer to be the same size as the cell editor.

frothga avatar Apr 03 '20 22:04 frothga

Actually, the problem is that when the tree is measuring height of a new cell, the text is empty, so only the icon determines height. Added a hack to put an "M" in temporarily in this case.

Cutting off the bottom of the multi-line editor is still an issue.

frothga avatar Apr 03 '20 23:04 frothga