Bug 96117

Summary: Layout broken in KCMultiDialog
Product: [Unmaintained] kdelibs Reporter: Gary Cramblitt <garycramblitt>
Component: generalAssignee: Frans Englich <frans.englich>
Status: RESOLVED FIXED    
Severity: normal CC: ismail, s.dem, sven.burmeister
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Layout broken in KTTSMgr
Layout broken in Kopete settings

Description Gary Cramblitt 2005-01-01 17:22:31 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          3.3.4 
OS:                Linux

Since about two months, there is a layout problem with KCMultiDialog. It appears in my app (KTTSMgr), and also in Kopete, and may appear in other apps as well.  The bug is as follows: Start app, layout is OK. Minimize to system tray.  Click on the systray icon of the app, and the layout is broken, but if you resize the dialog a little, or maximize it, then the layout is fixed. However, next time you click on the systray icon, the layout is broken again.  KTTSMgr is a KCMultiDialog running from a KSysTrayApplet.  Screenshots to be attached.

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 misbehavior 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.
Comment 1 Gary Cramblitt 2005-01-01 17:27:24 UTC
Created attachment 8878 [details]
Layout broken in KTTSMgr
Comment 2 Gary Cramblitt 2005-01-01 17:29:10 UTC
Created attachment 8879 [details]
Layout broken in Kopete settings

I am assuming that Kopete also uses a KCMultiDialog?
Comment 3 Ismail Donmez 2005-01-09 20:46:00 UTC
CVS commit by cartman: 


Fix layout problems with kcmultidialog. Fixes config dialogs of kmail,kopete,kttsmgr,...
Not sure this is the best fix but it fixes symptoms for me and others. Also Frans seems to be
missing.
BUG:96117


  M +2 -1      kcmoduleproxy.cpp   1.6


--- kdelibs/kutils/kcmoduleproxy.cpp  #1.5:1.6
@@ -207,5 +207,6 @@ KCModule * KCModuleProxy::realModule() c
                 d->view->addChild( d->kcm );
                 d->kcm->resize(d->kcm->minimumSizeHint());
-                d->view->resize(d->kcm->size());
+                // FIXME: WTF?  Bug# 96117.
+                // d->view->resize(d->kcm->size());
                 const_cast<KCModuleProxy*>(this)->setMinimumSize(d->view->size());
 


Comment 4 Olivier Goffart 2005-01-14 19:49:40 UTC
*** Bug 97014 has been marked as a duplicate of this bug. ***
Comment 5 Olivier Goffart 2005-01-19 23:28:36 UTC
*** Bug 97457 has been marked as a duplicate of this bug. ***