[Libreoffice-commits] core.git: extensions/source extensions/uiconfig
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sun Feb 17 21:18:36 UTC 2019
extensions/source/dbpilots/commonpagesdbp.hxx | 19 ++++++++++++++++++-
extensions/uiconfig/sabpilot/ui/optiondbfieldpage.ui | 1 -
2 files changed, 18 insertions(+), 2 deletions(-)
New commits:
commit 3bb5e0c6dc5f069b8af39cdb669913e286a294fd
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Feb 17 16:35:06 2019 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Feb 17 22:18:15 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/67942
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <tietze.heiko at gmail.com>
Tested-by: Heiko Tietze <tietze.heiko at gmail.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>
More information about the Libreoffice-commits
mailing list