rendering errors with preview buttons intel and lucid

Bug #1095780 reported by Daniel Schürmann on 2013-01-03
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
High
Daniel Schürmann

Bug Description

Tested with lp:mixxx/1.11 #3664
on the following system
* Atom CPU N270 @ 1.6GHz
* 2 GiB RAM
* Ubuntu Lucid
* QT Version Qt version 4.6.2.
* Intel 945GME

Daniel Schürmann (daschuer) wrote :

See attached png

Daniel Schürmann (daschuer) wrote :

Buttons are looking good, when hovered by mouse

Daniel Schürmann (daschuer) wrote :

Made some investigations:
QPixmap map = QPixmap::grabWidget(m_pButton);
Does not work reliable with the setup above.
I have also noticed that the button is not painted reliable when hidden and all changes to the button in paint() are not mediately painted to the button. Calling repaint() leads to a paint recursion.
I have tried very long to trick my setup and make it working but with no success.
I have also searches the web if one has published a solution using grabWidget, no results.

All in all I would prefer to drop the style sheed solution and introduce a new skin attribute for the play and pause Images.
I think this is most likely a way that will work on all setups.

Max Linke (max-linke) wrote :

Did you solve the problem by defining the images directly in the code and deleting the styling in legacyskinparser.cpp ?

I don't see why the style sheets are a problem here. I guess you are more seeing a Qt Bug.
Try do remove "background:transparent;" from the stylesheet code and see if that solves the problem.
Otherwise we have to paint the widget differently.

Max Linke (max-linke) wrote :

Can you try this patch and tell me if this fixes the artifacts drawing the button?

Daniel Schürmann (daschuer) wrote :

Sorry Max, your patch makes no difference. I have tested those and other tweaks yesterday without any success.
My conclusion is that there might be no solution based on QPixmap::grabWidget(m_pButton); which will work on the wide variety of setups. Possible reasons are in #3
I have just checked in my mess from yesterday, which still does not work but at least has no rendering errors. It is like you assume in #5: Loading the button images in our code instead of relying on the style sheed.
I thing this is a solution with more coding effort but we are quite sure that it finally we will work on any setup.
(Like the star rating column does)

Daniel Schürmann (daschuer) wrote :

Removing transparency makes also no difference.

Max Linke (max-linke) wrote :

Does this vanish if you use a new qt-version? If this only occurs with Qt 4.6 then this shouldn't be a problem for most mixxx users because we ship Qt with the binary in windows and afaik also Mac OS

Daniel Schürmann (daschuer) wrote :

Unfortunately this issue matter at least me :-(

I can reproduce the issue only with the above setup.
I have not tested it on the same hardware with a recent distribution. But this does not make a difference to me because we build the release version of Mixxx 1.11 with Lucid.

Daniel Schürmann (daschuer) wrote :

Maybe these commits, not included in Qt 4.6.2 causing our problem:
http://www.qt.gitorious.org/qt/qt/commit/951cceac68b4a6cf38da83b69dcde2c8109342a2
http://www.qt.gitorious.org/qt/qt/commit/acc1a2bd5520369c690c2769f067aec6bfd869f2

I wander if get any better if we use:
painter->end();
m_pButton->render(painter);
without the detour of render to a QImage, convert to QPixmap and draw.

Daniel Schürmann (daschuer) wrote :

Yes! :-)
I have a working version in my trunk.
Please have a look. Thank you.

Changed in mixxx:
milestone: none → 1.11.0
status: New → In Progress
Max Linke (max-linke) wrote :

LGTM

could you also remove the line with grabwidget and add a comment why the painter has to be translated

Daniel Schürmann (daschuer) wrote :

committed to lp:mixxx 1.11 #3672

Changed in mixxx:
status: In Progress → Fix Committed
importance: Undecided → High
assignee: nobody → Daniel Schürmann (daschuer)
RJ Skerry-Ryan (rryan) on 2013-05-09
Changed in mixxx:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers