Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
63216006
Commit
63216006
authored
Apr 24, 2009
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: fullscreen controller first position.
Close #2283.
parent
bce50f87
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
9 deletions
+31
-9
modules/gui/qt4/components/controller.cpp
modules/gui/qt4/components/controller.cpp
+30
-9
modules/gui/qt4/components/controller.hpp
modules/gui/qt4/components/controller.hpp
+1
-0
No files found.
modules/gui/qt4/components/controller.cpp
View file @
63216006
...
...
@@ -714,7 +714,23 @@ FullscreenControllerWidget::FullscreenControllerWidget( intf_thread_t *_p_i )
vlc_mutex_init_recursive
(
&
lock
);
CONNECT
(
THEMIM
->
getIM
(),
voutListChanged
(
vout_thread_t
**
,
int
),
this
,
setVoutList
(
vout_thread_t
**
,
int
)
);
CONNECT
(
THEMIM
->
getIM
(),
voutListChanged
(
vout_thread_t
**
,
int
),
this
,
setVoutList
(
vout_thread_t
**
,
int
)
);
/* First Move */
QPoint
pos1
=
getSettings
()
->
value
(
"FullScreen/pos"
).
toPoint
();
int
number
=
QApplication
::
desktop
()
->
screenNumber
(
p_intf
->
p_sys
->
p_mi
);
if
(
QApplication
::
desktop
()
->
screenGeometry
(
number
).
contains
(
pos1
,
true
)
)
{
move
(
pos1
);
i_screennumber
=
number
;
screenRes
=
QApplication
::
desktop
()
->
screenGeometry
(
number
);
}
else
{
centerFSC
(
number
);
}
}
FullscreenControllerWidget
::~
FullscreenControllerWidget
()
...
...
@@ -724,24 +740,29 @@ FullscreenControllerWidget::~FullscreenControllerWidget()
vlc_mutex_destroy
(
&
lock
);
}
void
FullscreenControllerWidget
::
centerFSC
(
int
number
)
{
screenRes
=
QApplication
::
desktop
()
->
screenGeometry
(
number
);
/* screen has changed, calculate new position */
QPoint
pos
=
QPoint
(
screenRes
.
x
()
+
(
screenRes
.
width
()
/
2
)
-
(
width
()
/
2
),
screenRes
.
y
()
+
screenRes
.
height
()
-
height
());
move
(
pos
);
i_screennumber
=
number
;
}
/**
* Show fullscreen controller
*/
void
FullscreenControllerWidget
::
showFSC
()
{
adjustSize
();
/* center down */
int
number
=
QApplication
::
desktop
()
->
screenNumber
(
p_intf
->
p_sys
->
p_mi
);
if
(
number
!=
i_screennumber
||
screenRes
!=
QApplication
::
desktop
()
->
screenGeometry
(
number
)
)
{
screenRes
=
QApplication
::
desktop
()
->
screenGeometry
(
number
);
msg_Dbg
(
p_intf
,
"Calculation fullscreen controllers center"
);
/* screen has changed, calculate new position */
QPoint
pos
=
QPoint
(
screenRes
.
x
()
+
(
screenRes
.
width
()
/
2
)
-
(
width
()
/
2
),
screenRes
.
y
()
+
screenRes
.
height
()
-
height
());
move
(
pos
);
i_screennumber
=
number
;
centerFSC
(
number
);
}
#ifdef WIN32TRICK
// after quiting and going to fs, we need to call show()
...
...
modules/gui/qt4/components/controller.hpp
View file @
63216006
...
...
@@ -253,6 +253,7 @@ private slots:
void
planHideFSC
();
void
hideFSC
();
void
slowHideFSC
();
void
centerFSC
(
int
);
private:
virtual
void
customEvent
(
QEvent
*
event
);
...
...
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