Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
6627718c
Commit
6627718c
authored
Nov 26, 2010
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: playlist, use a better QSplitter, on Mac
It might be a good idea to do the same on other platforms
parent
f28ecfb0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
0 deletions
+43
-0
modules/gui/qt4/components/playlist/playlist.cpp
modules/gui/qt4/components/playlist/playlist.cpp
+23
-0
modules/gui/qt4/components/playlist/playlist.hpp
modules/gui/qt4/components/playlist/playlist.hpp
+20
-0
No files found.
modules/gui/qt4/components/playlist/playlist.cpp
View file @
6627718c
...
...
@@ -415,3 +415,26 @@ QSize LocationButton::sizeHint() const
}
#undef PADDING
#ifdef Q_WS_MAC
QSplitterHandle
*
PlaylistWidget
::
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
(),
QBrush
(
Qt
::
gray
));
}
#endif
/* __APPLE__ */
modules/gui/qt4/components/playlist/playlist.hpp
View file @
6627718c
...
...
@@ -35,7 +35,10 @@
//#include <vlc_playlist.h>
#include <QSplitter>
#include <QPushButton>
#include <QSPlitterHandle>
#include <QMouseEvent>
class
StandardPLPanel
;
class
LocationBar
;
...
...
@@ -68,11 +71,28 @@ protected:
virtual
void
dropEvent
(
QDropEvent
*
);
virtual
void
dragEnterEvent
(
QDragEnterEvent
*
);
virtual
void
closeEvent
(
QCloseEvent
*
);
#ifdef __APPLE__
virtual
QSplitterHandle
*
createHandle
();
#endif
private
slots
:
void
changeView
(
const
QModelIndex
&
index
);
};
#ifdef Q_WS_MAC
class
SplitterHandle
:
public
QSplitterHandle
{
public:
SplitterHandle
(
Qt
::
Orientation
orientation
,
QSplitter
*
parent
);
protected:
virtual
void
paintEvent
(
QPaintEvent
*
);
private:
virtual
QSize
sizeHint
()
const
;
};
#endif
/* __APPLE__ */
class
LocationButton
:
public
QPushButton
{
public:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment