mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-02 12:20:45 +02: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:
@@ -84,6 +84,7 @@ ContextWidget::ContextWidget( QWidget* parent )
|
|||||||
QPalette whitePal = ui->toggleButton->palette();
|
QPalette whitePal = ui->toggleButton->palette();
|
||||||
whitePal.setColor( QPalette::Foreground, Qt::white );
|
whitePal.setColor( QPalette::Foreground, Qt::white );
|
||||||
ui->toggleButton->setPalette( whitePal );
|
ui->toggleButton->setPalette( whitePal );
|
||||||
|
ui->toggleButton->setCursor( Qt::PointingHandCursor );
|
||||||
|
|
||||||
QFont boldFont = ui->toggleButton->font();
|
QFont boldFont = ui->toggleButton->font();
|
||||||
boldFont.setPixelSize( 12 );
|
boldFont.setPixelSize( 12 );
|
||||||
|
@@ -77,6 +77,11 @@ ProxyStyle::drawControl( ControlElement ce, const QStyleOption* opt, QPainter* p
|
|||||||
if ( !splitter->sizes().contains( 0 ) )
|
if ( !splitter->sizes().contains( 0 ) )
|
||||||
{
|
{
|
||||||
p->setPen( QColor( 0x8c, 0x8c, 0x8c ) );
|
p->setPen( QColor( 0x8c, 0x8c, 0x8c ) );
|
||||||
|
// 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() );
|
p->drawLine( opt->rect.topLeft(), opt->rect.bottomRight() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -298,9 +298,8 @@ AnimatedSplitterHandle::sizeHint() const
|
|||||||
m_lastCount = splitter()->count();
|
m_lastCount = splitter()->count();
|
||||||
}
|
}
|
||||||
|
|
||||||
// sizeHint is 0,0 if widget below handle has size 0 or is hidden
|
// Since we are in an AnimatedSplitter, we always return 0,0 for SizeHint, simply
|
||||||
if ( splitter()->widget( m_indexInSplitter )->height() == 0 )
|
// because we know there's going to be a handle in the bottom widget to move the
|
||||||
|
// splitter.
|
||||||
return QSize( 0, 0 );
|
return QSize( 0, 0 );
|
||||||
else
|
|
||||||
return QSize( 1, 1 );
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user