Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
linphone-desktop
Commits
a2efc6fa
Commit
a2efc6fa
authored
Sep 14, 2016
by
Ronan
Browse files
fix(app): refactoring
parent
1832297f
Changes
25
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
167 additions
and
152 deletions
+167
-152
tests/imgs/call.svg
tests/imgs/call.svg
+0
-0
tests/imgs/cam.svg
tests/imgs/cam.svg
+0
-0
tests/imgs/conference.svg
tests/imgs/conference.svg
+0
-0
tests/imgs/contact.svg
tests/imgs/contact.svg
+0
-0
tests/imgs/delete.svg
tests/imgs/delete.svg
+17
-0
tests/resources.qrc
tests/resources.qrc
+40
-45
tests/ui/components/collapse/Collapse.qml
tests/ui/components/collapse/Collapse.qml
+1
-1
tests/ui/components/contact/Avatar.qml
tests/ui/components/contact/Avatar.qml
+5
-9
tests/ui/components/contact/Contact.qml
tests/ui/components/contact/Contact.qml
+43
-0
tests/ui/components/contact/ShortContactDescription.qml
tests/ui/components/contact/ShortContactDescription.qml
+4
-4
tests/ui/components/dialog/DialogDescription.qml
tests/ui/components/dialog/DialogDescription.qml
+0
-1
tests/ui/components/dialog/DialogPlus.qml
tests/ui/components/dialog/DialogPlus.qml
+1
-1
tests/ui/components/form/ActionBar.qml
tests/ui/components/form/ActionBar.qml
+10
-0
tests/ui/components/form/ActionButton.qml
tests/ui/components/form/ActionButton.qml
+22
-0
tests/ui/components/form/CheckBoxText.qml
tests/ui/components/form/CheckBoxText.qml
+8
-8
tests/ui/components/form/ExclusiveButtons.qml
tests/ui/components/form/ExclusiveButtons.qml
+5
-1
tests/ui/components/form/LightButton.qml
tests/ui/components/form/LightButton.qml
+0
-1
tests/ui/components/form/SmallButton.qml
tests/ui/components/form/SmallButton.qml
+7
-1
tests/ui/components/form/TransparentComboBox.qml
tests/ui/components/form/TransparentComboBox.qml
+4
-5
tests/ui/components/misc/Contact.qml
tests/ui/components/misc/Contact.qml
+0
-75
No files found.
tests/imgs/
phone
.svg
→
tests/imgs/
call
.svg
View file @
a2efc6fa
File moved
tests/imgs/cam
era
.svg
→
tests/imgs/cam.svg
View file @
a2efc6fa
File moved
tests/imgs/
start_
conference.svg
→
tests/imgs/conference.svg
View file @
a2efc6fa
File moved
tests/imgs/
avatar
.svg
→
tests/imgs/
contact
.svg
View file @
a2efc6fa
File moved
tests/imgs/delete.svg
0 → 100644
View file @
a2efc6fa
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width=
"63px"
height=
"82px"
viewBox=
"0 0 63 82"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
xmlns:sketch=
"http://www.bohemiancoding.com/sketch/ns"
>
<!-- Generator: Sketch 3.3.3 (12081) - http://www.bohemiancoding.com/sketch -->
<title>
delete
</title>
<desc>
Created with Sketch.
</desc>
<defs></defs>
<g
id=
"OUTILS"
stroke=
"none"
stroke-width=
"1"
fill=
"none"
fill-rule=
"evenodd"
sketch:type=
"MSPage"
>
<g
id=
"linphone_v2.0_icones_buttons"
sketch:type=
"MSArtboardGroup"
transform=
"translate(-1451.000000, -7131.000000)"
>
<g
id=
"delete"
sketch:type=
"MSLayerGroup"
transform=
"translate(1426.000000, 7115.000000)"
>
<g
transform=
"translate(27.000000, 19.000000)"
stroke=
"#444444"
id=
"Delete-icon"
stroke-width=
"5"
sketch:type=
"MSShapeGroup"
stroke-linecap=
"round"
stroke-linejoin=
"round"
>
<path
d=
"M29.5231579,75.5263158 L34.8768421,75.5263158 C46.4010526,75.5263158 48.46,64.9796053 48.46,64.9796053 L58.3389474,10.9707368 L0.5,10.9707368 L10.38,64.9796053 C10.38,64.9796053 12.4410526,75.5263158 23.9652632,75.5263158 L29.5231579,75.5263158 L29.5231579,75.5263158 Z M22.7305263,24.4726842 L22.7305263,75.5263158 L22.7305263,24.4726842 Z M36.1094737,24.4726842 L36.1094737,75.5263158 L36.1094737,24.4726842 Z M17.5852632,9.09494702e-13 L41.2568421,9.09494702e-13 L17.5852632,9.09494702e-13 Z"
></path>
</g>
<rect
id=
"Rectangle-232-Copy-27"
opacity=
"0"
fill-opacity=
"0.7"
fill=
"#FFFFFF"
sketch:type=
"MSShapeGroup"
x=
"0"
y=
"0"
width=
"120"
height=
"120"
></rect>
</g>
</g>
</g>
</svg>
\ No newline at end of file
tests/resources.qrc
View file @
a2efc6fa
<!DOCTYPE RCC>
<RCC
version=
"1.0"
>
<qresource
prefix=
"/"
>
<!-- Languages. -->
<file>
languages/en.qm
</file>
<file>
languages/fr.qm
</file>
<!-- UI: Components. -->
<file>
ui/components/collapse/Collapse.qml
</file>
<file>
ui/components/contact/Avatar.qml
</file>
<file>
ui/components/contact/ShortContactDescription.qml
</file>
<file>
ui/components/dialog/DialogDescription.qml
</file>
<file>
ui/components/dialog/DialogPlus.qml
</file>
<file>
ui/components/form/DarkButton.qml
</file>
<file>
ui/components/form/CheckBoxText.qml
</file>
<file>
ui/components/form/DropZone.qml
</file>
<file>
ui/components/form/ExclusiveButtons.qml
</file>
<file>
ui/components/form/LightButton.qml
</file>
<file>
ui/components/form/SmallButton.qml
</file>
<file>
ui/components/form/ToolBarButton.qml
</file>
<file>
ui/components/form/TransparentComboBox.qml
</file>
<file>
ui/components/misc/Contact.qml
</file>
<file>
ui/components/misc/MenuEntry.qml
</file>
<file>
ui/components/scrollBar/ForceScrollBar.qml
</file>
<file>
ui/components/select/SelectContact.qml
</file>
<!-- UI: Views. -->
<file>
ui/views/mainWindow/contacts.qml
</file>
<file>
ui/views/mainWindow/conversation.qml
</file>
<file>
ui/views/mainWindow/home.qml
</file>
<file>
ui/views/mainWindow/mainWindow.qml
</file>
<file>
ui/views/manageAccounts.qml
</file>
<file>
ui/views/newCall.qml
</file>
<!-- Images. -->
<file>
imgs/avatar.svg
</file>
<file>
imgs/camera.svg
</file>
<file>
imgs/chat_attachment.svg
</file>
<file>
imgs/collapse.svg
</file>
<file>
imgs/led_absent.svg
</file>
<file>
imgs/led_connected.svg
</file>
<file>
imgs/led_disconnected.svg
</file>
<file>
imgs/led_do_not_disturb.svg
</file>
<file>
imgs/phone.svg
</file>
<file>
imgs/start_conference.svg
</file>
<file>
imgs/valid.svg
</file>
</qresource>
<qresource
prefix=
"/"
>
<file>
languages/fr.qm
</file>
<file>
languages/en.qm
</file>
<file>
ui/components/scrollBar/ForceScrollBar.qml
</file>
<file>
ui/components/misc/MenuEntry.qml
</file>
<file>
ui/components/select/SelectContact.qml
</file>
<file>
ui/components/collapse/Collapse.qml
</file>
<file>
ui/components/contact/Contact.qml
</file>
<file>
ui/components/contact/ShortContactDescription.qml
</file>
<file>
ui/components/contact/Avatar.qml
</file>
<file>
ui/components/dialog/DialogDescription.qml
</file>
<file>
ui/components/dialog/DialogPlus.qml
</file>
<file>
ui/components/form/CheckBoxText.qml
</file>
<file>
ui/components/form/DropZone.qml
</file>
<file>
ui/components/form/LightButton.qml
</file>
<file>
ui/components/form/ExclusiveButtons.qml
</file>
<file>
ui/components/form/ActionBar.qml
</file>
<file>
ui/components/form/ActionButton.qml
</file>
<file>
ui/components/form/TransparentComboBox.qml
</file>
<file>
ui/components/form/SmallButton.qml
</file>
<file>
ui/components/form/DarkButton.qml
</file>
<file>
ui/views/newCall.qml
</file>
<file>
ui/views/manageAccounts.qml
</file>
<file>
ui/views/mainWindow/mainWindow.qml
</file>
<file>
ui/views/mainWindow/contacts.qml
</file>
<file>
ui/views/mainWindow/home.qml
</file>
<file>
ui/views/mainWindow/conversation.qml
</file>
<file>
imgs/led_disconnected.svg
</file>
<file>
imgs/valid.svg
</file>
<file>
imgs/led_do_not_disturb.svg
</file>
<file>
imgs/conference.svg
</file>
<file>
imgs/cam.svg
</file>
<file>
imgs/chat_attachment.svg
</file>
<file>
imgs/led_connected.svg
</file>
<file>
imgs/led_absent.svg
</file>
<file>
imgs/call.svg
</file>
<file>
imgs/collapse.svg
</file>
<file>
imgs/delete.svg
</file>
<file>
imgs/contact.svg
</file>
</qresource>
</RCC>
tests/ui/components/collapse/Collapse.qml
View file @
a2efc6fa
...
...
@@ -4,7 +4,6 @@ import QtQuick 2.7
Item
{
property
bool
enabled
:
false
property
alias
image
:
backgroundImage
.
source
signal
collapsed
(
bool
collapsed
)
...
...
@@ -18,6 +17,7 @@ Item {
anchors.fill
:
parent
fillMode
:
Image
.
PreserveAspectFit
id
:
backgroundImage
source
:
'
qrc:/imgs/collapse.svg
'
MouseArea
{
anchors.fill
:
parent
...
...
tests/ui/components/contact/Avatar.qml
View file @
a2efc6fa
import
QtQuick
2.7
import
QtGraphicalEffects
1.0
import
QtGraphicalEffects
1.0
// OpacityMask.
// ===================================================================
...
...
@@ -44,8 +44,8 @@ Item {
// Avatar.
OpacityMask
{
anchors.fill
:
imageToFilter
source
:
imageToFilter
maskSource
:
avatar
source
:
imageToFilter
}
// Presence.
...
...
@@ -55,13 +55,9 @@ Item {
fillMode
:
Image
.
PreserveAspectFit
height
:
parent
.
height
/
3
id
:
presenceImage
source
:
(
function
()
{
if
(
!
presence
)
{
return
''
}
return
'
qrc:/imgs/led_
'
+
presence
+
'
.svg
'
})()
source
:
presence
?
'
qrc:/imgs/led_
'
+
presence
+
'
.svg
'
:
''
width
:
parent
.
width
/
3
}
}
tests/ui/components/contact/Contact.qml
0 → 100644
View file @
a2efc6fa
import
QtQuick
2.7
import
QtQuick
.
Layouts
1.3
import
'
qrc:/ui/components/form
'
// ===================================================================
Item
{
property
alias
actions
:
actionBar
.
data
property
alias
image
:
avatar
.
image
property
alias
presence
:
avatar
.
presence
property
alias
sipAddress
:
contactDescription
.
sipAddress
property
string
username
id
:
contact
height
:
50
RowLayout
{
anchors.fill
:
parent
anchors.leftMargin
:
14
anchors.rightMargin
:
14
spacing
:
14
Avatar
{
Layout.preferredHeight
:
32
Layout.preferredWidth
:
32
id
:
avatar
username
:
contact
.
username
}
ShortContactDescription
{
Layout.fillHeight
:
true
Layout.fillWidth
:
true
id
:
contactDescription
username
:
contact
.
username
}
ActionBar
{
Layout.preferredHeight
:
32
id
:
actionBar
}
}
}
tests/ui/components/contact/ShortContactDescription.qml
View file @
a2efc6fa
...
...
@@ -3,8 +3,8 @@ import QtQuick 2.7
// ===================================================================
Column
{
property
string
sipAddress
property
string
username
property
alias
sipAddress
:
sipAddress
.
text
property
alias
username
:
username
.
text
// Username.
Text
{
...
...
@@ -13,7 +13,7 @@ Column {
font.pointSize
:
11
font.weight
:
Font
.
DemiBold
height
:
parent
.
height
/
2
text
:
username
id
:
username
verticalAlignment
:
Text
.
AlignBottom
width
:
parent
.
width
}
...
...
@@ -23,7 +23,7 @@ Column {
clip
:
true
color
:
'
#5A585B
'
height
:
parent
.
height
/
2
text
:
sipAddress
id
:
sipAddress
verticalAlignment
:
Text
.
AlignTop
width
:
parent
.
width
}
...
...
tests/ui/components/dialog/DialogDescription.qml
View file @
a2efc6fa
...
...
@@ -5,7 +5,6 @@ import QtQuick 2.7
// ===================================================================
Item
{
property
alias
fontSize
:
description
.
font
.
pointSize
property
alias
text
:
description
.
text
height
:
text
?
90
:
25
...
...
tests/ui/components/dialog/DialogPlus.qml
View file @
a2efc6fa
...
...
@@ -7,7 +7,7 @@ import QtQuick.Window 2.2
// ===================================================================
Window
{
default
property
alias
content
s
:
content
.
data
// Required.
default
property
alias
content
:
content
.
data
// Required.
property
alias
buttons
:
buttons
.
data
// Required.
property
alias
descriptionText
:
description
.
text
// Optionnal.
...
...
tests/ui/components/form/ActionBar.qml
0 → 100644
View file @
a2efc6fa
import
QtQuick
2.7
// ===================================================================
// Bar which can contains ActionButton.
// ===================================================================
Row
{
property
int
iconSize
spacing
:
8
}
tests/ui/components/form/
ToolBar
Button.qml
→
tests/ui/components/form/
Action
Button.qml
View file @
a2efc6fa
...
...
@@ -2,13 +2,21 @@ import QtQuick 2.7
import
QtQuick
.
Controls
2.0
// ===================================================================
// An animated small button with an image.
// ===================================================================
Button
{
property
int
iconSize
property
string
icon
ToolButton
{
property
alias
image
:
backgroundImage
.
source
// Ugly hack, use current size, ActionBar size,
// or other parent height.
height
:
iconSize
||
parent
.
iconSize
||
parent
.
height
width
:
iconSize
||
parent
.
iconSize
||
parent
.
height
Image
{
anchors.fill
:
parent
fillMode
:
Image
.
PreserveAspectFit
id
:
backgroundImage
source
:
'
qrc:/imgs/
'
+
parent
.
icon
+
'
.svg
'
}
}
tests/ui/components/form/CheckBoxText.qml
View file @
a2efc6fa
...
...
@@ -6,6 +6,14 @@ import QtQuick.Controls 2.0
// ===================================================================
CheckBox
{
contentItem
:
Text
{
color
:
checkBox
.
down
?
'
#FE5E00
'
:
'
#8E8E8E
'
font
:
checkBox
.
font
horizontalAlignment
:
Text
.
AlignHCenter
leftPadding
:
checkBox
.
indicator
.
width
+
checkBox
.
spacing
text
:
checkBox
.
text
verticalAlignment
:
Text
.
AlignVCenter
}
id
:
checkBox
indicator
:
Rectangle
{
border.color
:
checkBox
.
down
?
'
#FE5E00
'
:
'
#8E8E8E
'
...
...
@@ -25,12 +33,4 @@ CheckBox {
y
:
4
}
}
contentItem
:
Text
{
color
:
checkBox
.
down
?
'
#FE5E00
'
:
'
#8E8E8E
'
font
:
checkBox
.
font
horizontalAlignment
:
Text
.
AlignHCenter
leftPadding
:
checkBox
.
indicator
.
width
+
checkBox
.
spacing
text
:
checkBox
.
text
verticalAlignment
:
Text
.
AlignVCenter
}
}
tests/ui/components/form/ExclusiveButtons.qml
View file @
a2efc6fa
...
...
@@ -12,13 +12,17 @@ Row {
Repeater
{
model
:
texts
SmallButton
{
anchors.verticalCenter
:
parent
.
verticalCenter
backgroundColor
:
selectedButton
===
index
?
'
#8E8E8E
'
:
(
button
.
down
?
'
#FE5E00
'
:
'
#D1D1D1
'
:
(
button
.
hovered
?
'
#C0C0C0
'
:
'
#D1D1D1
'
)
)
id
:
button
text
:
modelData
...
...
tests/ui/components/form/LightButton.qml
View file @
a2efc6fa
import
QtQuick
2.7
import
QtQuick
.
Controls
2.0
// ===================================================================
...
...
tests/ui/components/form/SmallButton.qml
View file @
a2efc6fa
...
...
@@ -7,7 +7,12 @@ Button {
property
alias
backgroundColor
:
background
.
color
background
:
Rectangle
{
color
:
button
.
down
?
'
#FE5E00
'
:
'
#8E8E8E
'
color
:
button
.
down
?
'
#FE5E00
'
:
(
button
.
hovered
?
'
#C0C0C0
'
:
'
#D1D1D1
'
)
id
:
background
implicitHeight
:
22
radius
:
10
...
...
@@ -20,5 +25,6 @@ Button {
text
:
button
.
text
verticalAlignment
:
Text
.
AlignVCenter
}
hoverEnabled
:
true
id
:
button
}
tests/ui/components/form/TransparentComboBox.qml
View file @
a2efc6fa
...
...
@@ -14,11 +14,10 @@ ComboBox {
background
:
Rectangle
{
color
:
delegate
.
down
?
'
#FE5E00
'
:
(
comboBox
.
currentIndex
===
index
?
'
#F0F0F0
'
:
'
#FFFFFF
'
)
:
(
comboBox
.
currentIndex
===
index
?
'
#F0F0F0
'
:
'
#FFFFFF
'
)
opacity
:
enabled
?
1
:
0.3
}
font.weight
:
comboBox
.
currentIndex
===
index
...
...
tests/ui/components/misc/Contact.qml
deleted
100644 → 0
View file @
1832297f
import
QtQuick
2.7
import
QtQuick
.
Layouts
1.3
Item
{
property
alias
sipAddress
:
sipAddressText
.
text
property
alias
username
:
usernameText
.
text
property
string
avatar
:
'
qrc:/imgs/avatar.svg
'
// Default.
id
:
contact
height
:
50
RowLayout
{
anchors.fill
:
parent
// Avatar.
Image
{
Layout.fillHeight
:
parent
.
height
Layout.margins
:
5
Layout.preferredWidth
:
50
fillMode
:
Image
.
PreserveAspectFit
id
:
avatarImage
source
:
contact
.
avatar
}
// Sip address & username.
Column
{
Layout.fillHeight
:
parent
.
height
Layout.fillWidth
:
true
// Username.
Text
{
clip
:
true
color
:
'
#5A585B
'
font.weight
:
Font
.
DemiBold
height
:
parent
.
height
/
2
id
:
usernameText
verticalAlignment
:
Text
.
AlignBottom
width
:
parent
.
width
}
// Sip address.
Text
{
clip
:
true
color
:
'
#5A585B
'
height
:
parent
.
height
/
2
id
:
sipAddressText
verticalAlignment
:
Text
.
AlignTop
width
:
parent
.
width
}
}
// Actions.
Row
{
Layout.fillHeight
:
parent
.
height
Layout.preferredWidth
:
90
Layout.margins
:
10
// Call.
Image
{
fillMode
:
Image
.
PreserveAspectFit
height
:
parent
.
height
source
:
'
qrc:/imgs/phone.svg
'
width
:
parent
.
width
/
2
}
// Camera.
Image
{
fillMode
:
Image
.
PreserveAspectFit
height
:
parent
.
height
source
:
'
qrc:/imgs/camera.svg
'
width
:
parent
.
width
/
2
}
}
}
}
Prev
1
2
Next
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