Summary: | Clicks on the slider do not seek the song enough | ||
---|---|---|---|
Product: | noatun | Reporter: | shu |
Component: | hayes | Assignee: | Neil Stevens <neil> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | Calls setSteps on the slider |
Description
shu
2003-06-27 04:22:46 UTC
Huh, indeed. Maybe a bug in this L33tSlider thing? Didn't investigate yet. Created attachment 1979 [details]
Calls setSteps on the slider
It's just a oneline patch that calls setSteps to set the pageStep of the
L33tSlider. The person who implemented the slider for Hayes used the (QObject
*, const char *) ctor instead of the one where you specify range and pageStep.
As a result, the pageSteps never got set? I don't know the workings of
L33tSlider, but this patch does what I want it to.
If length / 10 is okay with everyone for the pageStep, I'll close this bug.
Subject: kdeaddons/noatun-plugins/hayes CVS commit by neil: Set a range like Excellent does so that clicks will seek a decent amount. CCMAIL: 60406-done@bugs.kde.org M +6 -3 window.cpp 1.38 --- kdeaddons/noatun-plugins/hayes/window.cpp #1.37:1.38 @@ -99,5 +99,5 @@ Hayes::Window::Window() (void)new KAction(i18n("About Hayes..."), 0, this, SLOT(aboutHayes(void)), actionCollection(), "abouthayes"); - slider = new L33tSlider(0, "seek-slider"); + slider = new L33tSlider(0, 1000, 10, 0, L33tSlider::Horizontal, this, "seek-slider"); slider->setOrientation(Horizontal); connect(slider, SIGNAL(userChanged(int)), SLOT(sliderChanged(int))); @@ -191,5 +191,5 @@ void Hayes::Window::init(void) void Hayes::Window::sliderChanged(int value) { - napp->player()->skipTo(value); + napp->player()->skipTo(value * 1000); QToolTip::add(slider, i18n("Seek: %1").arg( napp->player()->lengthString())); @@ -209,5 +209,8 @@ void Hayes::Window::updateSlider() { if (!napp->player()->isStopped()) - slider->setValue(napp->player()->getTime()); + { + slider->setRange(0, napp->player()->getLength() / 1000); + slider->setValue(napp->player()->getTime() / 1000); + } QToolTip::add(slider, i18n("Seek: %1").arg( napp->player()->lengthString())); |