mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-04 21:27:58 +02:00
* Tweaked OverlayWidget's settings a little.
This commit is contained in:
@@ -289,6 +289,8 @@ TrackView::onFilterChanged( const QString& )
|
|||||||
{
|
{
|
||||||
if ( selectedIndexes().count() )
|
if ( selectedIndexes().count() )
|
||||||
scrollTo( selectedIndexes().at( 0 ), QAbstractItemView::PositionAtCenter );
|
scrollTo( selectedIndexes().at( 0 ), QAbstractItemView::PositionAtCenter );
|
||||||
|
|
||||||
|
reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QPropertyAnimation>
|
#include <QPropertyAnimation>
|
||||||
|
|
||||||
#define CORNER_ROUNDNESS 32.0
|
#define CORNER_ROUNDNESS 16.0
|
||||||
#define FADEIN_DURATION 500
|
#define FADEIN_DURATION 500
|
||||||
#define FONT_SIZE 18
|
#define FONT_SIZE 18
|
||||||
#define OPACITY 0.80
|
#define OPACITY 0.80
|
||||||
@@ -97,8 +97,9 @@ OverlayWidget::paintEvent( QPaintEvent* event )
|
|||||||
p.setBackgroundMode( Qt::TransparentMode );
|
p.setBackgroundMode( Qt::TransparentMode );
|
||||||
p.setRenderHint( QPainter::Antialiasing );
|
p.setRenderHint( QPainter::Antialiasing );
|
||||||
|
|
||||||
p.setPen( palette().shadow().color() );
|
QPen pen( palette().dark().color(), .5 );
|
||||||
p.setBrush( palette().shadow() );
|
p.setPen( pen );
|
||||||
|
p.setBrush( palette().highlight() );
|
||||||
|
|
||||||
p.drawRoundedRect( r, CORNER_ROUNDNESS, CORNER_ROUNDNESS );
|
p.drawRoundedRect( r, CORNER_ROUNDNESS, CORNER_ROUNDNESS );
|
||||||
|
|
||||||
@@ -110,6 +111,6 @@ OverlayWidget::paintEvent( QPaintEvent* event )
|
|||||||
f.setBold( true );
|
f.setBold( true );
|
||||||
|
|
||||||
p.setFont( f );
|
p.setFont( f );
|
||||||
p.setPen( palette().light().color() );
|
p.setPen( palette().highlightedText().color() );
|
||||||
p.drawText( r.adjusted( 16, 16, -16, -16 ), text(), to );
|
p.drawText( r.adjusted( 16, 16, -16, -16 ), text(), to );
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user