summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Lima <rafael.palma.lima@gmail.com>2021-02-13 16:43:01 +0100
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2021-02-24 15:21:08 +0100
commit1f5dfe691540d69665d417fd8c454d4980e9c1d6 (patch)
treefa7282b42f6d58035163c5953af17c6ccdea6ebb
parent02bdcf33426627af812a89f5f5fa3adcb979ea6f (diff)
Resolves tdf#140221 auto-adjust Formula Editor width
Currently the formula editor uses a fixed width that corresponds to about half the size of the display. This patch makes the formula editor auto adjust. Change-Id: I0cd6a6385b698fced96132a636df2d24c6c62cf1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110858 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Reviewed-by: Rafael Lima <rafael.palma.lima@gmail.com> Reviewed-by: Dante DM <dante19031999@gmail.com> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
-rw-r--r--starmath/source/edit.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx
index a425e20f4b0e..64d1fc34757e 100644
--- a/starmath/source/edit.cxx
+++ b/starmath/source/edit.cxx
@@ -294,6 +294,10 @@ void SmEditWindow::Resize()
if (pEditView)
{
+ // Resizes the edit engine to adjust to the size of the output area
+ const Size aSize( pEditView->GetOutputArea().GetSize() );
+ pEditView->GetEditEngine()->SetPaperSize(aSize);
+
pEditView->SetOutputArea(AdjustScrollBars());
pEditView->ShowCursor();