Summary: | Using mouse wheel for changing the volume is confusing | ||
---|---|---|---|
Product: | [Applications] juk | Reporter: | Marco Krohn <marco.krohn> |
Component: | general | Assignee: | Scott Wheeler <wheeler> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Marco Krohn
2003-04-04 17:14:37 UTC
Subject: Re: Using mouse wheel for changing the volume is confusing Actually, I think the default behavior is correct and should be kept concistant with the rest of KDE. Doing the same thing as XMMS isn't important here. As for KSCD, I'm CC'ing that bug and to suggest that the behavior there be changed back to the KDE/Qt default. I just ran this by a couple other developers on IRC and they agreed that both KSCD and JuK should use the default behavior. As for KMix and Noatun, those are verticle sliders and as such perform differently. Also, I think right next to the track position slider, which would keep the default scroll action, this would be even more confusing. I'll poll some others on this before closing it, however. Cheers, -Scott Subject: Re: Using mouse wheel for changing the volume is confusing On Friday 04 April 2003 17:55, Scott Wheeler wrote: > Actually, I think the default behavior is correct and should be kept > concistant with the rest of KDE. Doing the same thing as XMMS isn't > important here. As for KSCD, I'm CC'ing that bug and to suggest that the > behavior there be changed back to the KDE/Qt default. do you agree that it is confusing for a user that mouse wheel "up" means "reduce volume"? Actually a user does not care if the slider is vertical / horizontal etc. "mouser wheel up" = "turn volume up" is simple and should be kept among all applications IMVHO (that's why I cited all the other music applications like xmms, kmix, noatun and I bet that every Windows application will do it the same way). I understand your point about the horizontal slider, but in this case it is counter-intuitive :-( > Also, I think right next to the track position slider, which would keep the > default scroll action, this would be even more confusing. I'll poll some > others on this before closing it, however. I'm cc'ing Aaron from the usability project, because I would like to hear his opinion about that issue--I hope this is o.k. Subject: Re: Using mouse wheel for changing the volume is confusing Quoting Marco Krohn <marco.krohn@gmx.de>: > I understand your point about the horizontal slider, but in this case it > is counter-intuitive :-( > I'm cc'ing Aaron from the usability project, because I would like to > hear his opinion about that issue--I hope this is o.k. Yep, he was CC'ed on the last one since that bug was assigned to him. We've been talking about it on IRC. What we thought would be ideal would be reversing the direction that the mouse wheel works on sliders globally, but we'll see if that works out. Anyway -- more soon. -Scott Subject: kdemultimedia/juk CVS commit by wheeler: Broke down and reversed the mouse wheel on volume slider thingie and fixed a memory leak while I was in there. CCMAIL:56837-done@bugs.kde.org M +21 -4 slideraction.cpp 1.19 --- kdemultimedia/juk/slideraction.cpp #1.18:1.19 @@ -45,9 +45,26 @@ protected: void mousePressEvent(QMouseEvent *e) { if(e->button() == LeftButton) { - QSlider::mousePressEvent(new QMouseEvent(QEvent::MouseButtonPress, e->pos(), MidButton, e->state())); + QMouseEvent reverse(QEvent::MouseButtonPress, e->pos(), MidButton, e->state()); + QSlider::mousePressEvent(&reverse); emit sliderPressed(); } - else if(e->button() == MidButton) - QSlider::mousePressEvent(new QMouseEvent(QEvent::MouseButtonPress, e->pos(), LeftButton, e->state())); + else if(e->button() == MidButton) { + QMouseEvent reverse(QEvent::MouseButtonPress, e->pos(), LeftButton, e->state()); + QSlider::mousePressEvent(&reverse); + } + } +}; + +class VolumeSlider : public QSlider +{ +public: + VolumeSlider(QWidget *parent, const char *name) : QSlider(parent, name) {} + +protected: + void wheelEvent(QWheelEvent *e) { + QWheelEvent transposed(e->pos(), -(e->delta()), e->state(), e->orientation()); + + QSlider::wheelEvent(&transposed); +// QSlider::wheelEvent(new QWheelEvent(e->pos(), -(e->delta()), e->state(), e->orientation())); } }; @@ -118,5 +135,5 @@ QWidget *SliderAction::createWidget(QWid m_layout->addWidget(m_trackPositionSlider); - m_volumeSlider = new QSlider(base, "volumeSlider" ); + m_volumeSlider = new VolumeSlider(base, "volumeSlider"); m_volumeSlider->setMaxValue(100); QToolTip::add(m_volumeSlider, i18n("Volume")); |