Fix ScrollBar-hover for Cusis on Qt-4.5
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@2064 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
10
ChangeLog
10
ChangeLog
@@ -1,3 +1,9 @@
|
||||
2009-02-21 Paul Giblock <drfaygo/at/gmail/dot/com>
|
||||
|
||||
* include/cusis_style.h:
|
||||
* src/gui/cusis_style.cpp:
|
||||
Make ScrollBar-hover work again in Qt-4.5
|
||||
|
||||
2009-02-20 Paul Giblock <drfaygo/at/gmail/dot/com>
|
||||
|
||||
* include/gui/tracks/pattern_item.h:
|
||||
@@ -27,6 +33,10 @@
|
||||
* src/gui/classic_style.cpp:
|
||||
Fix text clipping
|
||||
|
||||
* gui/lfo_controller_dialog.cpp:
|
||||
QT4.5 fixes our error where Controllers couldn't have backgrounds,
|
||||
re-add artwork.
|
||||
|
||||
2009-02-19 Paul Giblock <drfaygo/at/gmail/dot/com>
|
||||
|
||||
* include/track.h:
|
||||
|
||||
@@ -62,6 +62,9 @@ public:
|
||||
QRect subControlRect( ComplexControl control, const QStyleOptionComplex *option,
|
||||
SubControl subControl, const QWidget *widget ) const;
|
||||
|
||||
virtual void polish( QWidget * widget );
|
||||
virtual void unpolish( QWidget * widget );
|
||||
|
||||
virtual void drawFxLine( QPainter * _painter, const QWidget *_fxLine,
|
||||
const QString & _name, bool _active );
|
||||
|
||||
|
||||
@@ -33,6 +33,8 @@ const int BUTTON_LENGTH = 24;
|
||||
#include <QtGui/QStyleOption>
|
||||
#include <QtGui/QLinearGradient>
|
||||
|
||||
#include <QScrollBar>
|
||||
|
||||
#include "cusis_style.h"
|
||||
#include "gui_templates.h"
|
||||
|
||||
@@ -228,7 +230,7 @@ static QString getTcoCacheKey( const QString & _key,
|
||||
_key.toLatin1().constData(),
|
||||
_option->type | ( _option->selected << 4 ) | ( _option->hovered << 5 ),
|
||||
_option->duration,
|
||||
_option->userColor.name().constData(),
|
||||
_option->userColor.name().toLatin1().data(),
|
||||
_option->rect.width(),
|
||||
_option->rect.height());
|
||||
return tmp;
|
||||
@@ -302,6 +304,7 @@ QPalette CusisStyle::standardPalette( void ) const
|
||||
void CusisStyle::hoverColors( bool sunken, bool hover, bool active,
|
||||
QColor & color, QColor & blend ) const
|
||||
{
|
||||
printf("SB: %d %d %d\n", sunken, hover, active );
|
||||
if( active )
|
||||
{
|
||||
if( sunken )
|
||||
@@ -829,6 +832,25 @@ void CusisStyle::drawPrimitive( PrimitiveElement _element,
|
||||
}
|
||||
|
||||
|
||||
void CusisStyle::polish( QWidget * widget )
|
||||
{
|
||||
if( qobject_cast<QScrollBar *>(widget) )
|
||||
{
|
||||
widget->setAttribute(Qt::WA_Hover, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void CusisStyle::unpolish(QWidget *widget)
|
||||
{
|
||||
if( qobject_cast<QScrollBar *>(widget) )
|
||||
{
|
||||
widget->setAttribute(Qt::WA_Hover, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
int CusisStyle::pixelMetric( PixelMetric _metric, const QStyleOption * _option,
|
||||
const QWidget * _widget ) const
|
||||
|
||||
Reference in New Issue
Block a user