mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-19 23:39:42 +01:00
* Fixed TWK-438: Get rid of splitter handles in the sidebar.
This commit is contained in:
parent
ac99970bd4
commit
e772dcecad
@ -80,13 +80,6 @@ ProxyStyle::drawControl( ControlElement ce, const QStyleOption* opt, QPainter* p
|
||||
p->setPen( QColor( 0x8c, 0x8c, 0x8c ) );
|
||||
p->drawLine( opt->rect.topLeft(), opt->rect.bottomRight() );
|
||||
}
|
||||
#ifndef Q_WS_MAC
|
||||
else
|
||||
{
|
||||
p->setPen( QColor( 0xff, 0xff, 0xff ) );
|
||||
p->drawLine( opt->rect.topLeft(), opt->rect.bottomRight() );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
QProxyStyle::drawControl( ce, opt, p, w );
|
||||
|
@ -145,6 +145,13 @@ AnimatedSplitter::setGreedyWidget( int index )
|
||||
}
|
||||
|
||||
|
||||
QSplitterHandle*
|
||||
AnimatedSplitter::createHandle()
|
||||
{
|
||||
return new AnimatedSplitterHandle( orientation(), this );
|
||||
}
|
||||
|
||||
|
||||
AnimatedWidget::AnimatedWidget( AnimatedSplitter* parent )
|
||||
: m_parent( parent )
|
||||
, m_isHidden( false )
|
||||
|
@ -45,6 +45,9 @@ signals:
|
||||
void shown( QWidget*, bool animated );
|
||||
void hidden( QWidget*, bool animated );
|
||||
|
||||
protected:
|
||||
virtual QSplitterHandle* createHandle();
|
||||
|
||||
private slots:
|
||||
void onShowRequest();
|
||||
void onHideRequest();
|
||||
@ -55,6 +58,24 @@ private:
|
||||
int m_greedyIndex;
|
||||
};
|
||||
|
||||
|
||||
class DLLEXPORT AnimatedSplitterHandle : public QSplitterHandle
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit AnimatedSplitterHandle( Qt::Orientation orientation, QSplitter* parent )
|
||||
: QSplitterHandle( orientation, parent )
|
||||
{
|
||||
setCursor( Qt::ArrowCursor );
|
||||
}
|
||||
|
||||
virtual QSize sizeHint() const
|
||||
{
|
||||
return QSize( 0, 0 );
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class DLLEXPORT AnimatedWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -391,7 +391,6 @@ TomahawkWindow::hideEvent( QHideEvent* e )
|
||||
void
|
||||
TomahawkWindow::showSettingsDialog()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
SettingsDialog win;
|
||||
win.exec();
|
||||
}
|
||||
@ -399,7 +398,6 @@ TomahawkWindow::showSettingsDialog()
|
||||
|
||||
void TomahawkWindow::showDiagnosticsDialog()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
DiagnosticsDialog win;
|
||||
win.exec();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user