From 731ccc9f4194b915a455eaf428bfa74dcf7f1560 Mon Sep 17 00:00:00 2001 From: Rob Scheepmaker Date: Fri, 7 Nov 2008 18:16:35 +0000 Subject: [PATCH] Work around a bug in QGL. This will make extenders contained in applets on the desktop appear correctly, and, as opposed to an earlier attempt, doesn't interfere with applets like analog clock. svn path=/trunk/KDE/kdelibs/; revision=881297 --- extender.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/extender.cpp b/extender.cpp index 26455a489..a4985f6e3 100644 --- a/extender.cpp +++ b/extender.cpp @@ -431,13 +431,20 @@ void ExtenderPrivate::updateBorders() void ExtenderPrivate::adjustSize() { + //FIXME: what happens in this function are some nasty workarounds for a bug in qt4.4's QGL. + //Alexis has told me they are working on a fix for qt4.5, so this can be removed once the bug + //has been fixed in Qt. if (q->layout()) { q->layout()->updateGeometry(); - //FIXME: for some reason the preferred size hint get's set correctly, - //but the minimumSizeHint doesn't. Investigate why. q->setMinimumSize(q->layout()->preferredSize()); } + if (applet->layout()) { + applet->layout()->updateGeometry(); + applet->setMinimumSize(applet->preferredSize()); + applet->adjustSize(); + } + emit q->geometryChanged(); }