[vlc-commits] Qt: telexFrame: change buttons gradient

Francois Cartegnie git at videolan.org
Sat Apr 5 19:58:24 CEST 2014


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sat Apr  5 19:57:08 2014 +0200| [00ee682e9030a5d3e5a3a0d73cd04cbd13b03609] | committer: Francois Cartegnie

Qt: telexFrame: change buttons gradient

And then make them smaller as it is not really nice.
QRadialGradient currently crashes on WIN32/SSE2.

refs #11146, See QTBUG-38139

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=00ee682e9030a5d3e5a3a0d73cd04cbd13b03609
---

 modules/gui/qt4/components/controller.cpp |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/modules/gui/qt4/components/controller.cpp b/modules/gui/qt4/components/controller.cpp
index d85c129..d2ed608 100644
--- a/modules/gui/qt4/components/controller.cpp
+++ b/modules/gui/qt4/components/controller.cpp
@@ -623,15 +623,14 @@ QFrame *AbstractController::telexFrame()
     QPixmap iconPixmap( i_iconminsize, i_iconminsize );
     iconPixmap.fill( Qt::transparent );
     QPainter iconPixmapPainter( &iconPixmap );
-    QRadialGradient iconPixmapPainterGradient( iconPixmap.rect().center(),
-                                               iconPixmap.rect().width() / 2,
-                                               iconPixmap.rect().center() / 2 );
+    QLinearGradient iconPixmapPainterGradient( iconPixmap.rect().center() / 2,
+                                               iconPixmap.rect().center() );
 
 #define CREATE_CONTEXT_BUTTON(color, key) \
     iconPixmapPainterGradient.setColorAt( 0, QColor( color ).lighter(150) );\
     iconPixmapPainterGradient.setColorAt( 1.0, QColor( color ) );\
     iconPixmapPainter.setBrush( iconPixmapPainterGradient );\
-    iconPixmapPainter.drawEllipse( iconPixmap.rect().adjusted( 0, 0, -1, -1 ) );\
+    iconPixmapPainter.drawEllipse( iconPixmap.rect().adjusted( 4, 4, -5, -5 ) );\
     contextButton = new QToolButton();\
     setupButton( contextButton );\
     contextButton->setIcon( iconPixmap );\



More information about the vlc-commits mailing list