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
f269bda9
Commit
f269bda9
authored
Oct 19, 2016
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(Paned): display only visible panel(s)
parent
1d681621
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
Paned.qml
tests/ui/modules/Common/Paned.qml
+14
-4
No files found.
tests/ui/modules/Common/Paned.qml
View file @
f269bda9
...
...
@@ -27,7 +27,7 @@ Item {
property
alias
childA
:
contentA
.
data
property
alias
childB
:
contentB
.
data
property
bool
defaultClosed
:
false
property
int
closingEdge
:
Qt
.
LeftEdge
property
int
closingEdge
:
Qt
.
LeftEdge
// `LeftEdge` or `RightEdge`.
property
int
defaultChildAWidth
property
bool
resizeAInPriority
:
false
...
...
@@ -90,7 +90,7 @@ Item {
// If closed, set correctly the handle position to left or right.
if
(
_isClosed
)
{
contentA
.
width
=
(
closingEdge
===
Qt
.
Righ
tEdge
)
contentA
.
width
=
(
closingEdge
!==
Qt
.
Lef
tEdge
)
?
container
.
width
-
handle
.
width
:
0
}
...
...
@@ -161,7 +161,7 @@ Item {
else
if
(
theoreticalBWidth
<
minimumRightLimit
)
{
contentA
.
width
=
container
.
width
-
handle
.
width
-
minimumRightLimit
if
(
closingEdge
===
Qt
.
Righ
tEdge
&&
offset
>
minimumRightLimit
/
2
)
{
if
(
closingEdge
!==
Qt
.
Lef
tEdge
&&
offset
>
minimumRightLimit
/
2
)
{
if
(
_isClosed
)
{
_open
()
}
else
{
...
...
@@ -202,6 +202,14 @@ Item {
}
}
function
_isVisible
(
edge
)
{
return
(
!
_isClosed
||
openingTransition
.
running
||
closingTransition
.
running
)
||
closingEdge
!==
edge
}
// -----------------------------------------------------------------
onWidthChanged
:
_applyLimits
()
...
...
@@ -226,6 +234,7 @@ Item {
id
:
contentA
height
:
parent
.
height
visible
:
_isVisible
(
Qt
.
LeftEdge
)
}
MouseArea
{
...
...
@@ -241,7 +250,7 @@ Item {
onDoubleClicked
:
_inverseClosingState
()
onMouseXChanged
:
pressed
&&
_applyLimitsOnUserMove
(
handle
.
mouseX
-
_mouseStart
)
_applyLimitsOnUserMove
(
mouseX
-
_mouseStart
)
onPressed
:
_mouseStart
=
mouseX
...
...
@@ -261,6 +270,7 @@ Item {
anchors.left
:
handle
.
right
height
:
parent
.
height
visible
:
_isVisible
(
Qt
.
RightEdge
)
width
:
container
.
width
-
contentA
.
width
-
handle
.
width
}
...
...
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