extensions/source/dbpilots/commonpagesdbp.hxx | 19 ++++++++++++++++++- extensions/uiconfig/sabpilot/ui/optiondbfieldpage.ui | 1 - 2 files changed, 18 insertions(+), 2 deletions(-)
New commits: commit a2e9836a7591e5c018cdb7f6d9e35db3a5853d54 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sun Feb 17 16:35:06 2019 +0000 Commit: Adolfo Jayme Barrientos <fit...@ubuntu.com> CommitDate: Mon Feb 18 02:10:32 2019 +0100 tdf#122305 tdf#122307 wrap label based on current wizard width rather than wrap on 82 characters, which is still too large for the width we are given Change-Id: I8bbb2d06d974f78d442cf59faebd29a8e22d7750 Reviewed-on: https://gerrit.libreoffice.org/67943 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com> diff --git a/extensions/source/dbpilots/commonpagesdbp.hxx b/extensions/source/dbpilots/commonpagesdbp.hxx index 13fac75f5b22..24a9de37317e 100644 --- a/extensions/source/dbpilots/commonpagesdbp.hxx +++ b/extensions/source/dbpilots/commonpagesdbp.hxx @@ -107,7 +107,24 @@ namespace dbp virtual void dispose() override; protected: - void setDescriptionText(const OUString& _rDesc) { m_pDescription->SetText(_rDesc); } + void setDescriptionText(const OUString& rDesc) + { + m_pDescription->set_width_request(-1); + m_pDescription->set_height_request(-1); + + auto nWidthAvail = GetParent()->GetSizePixel().Width(); + + m_pDescription->SetText(rDesc); + + //tdf#122307 wrap based on current wizard width + Size aPrefSize(m_pDescription->get_preferred_size()); + Size aSize(m_pDescription->CalcMinimumSize(nWidthAvail)); + if (aSize.Height() > aPrefSize.Height()) + { + m_pDescription->set_width_request(aSize.Width()); + m_pDescription->set_height_request(aSize.Height()); + } + } // OWizardPage overridables virtual void initializePage() override; diff --git a/extensions/uiconfig/sabpilot/ui/optiondbfieldpage.ui b/extensions/uiconfig/sabpilot/ui/optiondbfieldpage.ui index 70229de48a1a..0f23a27c9d22 100644 --- a/extensions/uiconfig/sabpilot/ui/optiondbfieldpage.ui +++ b/extensions/uiconfig/sabpilot/ui/optiondbfieldpage.ui @@ -19,7 +19,6 @@ <property name="hexpand">True</property> <property name="xalign">0</property> <property name="wrap">True</property> - <property name="max_width_chars">82</property> <accessibility> <role type="static"/> </accessibility> _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits