[vlc-commits] qt: Remove macOS specific playlist splitter

Marvin Scholz git at videolan.org
Wed Nov 29 18:49:01 CET 2017


vlc | branch: master | Marvin Scholz <epirat07 at gmail.com> | Sun Nov 26 04:46:35 2017 +0100| [cecac520fa364fb990539298486e05765d13c6e3] | committer: 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.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cecac520fa364fb990539298486e05765d13c6e3
---

 modules/gui/qt/components/playlist/playlist.cpp | 25 +-----------------------
 modules/gui/qt/components/playlist/playlist.hpp | 26 -------------------------
 2 files changed, 1 insertion(+), 50 deletions(-)

diff --git a/modules/gui/qt/components/playlist/playlist.cpp b/modules/gui/qt/components/playlist/playlist.cpp
index 992477b552..d1f7d5543e 100644
--- a/modules/gui/qt/components/playlist/playlist.cpp
+++ b/modules/gui/qt/components/playlist/playlist.cpp
@@ -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__ */
diff --git a/modules/gui/qt/components/playlist/playlist.hpp b/modules/gui/qt/components/playlist/playlist.hpp
index 1955370d22..64e7cc112b 100644
--- a/modules/gui/qt/components/playlist/playlist.hpp
+++ b/modules/gui/qt/components/playlist/playlist.hpp
@@ -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:



More information about the vlc-commits mailing list