Support marquee scrolling text displays when text is too large for widget

Reported by RJ Ryan on 2010-11-24
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

It would be nice if we could support an option for the text widgets that when the text they contain overflows their size, the widget would scroll the text marquee-style.

RJ Ryan (rryan) on 2010-11-24
Changed in mixxx:
status: New → Confirmed
importance: Undecided → Wishlist
tags: added: easy weekend
Matt Miller (mthwmil) wrote :

I've attached a patch that implements this using a QTimer to shift the visible text over one character every 250 milliseconds.

This will also add a "..." to the end when the string it too long for a label

Matt Miller (mthwmil) wrote :

I just caught a mistake I made in the patch (it didn't tell the WLabel object that a track was unloaded, so moving the mouse over a previously loaded deck would display the track title again...)

Also, the fix works by catching the enter event and leave event in the WLabel class (so holding the mouse over the label causes it to scroll). This also changes the implementation of the WtrackText and WTrackProperty classes to inform the Wlabel class (that might need review, I'm not sure if it's "ok" to do that).

Owen Williams (ywwg) wrote :

This looks like a nice patch. In general Mixxx tries to avoid using timers for anything, because they can potentially cause thread priority issues. If there's any way you can think of implementing this without using a timer, that would be preferred. You might scroll based on visual_playposition or something.

(Once Mixxx gets a real internal timing system, this will get a lot easier)

RJ Ryan (rryan) wrote :

I'll just copy/paste what I posted to mixxx-devel:

visual_playpos is not really that great of a control to hook for doing marquee scrolling because they only update when the player is moving. So if all the players are stopped then the marquee animation will also be stopped.

I haven't responded to the bug yet but I think that a QTimer approach might be fine to stick with for now.

We have a global ~40fps timer that is used to update the waveforms. It is created in src/waveformviewerfactory.cpp. Code-plumbing wise, it will be a little tricky/ugly to get this timer and hook it to widgets other than waveforms. Furthermore, to support marquee scrolling of any widget, we would need to connect this high-ish speed timer to every widget. I'm not sure that's a good thing CPU-wise because it means that every widget will run some handler code (even if it's a no-op) at 40fps. So for now, I'd rather not play with trying to hook this up.

Changed in mixxx:
milestone: none → 1.11.0
RJ Ryan (rryan) on 2012-11-21
Changed in mixxx:
milestone: 1.11.0 → 1.11.1
Mina Nagy (mnzaki) wrote :

Are the thread priority issues mentioned in comment #4 still relevant? I'd like to make an attempt at this, any further info?

Changed in mixxx:
assignee: nobody → Mina Nagy (mnzaki)
Mina Nagy (mnzaki) on 2013-05-05
Changed in mixxx:
assignee: Mina Nagy (mnzaki) → nobody
Leo Combes (combesl) wrote :

Is there any way to know the width in pixels of the text title of the song, once it is loaded?
This is necessary to determine if the text overflows the textbox size.

Daniel Schürmann (daschuer) wrote :

Hi Leo,

Qt has the QFontMetrics Class.
It is already used in Mixxx
I hope that helps.

Please assign the bug to yourself, if you are planning to work on it.
Thank you.

Kind regards.


RJ Ryan (rryan) on 2014-03-15
Changed in mixxx:
milestone: 1.11.1 → none
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers