From: A. V. Lukyanov Date: Thu, 11 Aug 2016 07:57:27 +0000 (+0300) Subject: Fix multiline textedit not expanding on OS X X-Git-Tag: 0.12.5~56 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=0654be58bedc77c9aa67d5eea853a7ef53d41806;hp=442fb194b920c1b1aab0cdc3239e1863d3b74c4d Fix multiline textedit not expanding on OS X Fixes #1212. Resolves GH-240. (cherry picked from commit 03d1b64ddb8638465eafb4dca2dfd592739603cf) --- diff --git a/src/uisupport/multilineedit.cpp b/src/uisupport/multilineedit.cpp index 37f1f62a..848e12c6 100644 --- a/src/uisupport/multilineedit.cpp +++ b/src/uisupport/multilineedit.cpp @@ -176,7 +176,11 @@ void MultiLineEdit::updateSizeHint() opt.lineWidth = lineWidth(); opt.midLineWidth = midLineWidth(); opt.state |= QStyle::State_Sunken; - QSize s = style()->sizeFromContents(QStyle::CT_LineEdit, &opt, QSize(100, h).expandedTo(QApplication::globalStrut()), this); + QWidget *widget = this; +#ifdef Q_OS_MAC + widget = 0; +#endif + QSize s = style()->sizeFromContents(QStyle::CT_LineEdit, &opt, QSize(100, h).expandedTo(QApplication::globalStrut()), widget); if (s != _sizeHint) { _sizeHint = s; updateGeometry();