Library preview button and BPM widget don't style correctly

Bug #1296308 reported by Owen Williams
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Low
RJ Skerry-Ryan

Bug Description

The library preview button has the following code to set the background color when the widget is selected:

if (option.state == QStyle::State_Selected) {
        painter->fillRect(option.rect, option.palette.base());
    }

However with skins that try to specify custom colors for the library, this is not the right color. Instead this widget should try to load the background-color style from this CSS block:

QTableView::item:selected {
  color: #cfb32c;
  background-color: #725309;
}

Similarly, the BPM widget doesn't do any background styling so it sticks out like a sore thumb. It doesn't have a transparent background so it can't show the alternating row colors, and the widget doesn't highlight. -- see attachment.

Tags: polish
Revision history for this message
Owen Williams (ywwg) wrote :
Changed in mixxx:
milestone: none → 1.12.0
Revision history for this message
jus (jus) wrote :

BPM widget acts also weird cross-platform, see lp:1201079

Revision history for this message
jus (jus) wrote :

Ups, we cross-posted at the same time in each bug :-)

RJ Skerry-Ryan (rryan)
Changed in mixxx:
importance: Undecided → Low
jus (jus)
tags: added: polish
Changed in mixxx:
status: New → Confirmed
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

BPM widget should be all set now.

> Instead this widget should try to load the background-color style from this CSS block:

That sort of thing isn't possible except for a few narrow circumstances since everything is hidden inside Qt's implementation. You have to study the internals until you find a route to get at what you want.

As for the preview column, I think this fixes it:
QTableView {
   selection-color: #cfb32c;
  selection-background-color: #725309;
}

Changed in mixxx:
assignee: nobody → RJ Ryan (rryan)
jus (jus)
Changed in mixxx:
status: Confirmed → Fix Committed
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/7350

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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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