summaryrefslogtreecommitdiff
path: root/formula/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-10-14 20:20:45 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-10-15 09:57:36 +0200
commitc418b6fdbefa8d847723a14c25b68bf0c6ac66af (patch)
tree69709623d61e806d289837d60ae34a6dc4431c88 /formula/source
parent4704acf63f4fed3a99fc95ff63c82eb5a9ae3908 (diff)
Resolves: tdf#128140 stabilize formula dialog width
Change-Id: Ifdb80adfd4b399035ed793f8636f31b90cf50094 Reviewed-on: https://gerrit.libreoffice.org/80800 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'formula/source')
-rw-r--r--formula/source/ui/dlg/formula.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index 70e33b0a3df8..5f9a94f42699 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -253,19 +253,21 @@ FormulaDlg_Impl::FormulaDlg_Impl(weld::Dialog& rDialog,
, m_xEdRef(new RefEdit(rBuilder.weld_entry("ED_REF")))
, m_xRefBtn(new RefButton(rBuilder.weld_button("RB_REF")))
{
+ auto nWidth = m_xMEdit->get_approximate_digit_width() * 62;
+
//Space for two lines of text
m_xFtHeadLine->set_label("X\nX\n");
auto nHeight = m_xFtHeadLine->get_preferred_size().Height();
- m_xFtHeadLine->set_size_request(-1, nHeight);
+ m_xFtHeadLine->set_size_request(nWidth, nHeight);
m_xFtHeadLine->set_label("");
m_xFtFuncName->set_label("X\nX\n");
nHeight = m_xFtFuncName->get_preferred_size().Height();
- m_xFtFuncName->set_size_request(-1, nHeight);
- m_xFtFuncDesc->set_size_request(-1, nHeight);
+ m_xFtFuncName->set_size_request(nWidth, nHeight);
+ m_xFtFuncDesc->set_size_request(nWidth, nHeight);
m_xFtFuncName->set_label("");
- m_xMEdit->set_size_request(m_xMEdit->get_approximate_digit_width() * 62,
+ m_xMEdit->set_size_request(nWidth,
m_xMEdit->get_height_rows(5));
m_xEdRef->SetReferences(_pDlg, m_xFtEditName.get());