[Libreoffice-commits] core.git: formula/source formula/uiconfig
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue Oct 15 07:58:38 UTC 2019
formula/source/ui/dlg/formula.cxx | 10 ++++++----
formula/uiconfig/ui/formuladialog.ui | 6 +++---
2 files changed, 9 insertions(+), 7 deletions(-)
New commits:
commit c418b6fdbefa8d847723a14c25b68bf0c6ac66af
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Oct 14 20:20:45 2019 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Oct 15 09:57:36 2019 +0200
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 at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
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());
diff --git a/formula/uiconfig/ui/formuladialog.ui b/formula/uiconfig/ui/formuladialog.ui
index 7c88ecd3944b..46d92697bdb6 100644
--- a/formula/uiconfig/ui/formuladialog.ui
+++ b/formula/uiconfig/ui/formuladialog.ui
@@ -339,7 +339,7 @@
<object class="GtkLabel" id="headline">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="halign">start</property>
+ <property name="hexpand">True</property>
<property name="wrap">True</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
@@ -356,7 +356,7 @@
<object class="GtkLabel" id="funcname">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="halign">start</property>
+ <property name="hexpand">True</property>
<property name="wrap">True</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
@@ -370,7 +370,7 @@
<object class="GtkLabel" id="funcdesc">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="halign">start</property>
+ <property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="wrap">True</property>
<property name="xalign">0</property>
More information about the Libreoffice-commits
mailing list