mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-01 03:40:16 +02:00
* Fixed TWK-438: Get rid of splitter handles in the sidebar.
This commit is contained in:
@@ -80,13 +80,6 @@ ProxyStyle::drawControl( ControlElement ce, const QStyleOption* opt, QPainter* p
|
|||||||
p->setPen( QColor( 0x8c, 0x8c, 0x8c ) );
|
p->setPen( QColor( 0x8c, 0x8c, 0x8c ) );
|
||||||
p->drawLine( opt->rect.topLeft(), opt->rect.bottomRight() );
|
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
|
else
|
||||||
QProxyStyle::drawControl( ce, opt, p, w );
|
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 )
|
AnimatedWidget::AnimatedWidget( AnimatedSplitter* parent )
|
||||||
: m_parent( parent )
|
: m_parent( parent )
|
||||||
, m_isHidden( false )
|
, m_isHidden( false )
|
||||||
|
@@ -45,6 +45,9 @@ signals:
|
|||||||
void shown( QWidget*, bool animated );
|
void shown( QWidget*, bool animated );
|
||||||
void hidden( QWidget*, bool animated );
|
void hidden( QWidget*, bool animated );
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual QSplitterHandle* createHandle();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void onShowRequest();
|
void onShowRequest();
|
||||||
void onHideRequest();
|
void onHideRequest();
|
||||||
@@ -55,6 +58,24 @@ private:
|
|||||||
int m_greedyIndex;
|
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
|
class DLLEXPORT AnimatedWidget : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
@@ -391,7 +391,6 @@ TomahawkWindow::hideEvent( QHideEvent* e )
|
|||||||
void
|
void
|
||||||
TomahawkWindow::showSettingsDialog()
|
TomahawkWindow::showSettingsDialog()
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO;
|
|
||||||
SettingsDialog win;
|
SettingsDialog win;
|
||||||
win.exec();
|
win.exec();
|
||||||
}
|
}
|
||||||
@@ -399,7 +398,6 @@ TomahawkWindow::showSettingsDialog()
|
|||||||
|
|
||||||
void TomahawkWindow::showDiagnosticsDialog()
|
void TomahawkWindow::showDiagnosticsDialog()
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO;
|
|
||||||
DiagnosticsDialog win;
|
DiagnosticsDialog win;
|
||||||
win.exec();
|
win.exec();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user