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
f7c69bbe
Commit
f7c69bbe
authored
Aug 27, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved screen for qt-always-video
parent
7ed4cf1b
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
13 deletions
+44
-13
modules/gui/qt4/components/preferences.cpp
modules/gui/qt4/components/preferences.cpp
+3
-1
modules/gui/qt4/components/video_widget.cpp
modules/gui/qt4/components/video_widget.cpp
+29
-12
modules/gui/qt4/components/video_widget.hpp
modules/gui/qt4/components/video_widget.hpp
+8
-0
modules/gui/qt4/res.qrc
modules/gui/qt4/res.qrc
+1
-0
modules/gui/qt4/util/qvlcframe.hpp
modules/gui/qt4/util/qvlcframe.hpp
+3
-0
No files found.
modules/gui/qt4/components/preferences.cpp
View file @
f7c69bbe
...
...
@@ -49,6 +49,9 @@
#include <QGridLayout>
#include <QHeaderView>
#include <QPalette>
#include <QColor>
#define ITEM_HEIGHT 25
/*********************************************************************
...
...
@@ -331,7 +334,6 @@ PrefsPanel::PrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
module_t
*
p_module
=
NULL
;
vlc_list_t
*
p_list
=
NULL
;
global_layout
=
new
QVBoxLayout
();
if
(
data
->
i_type
==
TYPE_CATEGORY
)
{
/* TODO */
...
...
modules/gui/qt4/components/video_widget.cpp
View file @
f7c69bbe
...
...
@@ -28,6 +28,8 @@
#include "main_interface.hpp"
#include <QHBoxLayout>
#define ICON_SIZE 128
static
void
*
DoRequest
(
intf_thread_t
*
,
vout_thread_t
*
,
int
*
,
int
*
,
unsigned
int
*
,
unsigned
int
*
);
static
void
DoRelease
(
intf_thread_t
*
,
void
*
);
...
...
@@ -53,8 +55,9 @@ VideoWidget::VideoWidget( intf_thread_t *_p_i, bool _always ) : QFrame( NULL ),
SIGNAL
(
timeout
()
),
this
,
SLOT
(
update
()
)
);
if
(
always
)
{
DrawBackground
();
}
need_update
=
false
;
}
...
...
@@ -88,6 +91,9 @@ VideoWidget::~VideoWidget()
p_intf
->
pf_control_window
=
NULL
;
vlc_mutex_unlock
(
&
lock
);
vlc_mutex_destroy
(
&
lock
);
if
(
always
)
CleanBackground
();
}
QSize
VideoWidget
::
sizeHint
()
const
...
...
@@ -111,9 +117,6 @@ void *VideoWidget::Request( vout_thread_t *p_nvout, int *pi_x, int *pi_y,
}
p_vout
=
p_nvout
;
if
(
always
)
CleanBackground
();
setMinimumSize
(
1
,
1
);
p_intf
->
p_sys
->
p_mi
->
videoSize
=
QSize
(
*
pi_width
,
*
pi_height
);
updateGeometry
();
...
...
@@ -126,6 +129,14 @@ static void DoRelease( intf_thread_t *p_intf, void *p_win )
return
p_intf
->
p_sys
->
p_video
->
Release
(
p_win
);
}
void
VideoWidget
::
resizeEvent
(
QResizeEvent
*
e
)
{
if
(
e
->
size
().
height
()
<
ICON_SIZE
-
1
)
label
->
setMaximumWidth
(
e
->
size
().
height
()
);
else
label
->
setMaximumWidth
(
ICON_SIZE
);
}
void
VideoWidget
::
Release
(
void
*
p_win
)
{
p_vout
=
NULL
;
...
...
@@ -135,11 +146,6 @@ void VideoWidget::Release( void *p_win )
updateGeometry
();
need_update
=
true
;
}
else
{
DrawBackground
();
}
}
static
int
DoControl
(
intf_thread_t
*
p_intf
,
void
*
p_win
,
int
i_q
,
va_list
a
)
...
...
@@ -149,7 +155,18 @@ static int DoControl( intf_thread_t *p_intf, void *p_win, int i_q, va_list a )
int
VideoWidget
::
DrawBackground
()
{
QLabel
*
label
=
new
QLabel
(
"VLC Rulez d4 Worldz"
);
setAutoFillBackground
(
true
);
plt
=
palette
();
plt
.
setColor
(
QPalette
::
Active
,
QPalette
::
Window
,
Qt
::
black
);
plt
.
setColor
(
QPalette
::
Inactive
,
QPalette
::
Window
,
Qt
::
black
);
setPalette
(
plt
);
backgroundLayout
=
new
QHBoxLayout
;
label
=
new
QLabel
(
""
);
label
->
setMaximumHeight
(
ICON_SIZE
);
label
->
setMaximumWidth
(
ICON_SIZE
);
label
->
setScaledContents
(
true
);
label
->
setPixmap
(
QPixmap
(
":/vlc128.png"
)
);
backgroundLayout
=
new
QHBoxLayout
;
backgroundLayout
->
addWidget
(
label
);
setLayout
(
backgroundLayout
);
...
...
modules/gui/qt4/components/video_widget.hpp
View file @
f7c69bbe
...
...
@@ -28,8 +28,13 @@
#include <vlc/intf.h>
#include <QWidget>
#include <QFrame>
#include <QPalette>
#include <QResizeEvent>
#include <QPixmap>
class
QLabel
;
class
QHBoxLayout
;
class
QColor
;
class
VideoWidget
:
public
QFrame
{
...
...
@@ -47,9 +52,12 @@ public:
int
i_video_height
,
i_video_width
;
vout_thread_t
*
p_vout
;
private:
virtual
void
resizeEvent
(
QResizeEvent
*
e
);
int
DrawBackground
();
int
CleanBackground
();
bool
always
;
QPalette
plt
;
QLabel
*
label
;
QWidget
*
frame
;
QHBoxLayout
*
backgroundLayout
;
intf_thread_t
*
p_intf
;
...
...
modules/gui/qt4/res.qrc
View file @
f7c69bbe
...
...
@@ -7,5 +7,6 @@
<file>
pixmaps/next.png
</file>
<file>
pixmaps/volume-low.png
</file>
<file>
pixmaps/volume-high.png
</file>
<file
alias=
"vlc128.png"
>
../../../share/vlc128x128.png
</file>
</qresource>
</RCC>
modules/gui/qt4/util/qvlcframe.hpp
View file @
f7c69bbe
...
...
@@ -52,6 +52,9 @@ public:
vlg.setHsv( vlg.hue(), vlg.saturation(), 235 );
plt.setColor( QPalette::Active, QPalette::Window, vlg );
plt.setColor( QPalette::Inactive, QPalette::Window, vlg );
plt.setColor( QPalette::Inactive, QPalette::Button, vlg );
plt.setColor( QPalette::Active, QPalette::Button, vlg );
plt.setColor( QPalette::Active, QPalette::Text, Qt::yellow );
w->setPalette( plt );
}
#endif
...
...
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