Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
VideoLAN
VLMC
Commits
7ef18902
Commit
7ef18902
authored
Oct 09, 2009
by
Thomas Boquet
Browse files
Better looking Media list
bigger thumnails, no margin
parent
36fa73fd
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/GUI/Library/ListViewController.cpp
View file @
7ef18902
...
...
@@ -36,9 +36,12 @@ ListViewController::ListViewController( StackViewController* nav ) : m_nav( nav
m_layout
->
setAlignment
(
Qt
::
AlignTop
);
m_layout
->
setSpacing
(
0
);
m_layout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
m_container
->
setLayout
(
m_layout
);
m_scrollArea
->
setWidget
(
m_container
);
m_scrollArea
->
setWidgetResizable
(
true
);
m_scrollArea
->
setAcceptDrops
(
true
);
}
ListViewController
::~
ListViewController
()
...
...
src/GUI/Library/MediaCellView.cpp
View file @
7ef18902
...
...
@@ -58,7 +58,7 @@ void MediaCellView::setTitle( const QString& title )
void
MediaCellView
::
setThumbnail
(
const
QPixmap
&
pixmap
)
{
m_ui
->
thumbnail
->
setScaledContents
(
false
);
m_ui
->
thumbnail
->
setPixmap
(
pixmap
.
scaled
(
48
,
48
,
Qt
::
KeepAspectRatio
)
);
m_ui
->
thumbnail
->
setPixmap
(
pixmap
.
scaled
(
64
,
64
,
Qt
::
KeepAspectRatio
)
);
}
const
QPixmap
*
MediaCellView
::
getThumbnail
()
const
...
...
src/GUI/Library/MediaListViewController.cpp
View file @
7ef18902
#include
"MediaListViewController.h"
#include
<QDebug>
MediaListViewController
::
MediaListViewController
(
StackViewController
*
nav
)
:
ListViewController
(
nav
),
m_nav
(
nav
)
{
...
...
@@ -22,3 +24,13 @@ void MediaListViewController::newMediaLoaded( Media* media )
cell
->
setTitle
(
media
->
getFileName
()
);
addCell
(
cell
);
}
void
MediaListViewController
::
dragEnterEvent
(
QDragEnterEvent
*
event
)
{
qDebug
()
<<
"Drag enter"
;
}
void
MediaListViewController
::
dropEvent
(
QDropEvent
*
event
)
{
qDebug
()
<<
"Drop"
;
}
src/GUI/Library/MediaListViewController.h
View file @
7ef18902
...
...
@@ -18,6 +18,10 @@ public:
private:
StackViewController
*
m_nav
;
protected:
virtual
void
dragEnterEvent
(
QDragEnterEvent
*
event
);
virtual
void
dropEvent
(
QDropEvent
*
event
);
public
slots
:
void
newMediaLoaded
(
Media
*
);
};
...
...
src/GUI/Library/ui/MediaCellView.ui
View file @
7ef18902
...
...
@@ -23,8 +23,27 @@
<property
name=
"spacing"
>
<number>
0
</number>
</property>
<property
name=
"margin"
>
<number>
0
</number>
</property>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<item>
<spacer
name=
"horizontalSpacer_2"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeType"
>
<enum>
QSizePolicy::Fixed
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
10
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item>
<widget
class=
"QLabel"
name=
"thumbnail"
>
<property
name=
"enabled"
>
...
...
@@ -38,20 +57,20 @@
</property>
<property
name=
"minimumSize"
>
<size>
<width>
4
8
</width>
<height>
4
8
</height>
<width>
6
4
</width>
<height>
6
4
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<size>
<width>
4
8
</width>
<height>
4
8
</height>
<width>
6
4
</width>
<height>
6
4
</height>
</size>
</property>
<property
name=
"baseSize"
>
<size>
<width>
4
8
</width>
<height>
4
8
</height>
<width>
6
4
</width>
<height>
6
4
</height>
</size>
</property>
<property
name=
"text"
>
...
...
@@ -69,7 +88,7 @@
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
4
0
</width>
<width>
1
0
</width>
<height>
20
</height>
</size>
</property>
...
...
@@ -81,10 +100,16 @@
<widget
class=
"QLabel"
name=
"title"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Expanding"
vsizetype=
"Preferred"
>
<horstretch>
0
</horstretch>
<horstretch>
1
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"minimumSize"
>
<size>
<width>
150
</width>
<height>
0
</height>
</size>
</property>
<property
name=
"font"
>
<font>
<pointsize>
8
</pointsize>
...
...
@@ -185,7 +210,7 @@
<string/>
</property>
<property
name=
"pixmap"
>
<pixmap>
../../../Pictures/arrowRight.png
</pixmap>
<pixmap>
../../../
../../../../
Pictures/arrowRight.png
</pixmap>
</property>
</widget>
</item>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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