Commit 501530e6 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: reinstate the small QSplitter on Mac for the playlist

parent f6b7fd14
...@@ -147,7 +147,7 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, QWidget *_par ) ...@@ -147,7 +147,7 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, QWidget *_par )
mainView, setRoot( playlist_item_t * ) ); mainView, setRoot( playlist_item_t * ) );
split = new QSplitter(this); split = new PlaylistSplitter( this );
/* Add the two sides of the QSplitter */ /* Add the two sides of the QSplitter */
split->addWidget( leftSplitter ); split->addWidget( leftSplitter );
...@@ -421,9 +421,9 @@ QSize LocationButton::sizeHint() const ...@@ -421,9 +421,9 @@ QSize LocationButton::sizeHint() const
#undef PADDING #undef PADDING
#ifdef Q_WS_MAC #ifdef Q_WS_MAC
QSplitterHandle *PlaylistWidget::createHandle() QSplitterHandle *PlaylistSplitter::createHandle()
{ {
return new SplitterHandle( split->orientation(), split ); return new SplitterHandle( orientation(), this );
} }
SplitterHandle::SplitterHandle( Qt::Orientation orientation, QSplitter * parent ) SplitterHandle::SplitterHandle( Qt::Orientation orientation, QSplitter * parent )
......
...@@ -72,14 +72,22 @@ protected: ...@@ -72,14 +72,22 @@ protected:
virtual void dropEvent( QDropEvent *); virtual void dropEvent( QDropEvent *);
virtual void dragEnterEvent( QDragEnterEvent * ); virtual void dragEnterEvent( QDragEnterEvent * );
virtual void closeEvent( QCloseEvent * ); virtual void closeEvent( QCloseEvent * );
#ifdef __APPLE__
virtual QSplitterHandle *createHandle();
#endif
private slots: private slots:
void changeView( const QModelIndex& index ); void changeView( const QModelIndex& index );
}; };
#ifdef Q_WS_MAC
class PlaylistSplitter : public QSplitter
{
public:
PlaylistSplitter( QWidget *_parent ) : QSplitter( _parent ){}
protected:
virtual QSplitterHandle *createHandle();
};
#else
#define PlaylistSplitter QSplitter
#endif
#ifdef Q_WS_MAC #ifdef Q_WS_MAC
class SplitterHandle : public QSplitterHandle class SplitterHandle : public QSplitterHandle
{ {
......
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