1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-25 02:09:48 +01:00

Removed the annoying thin grey line from the Queue splitter widget.

Also made the ContextWidget header cursor a PointingHand because
consistency is good.
This commit is contained in:
Teo Mrnjavac 2012-08-02 19:01:30 +02:00
parent 7e47d0efcc
commit a19198b206
3 changed files with 11 additions and 6 deletions

View File

@ -84,6 +84,7 @@ ContextWidget::ContextWidget( QWidget* parent )
QPalette whitePal = ui->toggleButton->palette();
whitePal.setColor( QPalette::Foreground, Qt::white );
ui->toggleButton->setPalette( whitePal );
ui->toggleButton->setCursor( Qt::PointingHandCursor );
QFont boldFont = ui->toggleButton->font();
boldFont.setPixelSize( 12 );

View File

@ -77,7 +77,12 @@ ProxyStyle::drawControl( ControlElement ce, const QStyleOption* opt, QPainter* p
if ( !splitter->sizes().contains( 0 ) )
{
p->setPen( QColor( 0x8c, 0x8c, 0x8c ) );
p->drawLine( opt->rect.topLeft(), opt->rect.bottomRight() );
// We must special-case this because of the AnimatedSplitterHandle which has a
// SizeHint of 0,0.
if( splitter->orientation() == Qt::Vertical )
p->drawLine( opt->rect.topLeft(), opt->rect.topRight() );
else
p->drawLine( opt->rect.topLeft(), opt->rect.bottomRight() );
}
}
else

View File

@ -298,9 +298,8 @@ AnimatedSplitterHandle::sizeHint() const
m_lastCount = splitter()->count();
}
// sizeHint is 0,0 if widget below handle has size 0 or is hidden
if ( splitter()->widget( m_indexInSplitter )->height() == 0 )
return QSize( 0, 0 );
else
return QSize( 1, 1 );
// Since we are in an AnimatedSplitter, we always return 0,0 for SizeHint, simply
// because we know there's going to be a handle in the bottom widget to move the
// splitter.
return QSize( 0, 0 );
}