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
c6d0d188
Commit
c6d0d188
authored
Oct 06, 2016
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(Paned): it is possible to define the default area to resize when window is resized
parent
cf031ea4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
9 deletions
+23
-9
Paned.qml
tests/ui/modules/Linphone/Paned.qml
+10
-4
Calls.qml
tests/ui/views/Calls/Calls.qml
+13
-5
No files found.
tests/ui/modules/Linphone/Paned.qml
View file @
c6d0d188
...
...
@@ -26,8 +26,10 @@ Item {
property
alias
childA
:
contentA
.
data
property
alias
childB
:
contentB
.
data
property
bool
defaultClosed
property
bool
defaultClosed
:
false
property
int
closingEdge
:
Qt
.
LeftEdge
property
int
defaultChildAWidth
property
bool
resizeAInPriority
:
false
// User limits: string or int values.
// By default: no limits.
...
...
@@ -107,6 +109,8 @@ Item {
// width(B) > maximum width(B).
else
if
(
maximumRightLimit
!=
null
&&
theoreticalBWidth
>
maximumRightLimit
)
{
contentA
.
width
=
container
.
width
-
handle
.
width
-
maximumRightLimit
}
else
if
(
resizeAInPriority
)
{
contentA
.
width
=
container
.
width
-
handle
.
width
-
contentB
.
width
}
}
...
...
@@ -210,10 +214,12 @@ Item {
_minimumLeftLimit
=
_parseLimit
(
minimumLeftLimit
)
_minimumRightLimit
=
_parseLimit
(
minimumRightLimit
)
_isClosed
=
defaultClosed
contentA
.
width
=
_getLimitValue
(
_minimumLeftLimit
)
contentA
.
width
=
(
defaultChildAWidth
==
null
)
?
_getLimitValue
(
_minimumLeftLimit
)
:
defaultChildAWidth
_applyLimits
()
_isClosed
=
defaultClosed
_savedContentAWidth
=
contentA
.
width
}
Item
{
...
...
tests/ui/views/Calls/Calls.qml
View file @
c6d0d188
...
...
@@ -6,16 +6,18 @@ import QtQuick.Controls 2.0
import
Linphone
1.0
Window
{
minimumHeight
:
480
minimumWidth
:
780
id
:
window
minimumHeight
:
480
minimumWidth
:
960
Paned
{
anchors.fill
:
parent
defaultChildAWidth
:
250
maximumLeftLimit
:
300
minimumLeftLimit
:
50
// Calls list.
childA
:
Rectangle
{
anchors.fill
:
parent
color
:
'
yellow
'
...
...
@@ -25,13 +27,17 @@ Window {
}
}
// Call / Chat.
childB
:
Paned
{
anchors.fill
:
parent
closingEdge
:
Qt
.
RightEdge
defaultChildAWidth
:
300
defaultClosed
:
true
minimumLeftLimit
:
'
40%
'
minimumRightLimit
:
200
minimumLeftLimit
:
250
minimumRightLimit
:
350
resizeAInPriority
:
true
// Call.
childA
:
Rectangle
{
anchors.fill
:
parent
color
:
'
orange
'
...
...
@@ -41,9 +47,11 @@ Window {
}
}
// Chat.
childB
:
Rectangle
{
anchors.fill
:
parent
color
:
'
green
'
Text
{
text
:
'
hello2
'
}
...
...
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