Public feed #888823

resizable Plasma::Lineedit

public diff v1 · immutable
Raw Edit
·published 2008-02-02 12:54 UTC
rendered paste body
Index: lineedit.cpp===================================================================--- lineedit.cpp	(revision 769878)+++ lineedit.cpp	(working copy)@@ -39,7 +39,7 @@ {     public:         Private()-             : styled(true), multiline(false) {}+             : styled(true), multiline(false), maxHeight(0) {}          QString defaultText;         QString oldText;@@ -47,6 +47,7 @@          bool styled;         bool multiline;+        qreal maxHeight;  }; @@ -141,7 +142,11 @@  QSizeF LineEdit::maximumSize() const {-    return minimumSize();+    if (d->multiline) {+        return QSizeF(minimumSize().width(), d->maxHeight);+    } else {+        return minimumSize();+    } }  bool LineEdit::hasHeightForWidth() const@@ -177,6 +182,7 @@ void LineEdit::setGeometry(const QRectF& geometry) {     prepareGeometryChange();+    d->maxHeight = geometry.height();     setTextWidth(geometry.width());     setPos(geometry.topLeft());     update();