[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdemultimedia/kmix
From: Diego Iastrubni <elcuco () kdemail ! net>
Date: 2004-10-11 6:27:25
Message-ID: 20041011062725.BBC2A16B68 () office ! kde ! org
[Download RAW message or body]
CVS commit by iastrubni:
fix for bug #91013
the sound balance bar is reversed in RTL desktops
M +11 -1 kmixerwidget.cpp 1.70
M +1 -0 kmixerwidget.h 1.34
--- kdemultimedia/kmix/kmixerwidget.cpp #1.69:1.70
@@ -27,4 +27,5 @@
#include <qstring.h>
#include <qtooltip.h>
+#include <qapplication.h> // for QApplication::revsreseLayout()
// KDE
@@ -160,5 +161,5 @@ void KMixerWidget::createLayout(ViewBase
balanceAndDetail->addSpacing( 10 );
- connect( m_balanceSlider, SIGNAL(valueChanged(int)), _mixer, SLOT(setBalance(int)) );
+ connect( m_balanceSlider, SIGNAL(valueChanged(int)), this, SLOT(balanceChanged(int)) );
QToolTip::add( m_balanceSlider, i18n("Left/Right balancing") );
@@ -277,4 +278,13 @@ void KMixerWidget::toggleMenuBarSlot() {
}
+// in RTL mode, the slider is reversed, we cannot just connect the signal to setBalance()
+// hack arround it before calling _mixer->setBalance()
+void KMixerWidget::balanceChanged(int balance)
+{
+ if (QApplication::reverseLayout())
+ balance = -balance;
+
+ _mixer->setBalance( balance );
+}
#include "kmixerwidget.moc"
--- kdemultimedia/kmix/kmixerwidget.h #1.33:1.34
@@ -88,4 +88,5 @@ class KMixerWidget : public QWidget
private slots:
//void updateBalance();
+ void balanceChanged(int balance);
private:
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic