[PATCH] Fixing the KMix applet

Andras Mantia amantia at kde.org
Sun Nov 23 17:20:09 GMT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sunday 23 November 2003 18:39, Christian Esken wrote:
> >3. After restarting KDE or kicker the mixer applet was very wide, there
> > was
>
> Nice. These fix ugly bugs.
>
> >-       updateSize(true);
> >+       updateSize(false);
>
> Why do you need to change this?
To fix the above problem.

> And are you aware that kmixerwidget.cpp is not only part of the applet, but
> of the main application itself? This change could screw up resizing the
> main window (especially after enabling/disabling the "Advanced" checkbox).
No... Well, changing true to false solves the applet is too wide problem. It
may be not the best solution.

> > -      emit updateLayout();
> > +      QTimer::singleShot(0, m_mixerwidget, SLOT(updateSize()));
>
> I think this might OK, but why is it neccesary? And wouldn't it then be
> neccesary for MixDeviceWidget::setStereoLinked() too?
I don't know. I just looked at the functions involved in channel
hiding/showing. If the updateSize() call is not delayed, the hide()/show() in
the MixDeviceWidget::setDisabled() may not be executed when the
KMixerWidget::updateSize() is called, and the layout() width will be still
wrong. This causes the bug that the last channel is not visible even after
you enable it, only if you hide another channel. Restoring the other channel
hides the last one again, as the minimum width is too small. Enable the debug
line in KMixerWidget::updateSize() and you will see what does the
layout()->minimumSize().width() contain after hiding/showing channels.

Now I looked at the setStereoLinked() and yes, it seems that it needs to be 
done also there. Or use the same trick as with 
KKMixApplet::triggerUpdateLayout / KMixApplet::updateLayoutNow.

Andras

>
> Chris

- --
Quanta Plus developer - http://quanta.sourceforge.net
K Desktop Environment - http://www.kde.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)

iD8DBQE/wOxJTQdfac6L/08RAiEVAKC1kH0uz/cYO747roI5P6NgBeSNYACcDoxi
ERBzAcFYXXnwp3wpPCTTfMQ=
=tW8X
-----END PGP SIGNATURE-----




More information about the kde-core-devel mailing list