Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
linphone-desktop
Commits
97e81ff1
Commit
97e81ff1
authored
Oct 05, 2016
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TMP
parent
f9bebf12
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
12 deletions
+24
-12
Paned.qml
tests/ui/modules/Linphone/Paned.qml
+24
-12
No files found.
tests/ui/modules/Linphone/Paned.qml
View file @
97e81ff1
...
...
@@ -8,21 +8,28 @@ Item {
property
alias
childA
:
contentA
.
data
property
alias
childB
:
contentB
.
data
onWidthChanged
:
{
console
.
log
(
'
RESIZE
'
,
width
,
handleLimitRight
)
if
(
contentB
.
width
<
handleLimitRight
)
{
console
.
log
(
'
lala
'
,
width
,
handleLimitRight
,
width
-
handle
.
width
-
handleLimitRight
)
contentA
.
width
=
width
-
handle
.
width
-
handleLimitRight
}
else
if
(
contentA
.
width
<
handleLimitLeft
)
{
console
.
log
(
'
zaza
'
,
width
,
handleLimitLeft
)
property
bool
useDynamicLimits
:
true
function
updateContentA
()
{
// width(A) < minimum width(A)
if
(
contentA
.
width
<
handleLimitLeft
)
{
contentA
.
width
=
handleLimitLeft
}
else
if
(
contentA
.
width
>=
width
-
handleLimitRight
-
20
)
{
console
.
log
(
'
FUCK
'
,
contentA
.
width
,
width
-
handleLimitRight
-
20
)
contentA
.
width
-
handle
.
width
-
handleLimitRight
}
// width(B) < minimum width(B)
else
if
(
width
-
contentA
.
width
-
handle
.
width
<
handleLimitRight
)
{
contentA
.
width
=
width
-
handle
.
width
-
handleLimitRight
}
}
onHandleLimitLeftChanged
:
updateContentA
()
onHandleLimitRightChanged
:
updateContentA
()
onWidthChanged
:
!
useDynamicLimits
&&
updateContentA
()
Component.onCompleted
:
{
contentA
.
width
=
handleLimitLeft
}
Rectangle
{
id
:
contentA
...
...
@@ -49,11 +56,16 @@ Item {
var
offset
=
mouseX
-
_mouseStart
// width(B) < minimum width(B)
if
(
container
.
width
-
offset
-
contentA
.
width
-
width
<
handleLimitRight
)
{
contentA
.
width
=
container
.
width
-
width
-
handleLimitRight
}
else
if
(
contentA
.
width
+
offset
<
handleLimitLeft
)
{
}
// width(A) < minimum width(A)
else
if
(
contentA
.
width
+
offset
<
handleLimitLeft
)
{
contentA
.
width
=
handleLimitLeft
}
else
{
}
// Resize A/B.
else
{
contentA
.
width
=
contentA
.
width
+
offset
}
}
...
...
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