Tool tips not displayed for some elements

Bug #605517 reported by jus
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Undecided
RJ Skerry-Ryan
1.7
Won't Fix
Undecided
Unassigned
1.8
Fix Released
Undecided
RJ Skerry-Ryan

Bug Description

Mixxx Trunk "(bzr r2432; built on: Jul 14 2010 ; flags: hifieq vinylcontrol midiscript optimize=1 qdebug)
Tested on Mac OS 10.5 & 10.6

Preferences->Interface->Tooltips->On

The tool tips are set in skin.xml

Affected elements (Tool tips not displayed):
*BPM text
*Pitch rate text
*Playing position/ Duration text
*Track name / Artist text
*(big) Waveforms

This seems broken even in 1.8 beta1 & 1.7.2 on all current skins, all of them have tool tips applied in skin.xml.

Related branches

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

I just fixed this. One side effect for Jus's skins is that the use of the <Style> element causes the tooltip to be styled as well. You can fix this by taking a <Style> tag like this:

<Style>font: bold 16px/18px Lucida Grande, Lucida Sans Unicode, Arial, Verdana, sans-serif;
background-color: transparent; color: #E17800; text-align: left;padding-left: 1%;</Style>

And converting it to be:

<Style>QLabel { font: bold 16px/18px Lucida Grande, Lucida Sans Unicode, Arial, Verdana, sans-serif;
background-color: transparent; color: #E17800; text-align: left;padding-left: 1%; }</Style>

That CSS selector will ensure that only QLabel's are affected. You can style the Tooltip by using a QToolTip selector:

<Style>
QLabel { font: bold 16px/18px Lucida Grande, Lucida Sans Unicode, Arial, Verdana, sans-serif;
background-color: transparent; color: #E17800; text-align: left;padding-left: 1%; }
QToolTip { background-color: red; }
</Style>

Changed in mixxx:
status: New → Fix Committed
assignee: nobody → RJ Ryan (rryan)
Revision history for this message
jus (jus) wrote :

Thanks for the fix. Just applied the necessary changes to the skins.

Styling the Tooltips sounds good, but if then for all elements.
I tried to apply the example in the form <Style>QToolTip { background-color: red; }</Style> on other elements with Tooltips too, like the Crassfader with no success. Is this even possible?

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Oops, I only added <Style> for the NumberPos NumberRate NumberBpm and Label widgets. I just added it to the base widget so it should work for every widget now.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

I tested that styling the crossfader's tooltip works properly, but let me know if other widgets don't work.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Verified Knob PushButton SliderComposed VuMeter NumberPos NumberRate NumberBpm Label Visual Overview StatusLight

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

In case you haven't seen it, this reference (http://doc.trolltech.com/4.5/stylesheet-reference.html) is very useful for dealing with Qt Style Sheets. Confusingly though, it claims that QToolTip supports the background-color attribute but it does not seem to work on Linux, the background is always black even if I put QToolTip { background-color: #FFFFFF; }. The other attributes seem to work for me, though.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Uh, strangely adding a 0px border causes the background-color to work. Go figure.

QToolTip { background-color: green; color: #0000FF; border: 0px solid white; }

Revision history for this message
jus (jus) wrote :

Just added the custom tooltips to http://bazaar.launchpad.net/~jus/mixxx/skins/revision/2430.
Tested and working for OSX (see picture). Please check if its look nice on Win/Lin too.

FYI:
The library tooltips (e.g. when hovering over "Artist" )are not customizable yet. But so is the whole library.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Hmm, well if I'm opening the floodgates to <Style> tags I might as well add it to the Library as well.

Using the <Style> on the library seems to break the <BgColor><FgColor><BgColorRowEven> and <FgColorRowEven> tags so you will need to do these with QSS:

Here is an example of various handy selectors to play with:

                <Style>
                  WLibrarySidebar { background: black; color: purple; } /* Specifically select the sidebar for skinning */
                  QLabel { color: pink; } /* The label on the AutoDJ page can be styled with this. It doesn't have a good name as the analyze ones do below */
                  QPushButton { background: red; } /* Style all buttons eg AutoDJ enable button and Analyze button */
                  QTableView { background: red; } /* The Browse Feature uses a QTableView, not a WTrackTableView */
                  QRadioButton { color: purple; background: red; } /* Style radio buttons such as those in the Analyze section */
                  #radioButtonRecentlyAdded { background-color: blue; } /* The specific name of the recently added radio */
                  #radioButtonAllSongs { } /* The specific name of the all songs radio button */
                  #pushButtonSelectAll { } /* The name of the select all push button in analyze */
                  #pushButtonAnalyze { } /* The name of the analyze button in the analyze view */
                  WTrackTableViewHeader { color: red; } /* This is the QHeaderView applied to all WTrackTableViews */
                  WTrackTableView { background: black; alternate-background-color: grey; } /* The WTrackTableView is the table that all mixxx tracks are in */
                  QToolTip { background-color: red; color: #0000FF; border-radius: 10px; } /* This styles all tooltips within the library */
                  WSearchLineEdit { background: pink; color: green; } /* This styles the QLineEdit that is the search box */
                </Style>

You can also style scrollbars like this:
http://doc.trolltech.com/4.5/stylesheet-examples.html#customizing-qscrollbar

Unfortunately there is no good way to style the help text on the Crate or Playlist pages.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

If you want to style the track table and the browse feature at the same time, I would just use the QHeaderView and QTableView selectors instead of the specific WTrackTableViewHeader and WTrackTableView.

Let me know if something is not styling correctly. There might be a code issue causing it.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

I was wrong about the Crate and Playlist help pages.

QTextBrowser { background: yellow; color: blue; }

Revision history for this message
jus (jus) wrote :

Thanks for document all that stuff, a lot can be done with styles.

For now I have only re-modeled the current look of the respective skins library with QSS.
Dont want to accidentally break some stuff so close to release.
Also the library tooltips are now consistent with the rest.

One problem i found is that the colour scheme support is broken for the library when using <Style>. E.g when switching from 11PM to 5 PM scheme with the Outline skin.

Have not pushed the skins update yet to LP because of this.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Oops, should have tested that. I've added a workaround that should fix that issue.

Revision history for this message
jus (jus) wrote :

Tested your fix, colour scheme working again for legacy skins.

I stripped all <Styles> (except for tooltips) from those skins, looks nearly like before.
Only thing is the text beside "Enable Auto DJ" button which seem forgotten (see picture).

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Ok, labels and radio buttons in Analyze and AutoDJ should be fine now.

Revision history for this message
jus (jus) wrote :

This is getting confusing.
Now the #14 error is fixed but the previous working Playlist & Crates pages have errors (see picture).

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Not confusing at all, just more sloppiness on my part :).

It should be fixed now (fingers crossed).

RJ Skerry-Ryan (rryan)
Changed in mixxx:
status: Fix Committed → Fix Released
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/5458

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.