[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: How can I fix KCMultiDialog so it stops resizing?
From: Matthias Kretz <kretz () kde ! org>
Date: 2007-09-30 10:48:48
Message-ID: 200709301248.52725.kretz () kde ! org
[Download RAW message or body]
On Sunday 30 September 2007, Adam Treat wrote:
> 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.
Ok, once my KDE installation is usable again I'll take a look.
> > 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.
You want to go a step further and load all KCMs? That's very expensive! I'd
rather have a resizing dialog that shows up in <1s than one that doesn't
resize but takes 10s to pop up.
The only other thing I can think of is to enforce a size of the dialog and
KCMs that don't fit get scrollbars. I find that worse than a resizing dialog,
though.
> 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.
If you have a policy for your KCMs that they have to fit into 400x400, then
you can setGeometry on the dialog so that no resize is necessary. Perhaps
this could use a helper function to make it easier to ignore all the margins
buttons and listview widgets...
--
________________________________________________________
Matthias Kretz (Germany) <><
http://Vir.homelinux.org/
MatthiasKretz@gmx.net, kretz@kde.org,
Matthias.Kretz@urz.uni-heidelberg.de
["signature.asc" (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic