How can I fix KCMultiDialog so it stops resizing?
Adam Treat
treat at kde.org
Sun Sep 30 00:58:26 BST 2007
On Saturday 29 September 2007, Matthias Kretz wrote:
> On Sunday 30 September 2007, Adam Treat wrote:
> > Konqueror's configuration dialog is not behaving well. It is a
> > KCMultiDialog with several modules loaded. When the dialog is initially
> > shown, the tree widget on the left is not shown, but then pops up a
> > second later. This is visually jarring.
>
> Hmm, you're sure this is a problem with KCMultiDialog? Trying "kcmshell
> fonts style" I don't see this behaviour.
Konq only uses KCMultiDialog and loads various KCModules. So yah, pretty sure
this isn't a KSettings::Dialog only problem.
> AFAIK this is a problem of only KSettings::Dialog. And I sure tried to fix
> it but did not succeed. The issue is lazy initialization: the structure on
> the left is only created in KSettings::Dialog::showEvent (as this is a
> non-spontaneous show it should be called before it is shown). In there it
> first calls setUpdatesEnabled(false), then the pages are filled in and then
> updates are reenabled. Still it does not what I expected.
>
> If the pages are not lazy initialized then the creation of the
> KSettings::Dialog object becomes more expensive, but perhaps that's what we
> need to do?
Yes, I think that is what we need to do. We need to know the
minimumSizeHint() of the entire dialog and the only way to know that is to
create everything.
> > Also, the dialog is initially very small, but when you click on various
> > submodules the dialog grows. This is also not terribly desired behavior.
>
> IMHO that issue needs to be fixed by guidelines for the KCMs.
Ok, so then we still need to know the KCM with the largest minimumSizeHint()
so we can show our dialog at the correct size to begin with. That way it
won't grow any larger when you click around on different KCM's.
Cheers,
Adam
More information about the kde-core-devel
mailing list