mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 11:20:22 +02:00
* Fixed ArtistAndAlbum hover states.
This commit is contained in:
@@ -372,8 +372,8 @@ QueryLabel::paintEvent( QPaintEvent* event )
|
|||||||
QPainter p( this );
|
QPainter p( this );
|
||||||
QRect r = contentsRect();
|
QRect r = contentsRect();
|
||||||
QString s = text();
|
QString s = text();
|
||||||
const QString elidedText = fontMetrics().elidedText( s, m_mode, r.width() );
|
|
||||||
const QFontMetrics& fm = fontMetrics();
|
const QFontMetrics& fm = fontMetrics();
|
||||||
|
const QString elidedText = fm.elidedText( s, m_mode, r.width() );
|
||||||
|
|
||||||
p.save();
|
p.save();
|
||||||
p.setRenderHint( QPainter::Antialiasing );
|
p.setRenderHint( QPainter::Antialiasing );
|
||||||
@@ -624,8 +624,8 @@ QueryLabel::mouseMoveEvent( QMouseEvent* event )
|
|||||||
{
|
{
|
||||||
m_hoverType = Album;
|
m_hoverType = Album;
|
||||||
int spacing = ( m_type & Artist ) ? dashX : 0;
|
int spacing = ( m_type & Artist ) ? dashX : 0;
|
||||||
hoverArea.setLeft( artistX + spacing );
|
hoverArea.setLeft( artistX + spacing - contentsMargins().left() );
|
||||||
hoverArea.setRight( albumX + spacing + contentsMargins().left() - 1 );
|
hoverArea.setRight( albumX + contentsMargins().left() - 1 );
|
||||||
}
|
}
|
||||||
else if ( m_type & Track && x < trackX && x > albumX )
|
else if ( m_type & Track && x < trackX && x > albumX )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user