Commit cecac520 authored by Marvin Scholz's avatar Marvin Scholz

qt: Remove macOS specific playlist splitter

This makes the splitter look a little bit weird on macOS, but removes a
lot of code.
parent ba8922fb
......@@ -138,7 +138,7 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, QWidget *_par )
CONNECT( selector, SDCategorySelected(bool), mainView, setWaiting(bool) );
/* */
split = new PlaylistSplitter( this );
split = new QSplitter( this );
/* Add the two sides of the QSplitter */
split->addWidget( leftSplitter );
......@@ -413,26 +413,3 @@ QSize LocationButton::sizeHint() const
}
#undef PADDING
#ifdef Q_OS_MAC
QSplitterHandle *PlaylistSplitter::createHandle()
{
return new SplitterHandle( orientation(), this );
}
SplitterHandle::SplitterHandle( Qt::Orientation orientation, QSplitter * parent )
: QSplitterHandle( orientation, parent)
{
};
QSize SplitterHandle::sizeHint() const
{
return (orientation() == Qt::Horizontal) ? QSize( 1, height() ) : QSize( width(), 1 );
}
void SplitterHandle::paintEvent(QPaintEvent *event)
{
QPainter painter( this );
painter.fillRect( event->rect(), QColor(81, 81, 81) );
}
#endif /* __APPLE__ */
......@@ -82,32 +82,6 @@ private slots:
friend class PlaylistDialog;
};
#ifdef Q_OS_MAC
class PlaylistSplitter : public QSplitter
{
public:
PlaylistSplitter( QWidget *_parent ) : QSplitter( _parent ){}
protected:
virtual QSplitterHandle *createHandle();
};
#else
#define PlaylistSplitter QSplitter
#endif
#ifdef Q_OS_MAC
class SplitterHandle : public QSplitterHandle
{
public:
SplitterHandle( Qt::Orientation orientation, QSplitter * parent );
protected:
void paintEvent ( QPaintEvent * ) Q_DECL_OVERRIDE;
private:
QSize sizeHint () const Q_DECL_OVERRIDE;
};
#endif /* __APPLE__ */
class LocationButton : public QPushButton
{
public:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment