kdelibs Layout Bug?

Gary Cramblitt garycramblitt at comcast.net
Fri Dec 31 15:08:54 GMT 2004


On Wednesday 22 December 2004 14:58, Mauricio Bahamonde wrote:
> Hi,
>
>       Since about a month, some KDE HEAD apps experience a bug in layouts. 
So
> far, I've been able to find this bug in 2 apps so far: Kopete and KTTSMgr.
> As far as I know, Kopete and KTTSMgr use KSysTrayApplets running a
> KCMultiDialog(i'm not very sure about this), where the bug seems to happen.
> The bug is as follows: you click on the systray icon of the app, and the
> layout is broken, but if you resize the dialog a little, of maximize it,
> then the layout is fixed. However, next time you click on the systray icon,
> the bug appears again.
> I'm not very sure if this is a bug related to this apps, or a bug related
> to some layout problem in kdelibs, but I ask here just to be sure.

See Mauricio's earlier message for screen shots.

I've narrowed the problem down to the following four statements in 
kdelibs/kutils/kmoduleproxcy.cpp:

 d->view->addChild( d->kcm );
        d->kcm->resize(d->kcm->minimumSizeHint());
        d->view->resize(d->kcm->size());
        const_cast<KCModuleProxy*>(this)->setMinimumSize(d->view->size());

in method realModule().  If I comment out the third statement, the 
misbehaviour goes away.  Effectively, this statement sets the QScrollView 
size to the minimumSizeHint of my module, which is far smaller than the 
KCMultiDialog size (640x480).

Please, can someone more knowledgeable take a look at this and fix before 3.4 
release, or offer a workaround, as this problem makes my app (KTTSMgr) look 
very unprofessional.

BTW, there is another problem with KCMultiDialog.  The dialog cannot be 
horizontally resized smaller than 640.  There are these two comments in the 
code:

 - Resizing horizontally is contrained; minimum size is set somewhere. 
  It appears to be somehow derived from the module's size.

It appears to me that it is actually constrained somehow to the 
setInitialSize(QSize(640,480)) which is called in KCMultiDialog::init().

Thanks.
-- 
Gary Cramblitt (aka PhantomsDad)
KDE Text-to-Speech Maintainer
http://accessibility.kde.org/developer/kttsd/index.php




More information about the kde-core-devel mailing list