--===============1408391393== Content-Type: multipart/signed; boundary="nextPart3849993.bHJHObLcnY"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart3849993.bHJHObLcnY Content-Type: multipart/mixed; boundary="Boundary-01=_UqbQI23JRziiHhf" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_UqbQI23JRziiHhf Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Friday 30 May 2008, Petri Damst=C3=A9n wrote: > If I do setMinimumSize and applet is smaller than minimum size set applet does the attached patch make it better?=20 (you'll need to recompile your applet, btw, as the patch is BIC.) =2D-=20 Aaron J. Seigo humru othro a kohnu se GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43 KDE core developer sponsored by Trolltech --Boundary-01=_UqbQI23JRziiHhf Content-Type: text/x-patch; charset="us-ascii"; name="applet_geometryChanged.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="applet_geometryChanged.diff" Index: applet.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =2D-- applet.h (revision 814866) +++ applet.h (working copy) @@ -426,13 +426,6 @@ bool isContainment() const; =20 /** =2D * Sets the geometry of this Plasma::Applet. Should not be used = directly by =2D * applet subclasses. =2D * @param geometry the geometry to apply to this Plasma::Applet. =2D */ =2D void setGeometry(const QRectF &geometry); =2D =2D /** * @return a rect of the applet in screen coordinates. */ QRect screenRect() const; @@ -681,11 +674,16 @@ /** * Reimplemented from QGraphicsItem */ =2D void focusInEvent(QFocusEvent * event); + void focusInEvent(QFocusEvent *event); =20 /** * Reimplemented from QGraphicsItem */ + void resizeEvent(QGraphicsSceneResizeEvent *event); + + /** + * Reimplemented from QGraphicsItem + */ QVariant itemChange(GraphicsItemChange change, const QVariant &val= ue); =20 /** Index: applet.cpp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =2D-- applet.cpp (revision 814866) +++ applet.cpp (working copy) @@ -1059,9 +1059,21 @@ //which should be harmless //focusing an applet may trigger this event again, but we won't be= here more than twice } + QGraphicsWidget::focusInEvent(event); } =20 +void Applet::resizeEvent(QGraphicsSceneResizeEvent *event) +{ + QGraphicsWidget::resizeEvent(event); + + if (d->background) { + d->background->resizePanel(boundingRect().size()); + } + + updateConstraints(Plasma::SizeConstraint); +} + void Applet::showConfigurationInterface() { if (!hasConfigurationInterface()) { @@ -1290,6 +1302,9 @@ d->shadow->setVisible(isVisible()); } break; + case ItemPositionHasChanged: + emit geometryChanged(); + break; default: break; }; @@ -1321,24 +1336,6 @@ } } =20 =2Dvoid Applet::setGeometry(const QRectF& geometry) =2D{ =2D QRectF beforeGeom =3D QGraphicsWidget::geometry(); =2D QGraphicsWidget::setGeometry(geometry); =2D if (geometry.size() !=3D beforeGeom.size()) { =2D updateConstraints(Plasma::SizeConstraint); =2D if (d->background) { =2D d->background->resizePanel(boundingRect().size()); =2D } =2D emit geometryChanged(); =2D } else if (geometry.topLeft() !=3D beforeGeom.topLeft()) { =2D /*if (d->background) { =2D kDebug() << QGraphicsWidget::geometry(); =2D }*/ =2D emit geometryChanged(); =2D } =2D} =2D QRect Applet::screenRect() const { QPointF bottomRight =3D pos(); --Boundary-01=_UqbQI23JRziiHhf-- --nextPart3849993.bHJHObLcnY Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQBIQbqU1rcusafx20MRAvMFAJ9R+2goxBwq1tm6oCIR04nY1gNTcwCgk2sR mCk336KtywgAXb7hwPxp9mU= =lnIA -----END PGP SIGNATURE----- --nextPart3849993.bHJHObLcnY-- --===============1408391393== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Panel-devel mailing list Panel-devel@kde.org https://mail.kde.org/mailman/listinfo/panel-devel --===============1408391393==--