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
45542488
Commit
45542488
authored
Mar 06, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ui/modules/Common/Form/Placements/Form): supports vertical orientation
parent
344dd94c
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
177 additions
and
51 deletions
+177
-51
resources.qrc
linphone-desktop/resources.qrc
+4
-1
Form.qml
linphone-desktop/ui/modules/Common/Form/Placements/Form.qml
+1
-0
FormEmptyLine.qml
...sktop/ui/modules/Common/Form/Placements/FormEmptyLine.qml
+1
-1
FormGroup.qml
...e-desktop/ui/modules/Common/Form/Placements/FormGroup.qml
+19
-46
FormHGroup.qml
...-desktop/ui/modules/Common/Form/Placements/FormHGroup.qml
+65
-0
FormLine.qml
...ne-desktop/ui/modules/Common/Form/Placements/FormLine.qml
+4
-2
FormVGroup.qml
...-desktop/ui/modules/Common/Form/Placements/FormVGroup.qml
+62
-0
FormHGroupStyle.qml
...modules/Common/Styles/Form/Placements/FormHGroupStyle.qml
+0
-0
FormVGroupStyle.qml
...modules/Common/Styles/Form/Placements/FormVGroupStyle.qml
+19
-0
qmldir
linphone-desktop/ui/modules/Common/Styles/qmldir
+2
-1
No files found.
linphone-desktop/resources.qrc
View file @
45542488
...
@@ -195,11 +195,13 @@
...
@@ -195,11 +195,13 @@
<file>
ui/modules/Common/Form/ListForm.qml
</file>
<file>
ui/modules/Common/Form/ListForm.qml
</file>
<file>
ui/modules/Common/Form/Placements/FormEmptyLine.qml
</file>
<file>
ui/modules/Common/Form/Placements/FormEmptyLine.qml
</file>
<file>
ui/modules/Common/Form/Placements/FormGroup.qml
</file>
<file>
ui/modules/Common/Form/Placements/FormGroup.qml
</file>
<file>
ui/modules/Common/Form/Placements/FormHGroup.qml
</file>
<file>
ui/modules/Common/Form/Placements/FormLine.qml
</file>
<file>
ui/modules/Common/Form/Placements/FormLine.qml
</file>
<file>
ui/modules/Common/Form/Placements/Form.qml
</file>
<file>
ui/modules/Common/Form/Placements/Form.qml
</file>
<file>
ui/modules/Common/Form/Placements/FormTableEntry.qml
</file>
<file>
ui/modules/Common/Form/Placements/FormTableEntry.qml
</file>
<file>
ui/modules/Common/Form/Placements/FormTableLine.qml
</file>
<file>
ui/modules/Common/Form/Placements/FormTableLine.qml
</file>
<file>
ui/modules/Common/Form/Placements/FormTable.qml
</file>
<file>
ui/modules/Common/Form/Placements/FormTable.qml
</file>
<file>
ui/modules/Common/Form/Placements/FormVGroup.qml
</file>
<file>
ui/modules/Common/Form/SearchBox.qml
</file>
<file>
ui/modules/Common/Form/SearchBox.qml
</file>
<file>
ui/modules/Common/Form/StaticListForm.qml
</file>
<file>
ui/modules/Common/Form/StaticListForm.qml
</file>
<file>
ui/modules/Common/Form/Switch.qml
</file>
<file>
ui/modules/Common/Form/Switch.qml
</file>
...
@@ -239,11 +241,12 @@
...
@@ -239,11 +241,12 @@
<file>
ui/modules/Common/Styles/Form/Fields/TextAreaFieldStyle.qml
</file>
<file>
ui/modules/Common/Styles/Form/Fields/TextAreaFieldStyle.qml
</file>
<file>
ui/modules/Common/Styles/Form/Fields/TextFieldStyle.qml
</file>
<file>
ui/modules/Common/Styles/Form/Fields/TextFieldStyle.qml
</file>
<file>
ui/modules/Common/Styles/Form/ListFormStyle.qml
</file>
<file>
ui/modules/Common/Styles/Form/ListFormStyle.qml
</file>
<file>
ui/modules/Common/Styles/Form/Placements/FormGroupStyle.qml
</file>
<file>
ui/modules/Common/Styles/Form/Placements/Form
H
GroupStyle.qml
</file>
<file>
ui/modules/Common/Styles/Form/Placements/FormLineStyle.qml
</file>
<file>
ui/modules/Common/Styles/Form/Placements/FormLineStyle.qml
</file>
<file>
ui/modules/Common/Styles/Form/Placements/FormStyle.qml
</file>
<file>
ui/modules/Common/Styles/Form/Placements/FormStyle.qml
</file>
<file>
ui/modules/Common/Styles/Form/Placements/FormTableLineStyle.qml
</file>
<file>
ui/modules/Common/Styles/Form/Placements/FormTableLineStyle.qml
</file>
<file>
ui/modules/Common/Styles/Form/Placements/FormTableStyle.qml
</file>
<file>
ui/modules/Common/Styles/Form/Placements/FormTableStyle.qml
</file>
<file>
ui/modules/Common/Styles/Form/Placements/FormVGroupStyle.qml
</file>
<file>
ui/modules/Common/Styles/Form/SearchBoxStyle.qml
</file>
<file>
ui/modules/Common/Styles/Form/SearchBoxStyle.qml
</file>
<file>
ui/modules/Common/Styles/Form/SwitchStyle.qml
</file>
<file>
ui/modules/Common/Styles/Form/SwitchStyle.qml
</file>
<file>
ui/modules/Common/Styles/Form/Tab/TabButtonStyle.qml
</file>
<file>
ui/modules/Common/Styles/Form/Tab/TabButtonStyle.qml
</file>
...
...
linphone-desktop/ui/modules/Common/Form/Placements/Form.qml
View file @
45542488
...
@@ -7,6 +7,7 @@ import Common.Styles 1.0
...
@@ -7,6 +7,7 @@ import Common.Styles 1.0
Column
{
Column
{
property
alias
title
:
title
.
text
property
alias
title
:
title
.
text
property
int
orientation
:
Qt
.
Horizontal
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
...
...
linphone-desktop/ui/modules/Common/Form/Placements/FormEmptyLine.qml
View file @
45542488
...
@@ -5,6 +5,6 @@ import Common.Styles 1.0
...
@@ -5,6 +5,6 @@ import Common.Styles 1.0
// =============================================================================
// =============================================================================
Item
{
Item
{
height
:
FormGroupStyle
.
legend
.
height
height
:
Form
H
GroupStyle
.
legend
.
height
width
:
parent
.
width
width
:
parent
.
width
}
}
linphone-desktop/ui/modules/Common/Form/Placements/FormGroup.qml
View file @
45542488
import
QtQuick
2.7
import
QtQuick
2.7
import
QtQuick
.
Layouts
1.3
import
Common
.
Styles
1.0
// =============================================================================
// =============================================================================
RowLayout
{
Loader
{
property
alias
label
:
label
.
text
id
:
loader
// ---------------------------------------------------------------------------
property
string
label
readonly
property
int
orientation
:
parent
.
orientation
default
property
var
_content
:
null
default
property
var
_content
:
null
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
s
pacing
:
FormGroupStyle
.
spacing
s
ourceComponent
:
orientation
===
Qt
.
Horizontal
?
hGroup
:
vGroup
width
:
parent
.
maxItemWidth
width
:
parent
.
maxItemWidth
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
Tex
t
{
Componen
t
{
id
:
label
id
:
hGroup
Layout.preferredHeight
:
FormGroupStyle
.
legend
.
height
FormHGroup
{
Layout.preferredWidth
:
FormGroupStyle
.
legend
.
width
_content
:
loader
.
_content
label
:
loader
.
label
color
:
FormGroupStyle
.
legend
.
color
}
elide
:
Text
.
ElideRight
font.pointSize
:
FormGroupStyle
.
legend
.
fontSize
horizontalAlignment
:
Text
.
AlignRight
verticalAlignment
:
Text
.
AlignVCenter
}
}
// ---------------------------------------------------------------------------
Component
{
id
:
vGroup
Item
{
readonly
property
int
currentHeight
:
_content
?
_content
.
height
:
0
Layout.alignment
:
(
currentHeight
<
FormGroupStyle
.
legend
.
height
?
Qt
.
AlignVCenter
:
Qt
.
AlignTop
)
|
Qt
.
AlignLeft
Layout.fillWidth
:
true
Layout.preferredHeight
:
currentHeight
Loader
{
active
:
!!
_content
anchors.fill
:
parent
sourceComponent
:
Item
{
id
:
content
data
:
[
_content
]
width
:
parent
.
width
Component.onCompleted
:
_content
.
width
=
Qt
.
binding
(
function
()
{
FormVGroup
{
var
contentWidth
=
content
.
width
_content
:
loader
.
_content
var
wishedWidth
=
FormGroupStyle
.
content
.
maxWidth
label
:
loader
.
label
return
contentWidth
>
wishedWidth
?
wishedWidth
:
contentWidth
})
}
}
}
}
}
}
}
linphone-desktop/ui/modules/Common/Form/Placements/FormHGroup.qml
0 → 100644
View file @
45542488
import
QtQuick
2.7
import
QtQuick
.
Layouts
1.3
import
Common
.
Styles
1.0
// =============================================================================
RowLayout
{
property
alias
label
:
label
.
text
default
property
var
_content
:
null
// ---------------------------------------------------------------------------
spacing
:
FormHGroupStyle
.
spacing
// ---------------------------------------------------------------------------
Text
{
id
:
label
Layout.preferredHeight
:
FormHGroupStyle
.
legend
.
height
Layout.preferredWidth
:
FormHGroupStyle
.
legend
.
width
color
:
FormHGroupStyle
.
legend
.
color
elide
:
Text
.
ElideRight
font.pointSize
:
FormHGroupStyle
.
legend
.
fontSize
horizontalAlignment
:
Text
.
AlignRight
verticalAlignment
:
Text
.
AlignVCenter
}
// ---------------------------------------------------------------------------
Item
{
readonly
property
int
currentHeight
:
_content
?
_content
.
height
:
0
Layout.alignment
:
(
currentHeight
<
FormHGroupStyle
.
legend
.
height
?
Qt
.
AlignVCenter
:
Qt
.
AlignTop
)
|
Qt
.
AlignLeft
Layout.fillWidth
:
true
Layout.preferredHeight
:
currentHeight
Loader
{
active
:
!!
_content
anchors.fill
:
parent
sourceComponent
:
Item
{
id
:
content
data
:
[
_content
]
width
:
parent
.
width
Component.onCompleted
:
_content
.
width
=
Qt
.
binding
(
function
()
{
var
contentWidth
=
content
.
width
var
wishedWidth
=
FormHGroupStyle
.
content
.
maxWidth
return
contentWidth
>
wishedWidth
?
wishedWidth
:
contentWidth
})
}
}
}
}
linphone-desktop/ui/modules/Common/Form/Placements/FormLine.qml
View file @
45542488
import
QtQuick
2.7
import
QtQuick
2.7
import
QtQuick
.
Layouts
1.3
import
Common
.
Styles
1.0
import
Common
.
Styles
1.0
...
@@ -9,10 +8,13 @@ Row {
...
@@ -9,10 +8,13 @@ Row {
readonly
property
double
maxItemWidth
:
{
readonly
property
double
maxItemWidth
:
{
var
n
=
children
.
length
var
n
=
children
.
length
var
curWidth
=
width
/
n
-
(
n
-
1
)
*
spacing
var
curWidth
=
width
/
n
-
(
n
-
1
)
*
spacing
var
maxWidth
=
FormGroupStyle
.
legend
.
width
+
FormGroupStyle
.
content
.
maxWidth
+
FormGroupStyle
.
spacing
var
maxWidth
=
orientation
===
Qt
.
Horizontal
?
FormHGroupStyle
.
legend
.
width
+
FormHGroupStyle
.
content
.
maxWidth
+
FormHGroupStyle
.
spacing
:
FormVGroupStyle
.
content
.
maxWidth
return
curWidth
<
maxWidth
?
curWidth
:
maxWidth
return
curWidth
<
maxWidth
?
curWidth
:
maxWidth
}
}
readonly
property
int
orientation
:
parent
.
orientation
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
...
...
linphone-desktop/ui/modules/Common/Form/Placements/FormVGroup.qml
0 → 100644
View file @
45542488
import
QtQuick
2.7
import
QtQuick
.
Layouts
1.3
import
Common
.
Styles
1.0
// =============================================================================
ColumnLayout
{
property
alias
label
:
label
.
text
default
property
var
_content
:
null
// ---------------------------------------------------------------------------
spacing
:
FormVGroupStyle
.
spacing
width
:
parent
.
maxItemWidth
// ---------------------------------------------------------------------------
Text
{
id
:
label
Layout.fillWidth
:
true
color
:
FormVGroupStyle
.
legend
.
color
elide
:
Text
.
ElideRight
font
{
bold
:
true
pointSize
:
FormVGroupStyle
.
legend
.
fontSize
}
verticalAlignment
:
Text
.
AlignVCenter
}
// ---------------------------------------------------------------------------
Item
{
readonly
property
int
currentHeight
:
_content
?
_content
.
height
:
0
Layout.fillWidth
:
true
Layout.preferredHeight
:
currentHeight
Loader
{
active
:
!!
_content
anchors.fill
:
parent
sourceComponent
:
Item
{
id
:
content
data
:
[
_content
]
width
:
parent
.
width
Component.onCompleted
:
_content
.
width
=
Qt
.
binding
(
function
()
{
var
contentWidth
=
content
.
width
var
wishedWidth
=
FormVGroupStyle
.
content
.
maxWidth
return
contentWidth
>
wishedWidth
?
wishedWidth
:
contentWidth
})
}
}
}
}
linphone-desktop/ui/modules/Common/Styles/Form/Placements/FormGroupStyle.qml
→
linphone-desktop/ui/modules/Common/Styles/Form/Placements/Form
H
GroupStyle.qml
View file @
45542488
File moved
linphone-desktop/ui/modules/Common/Styles/Form/Placements/FormVGroupStyle.qml
0 → 100644
View file @
45542488
pragma
Singleton
import
QtQuick
2.7
import
Common
1.0
// =============================================================================
QtObject
{
property
int
spacing
:
5
property
QtObject
content
:
QtObject
{
property
int
maxWidth
:
400
}
property
QtObject
legend
:
QtObject
{
property
color
color
:
Colors
.
j
property
int
fontSize
:
10
}
}
linphone-desktop/ui/modules/Common/Styles/qmldir
View file @
45542488
...
@@ -28,11 +28,12 @@ singleton NumericFieldStyle 1.0 Form/Fields/NumericFieldStyle.qml
...
@@ -28,11 +28,12 @@ singleton NumericFieldStyle 1.0 Form/Fields/NumericFieldStyle.qml
singleton TextAreaFieldStyle 1.0 Form/Fields/TextAreaFieldStyle.qml
singleton TextAreaFieldStyle 1.0 Form/Fields/TextAreaFieldStyle.qml
singleton TextFieldStyle 1.0 Form/Fields/TextFieldStyle.qml
singleton TextFieldStyle 1.0 Form/Fields/TextFieldStyle.qml
singleton Form
GroupStyle 1.0 Form/Placements/Form
GroupStyle.qml
singleton Form
HGroupStyle 1.0 Form/Placements/FormH
GroupStyle.qml
singleton FormLineStyle 1.0 Form/Placements/FormLineStyle.qml
singleton FormLineStyle 1.0 Form/Placements/FormLineStyle.qml
singleton FormStyle 1.0 Form/Placements/FormStyle.qml
singleton FormStyle 1.0 Form/Placements/FormStyle.qml
singleton FormTableLineStyle 1.0 Form/Placements/FormTableLineStyle.qml
singleton FormTableLineStyle 1.0 Form/Placements/FormTableLineStyle.qml
singleton FormTableStyle 1.0 Form/Placements/FormTableStyle.qml
singleton FormTableStyle 1.0 Form/Placements/FormTableStyle.qml
singleton FormVGroupStyle 1.0 Form/Placements/FormVGroupStyle.qml
singleton TabButtonStyle 1.0 Form/Tab/TabButtonStyle.qml
singleton TabButtonStyle 1.0 Form/Tab/TabButtonStyle.qml
singleton TabContainerStyle 1.0 Form/Tab/TabContainerStyle.qml
singleton TabContainerStyle 1.0 Form/Tab/TabContainerStyle.qml
...
...
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