Bug 96117 - Layout broken in KCMultiDialog
Summary: Layout broken in KCMultiDialog
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Unmaintained
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Frans Englich
URL:
Keywords:
: 97014 97457 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-01-01 17:22 UTC by Gary Cramblitt
Modified: 2005-01-19 23:28 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Layout broken in KTTSMgr (37.92 KB, image/png)
2005-01-01 17:27 UTC, Gary Cramblitt
Details
Layout broken in Kopete settings (39.37 KB, image/png)
2005-01-01 17:29 UTC, Gary Cramblitt
Details

Note You need to log in before you can comment on or make changes to this bug.
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. ***