vcl/source/control/edit.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
New commits: commit 0fcf74d203d97b7e829e72b7e55782d86a048802 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Jul 25 12:08:37 2013 +0100 Related: fdo#61544 don't include border size twice in edit optimal size CalcSize calls CalcWindowSize, but we will call that also in GetOptimalSize, so undo the first one with CalcOutputSize. This makes the editboxes especially less tall under MacOSX Change-Id: Ibbbf5a30e0c640744b1a979937301f87d250873a diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index 260cdaa..545fb27 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -2855,7 +2855,9 @@ Size Edit::CalcMinimumSizeForText(const OUString &rString) const Size aSize; if (mnWidthInChars != -1) { - aSize = CalcSize(mnWidthInChars); + //CalcSize calls CalcWindowSize, but we will call that also in this + //function, so undo the first one with CalcOutputSize + aSize = CalcOutputSize(CalcSize(mnWidthInChars)); } else { @@ -2868,9 +2870,13 @@ Size Edit::CalcMinimumSizeForText(const OUString &rString) const aSize.Height() = GetTextHeight(); aSize.Width() = GetTextWidth(aString); aSize.Width() += ImplGetExtraOffset() * 2; + // do not create edit fields in which one cannot enter anything // a default minimum width should exist for at least 3 characters - Size aMinSize(CalcSize(3)); + + //CalcSize calls CalcWindowSize, but we will call that also in this + //function, so undo the first one with CalcOutputSize + Size aMinSize(CalcOutputSize(CalcSize(3))); if (aSize.Width() < aMinSize.Width()) aSize.Width() = aMinSize.Width(); }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits