Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
13db37f5
Commit
13db37f5
authored
Apr 03, 2013
by
Erwan Tulou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
skins2: avoid layout resize if size is unchanged
parent
44febce3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
modules/gui/skins2/src/generic_layout.cpp
modules/gui/skins2/src/generic_layout.cpp
+4
-11
modules/gui/skins2/src/window_manager.cpp
modules/gui/skins2/src/window_manager.cpp
+7
-0
No files found.
modules/gui/skins2/src/generic_layout.cpp
View file @
13db37f5
...
@@ -174,6 +174,10 @@ void GenericLayout::onControlUpdate( const CtrlGeneric &rCtrl,
...
@@ -174,6 +174,10 @@ void GenericLayout::onControlUpdate( const CtrlGeneric &rCtrl,
void
GenericLayout
::
resize
(
int
width
,
int
height
)
void
GenericLayout
::
resize
(
int
width
,
int
height
)
{
{
// check real resize
if
(
width
==
m_rect
.
getWidth
()
&&
height
==
m_rect
.
getHeight
()
)
return
;
// Update the window size
// Update the window size
m_rect
=
SkinsRect
(
0
,
0
,
width
,
height
);
m_rect
=
SkinsRect
(
0
,
0
,
width
,
height
);
...
@@ -191,16 +195,6 @@ void GenericLayout::resize( int width, int height )
...
@@ -191,16 +195,6 @@ void GenericLayout::resize( int width, int height )
{
{
iter
->
m_pControl
->
onResize
();
iter
->
m_pControl
->
onResize
();
}
}
// Resize and refresh the associated window
TopWindow
*
pWindow
=
getWindow
();
if
(
pWindow
)
{
// Resize the window
pWindow
->
resize
(
width
,
height
);
// Change the shape of the window and redraw it
refreshAll
();
}
}
}
...
@@ -236,7 +230,6 @@ void GenericLayout::refreshRect( int x, int y, int width, int height )
...
@@ -236,7 +230,6 @@ void GenericLayout::refreshRect( int x, int y, int width, int height )
{
{
// first apply new shape to the window
// first apply new shape to the window
pWindow
->
updateShape
();
pWindow
->
updateShape
();
pWindow
->
invalidateRect
(
x
,
y
,
width
,
height
);
pWindow
->
invalidateRect
(
x
,
y
,
width
,
height
);
}
}
}
}
...
...
modules/gui/skins2/src/window_manager.cpp
View file @
13db37f5
...
@@ -278,6 +278,13 @@ void WindowManager::resize( GenericLayout &rLayout,
...
@@ -278,6 +278,13 @@ void WindowManager::resize( GenericLayout &rLayout,
// Do the actual resizing
// Do the actual resizing
rLayout
.
resize
(
newWidth
,
newHeight
);
rLayout
.
resize
(
newWidth
,
newHeight
);
// Resize the window
TopWindow
*
pWindow
=
rLayout
.
getWindow
();
pWindow
->
resize
(
newWidth
,
newHeight
);
// refresh content
rLayout
.
refreshAll
();
// Move all the anchored windows
// Move all the anchored windows
WinSet_t
::
const_iterator
it
;
WinSet_t
::
const_iterator
it
;
if
(
m_direction
==
kResizeE
||
if
(
m_direction
==
kResizeE
||
...
...
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