diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-09-30 14:18:29 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-10-01 09:53:15 +0200 |
commit | f6a2b24ce17293043f7ddbed0bc218264be6487d (patch) | |
tree | 97b819d25187df55de268e0ff301bbd418e6f114 /cui/source/tabpages/autocdlg.cxx | |
parent | e6e14b2cafd24179f8675350749878da77a31443 (diff) |
autocorrect dialog width grows on change of new to replace
the sizegroup isn't working as I'd expect, so just make the replace button
visible, get the preferred width of the buttonbox, lock that down then hide the
place button and the container will stay at the max width that will be
wanted
Change-Id: Idfe632aa5af404abb92fc8f7267f0dda5cdbe295
Reviewed-on: https://gerrit.libreoffice.org/79862
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui/source/tabpages/autocdlg.cxx')
-rw-r--r-- | cui/source/tabpages/autocdlg.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index b9a74380d294..d95471f14b0f 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -669,9 +669,17 @@ OfaAutocorrReplacePage::OfaAutocorrReplacePage(weld::Container* pPage, weld::Dia , m_xNewReplacePB(m_xBuilder->weld_button("new")) , m_xReplacePB(m_xBuilder->weld_button("replace")) , m_xDeleteReplacePB(m_xBuilder->weld_button("delete")) + , m_xButtonBox(m_xBuilder->weld_container("buttonbox")) { sNew = m_xNewReplacePB->get_label(); sModify = m_xReplacePB->get_label(); + + // lock down the width of the button box to its max + // desired width + auto nMaxWidth = m_xButtonBox->get_preferred_size().Width(); + m_xButtonBox->set_size_request(nMaxWidth, -1); + m_xReplacePB->hide(); + // tdf#125348 set some small but fixed initial width size, final width will // depend on the size of the entry boxes m_xReplaceTLB->set_size_request(42, m_xReplaceTLB->get_height_rows(10)); |