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
30c2c8cd
Commit
30c2c8cd
authored
Dec 08, 2016
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ui/views/App/MainWindow/ContactEdit): use a custom transparent text input
parent
93c88e8a
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
78 additions
and
55 deletions
+78
-55
resources.qrc
tests/resources.qrc
+2
-2
ListForm.qml
tests/ui/modules/Common/Form/ListForm.qml
+5
-5
ScrollableTextEdit.qml
tests/ui/modules/Common/Form/ScrollableTextEdit.qml
+4
-4
TextEdit.qml
tests/ui/modules/Common/Form/TextEdit.qml
+0
-35
TextField.qml
tests/ui/modules/Common/Form/TextField.qml
+2
-0
TransparentTextInput.qml
tests/ui/modules/Common/Form/TransparentTextInput.qml
+57
-0
ListFormStyle.qml
tests/ui/modules/Common/Styles/Form/ListFormStyle.qml
+1
-1
TransparentTextInputStyle.qml
.../modules/Common/Styles/Form/TransparentTextInputStyle.qml
+3
-5
qmldir
tests/ui/modules/Common/Styles/qmldir
+1
-1
qmldir
tests/ui/modules/Common/qmldir
+1
-1
Message.qml
tests/ui/modules/Linphone/Chat/Message.qml
+1
-0
ContactEdit.qml
tests/ui/views/App/MainWindow/ContactEdit.qml
+1
-1
No files found.
tests/resources.qrc
View file @
30c2c8cd
...
@@ -141,9 +141,9 @@
...
@@ -141,9 +141,9 @@
<file>
ui/modules/Common/Form/SmallButton.qml
</file>
<file>
ui/modules/Common/Form/SmallButton.qml
</file>
<file>
ui/modules/Common/Form/TextButtonA.qml
</file>
<file>
ui/modules/Common/Form/TextButtonA.qml
</file>
<file>
ui/modules/Common/Form/TextButtonB.qml
</file>
<file>
ui/modules/Common/Form/TextButtonB.qml
</file>
<file>
ui/modules/Common/Form/TextEdit.qml
</file>
<file>
ui/modules/Common/Form/TextField.qml
</file>
<file>
ui/modules/Common/Form/TextField.qml
</file>
<file>
ui/modules/Common/Form/TransparentComboBox.qml
</file>
<file>
ui/modules/Common/Form/TransparentComboBox.qml
</file>
<file>
ui/modules/Common/Form/TransparentTextInput.qml
</file>
<file>
ui/modules/Common/Image/Icon.qml
</file>
<file>
ui/modules/Common/Image/Icon.qml
</file>
<file>
ui/modules/Common/Image/RoundedImage.qml
</file>
<file>
ui/modules/Common/Image/RoundedImage.qml
</file>
<file>
ui/modules/Common/InvertedMouseArea.qml
</file>
<file>
ui/modules/Common/InvertedMouseArea.qml
</file>
...
@@ -171,9 +171,9 @@
...
@@ -171,9 +171,9 @@
<file>
ui/modules/Common/Styles/Form/SmallButtonStyle.qml
</file>
<file>
ui/modules/Common/Styles/Form/SmallButtonStyle.qml
</file>
<file>
ui/modules/Common/Styles/Form/TextButtonAStyle.qml
</file>
<file>
ui/modules/Common/Styles/Form/TextButtonAStyle.qml
</file>
<file>
ui/modules/Common/Styles/Form/TextButtonBStyle.qml
</file>
<file>
ui/modules/Common/Styles/Form/TextButtonBStyle.qml
</file>
<file>
ui/modules/Common/Styles/Form/TextEditStyle.qml
</file>
<file>
ui/modules/Common/Styles/Form/TextFieldStyle.qml
</file>
<file>
ui/modules/Common/Styles/Form/TextFieldStyle.qml
</file>
<file>
ui/modules/Common/Styles/Form/TransparentComboBoxStyle.qml
</file>
<file>
ui/modules/Common/Styles/Form/TransparentComboBoxStyle.qml
</file>
<file>
ui/modules/Common/Styles/Form/TransparentTextInputStyle.qml
</file>
<file>
ui/modules/Common/Styles/Menu/ActionMenuStyle.qml
</file>
<file>
ui/modules/Common/Styles/Menu/ActionMenuStyle.qml
</file>
<file>
ui/modules/Common/Styles/Menu/MenuStyle.qml
</file>
<file>
ui/modules/Common/Styles/Menu/MenuStyle.qml
</file>
<file>
ui/modules/Common/Styles/PanedStyle.qml
</file>
<file>
ui/modules/Common/Styles/PanedStyle.qml
</file>
...
...
tests/ui/modules/Common/Form/ListForm.qml
View file @
30c2c8cd
...
@@ -109,14 +109,14 @@ RowLayout {
...
@@ -109,14 +109,14 @@ RowLayout {
visible
:
model
.
count
>
0
visible
:
model
.
count
>
0
delegate
:
Item
{
delegate
:
Item
{
implicitHeight
:
text
Edi
t
.
height
implicitHeight
:
text
Inpu
t
.
height
width
:
parent
.
width
width
:
parent
.
width
T
extEdi
t
{
T
ransparentTextInpu
t
{
id
:
text
Edi
t
id
:
text
Inpu
t
text
:
$value
text
:
$value
width
:
300
width
:
parent
.
width
height
:
ListFormStyle
.
lineHeight
height
:
ListFormStyle
.
lineHeight
onEditingFinished
:
_handleEditionFinished
(
index
,
text
)
onEditingFinished
:
_handleEditionFinished
(
index
,
text
)
...
@@ -131,7 +131,7 @@ RowLayout {
...
@@ -131,7 +131,7 @@ RowLayout {
// So, I choose to run a callback executed after this
// So, I choose to run a callback executed after this
// internal event.
// internal event.
Utils
.
setTimeout
(
listForm
,
0
,
function
()
{
Utils
.
setTimeout
(
listForm
,
0
,
function
()
{
text
Edi
t
.
forceActiveFocus
()
text
Inpu
t
.
forceActiveFocus
()
})
})
}
}
}
}
...
...
tests/ui/modules/Common/Form/ScrollableTextEdit.qml
View file @
30c2c8cd
...
@@ -25,8 +25,8 @@ Item {
...
@@ -25,8 +25,8 @@ Item {
Rectangle
{
Rectangle
{
anchors.fill
:
flick
anchors.fill
:
flick
color
:
textEdit
.
activeFocus
&&
!
textEdit
.
readOnly
color
:
textEdit
.
activeFocus
&&
!
textEdit
.
readOnly
?
T
extEdi
tStyle
.
backgroundColor
.
focused
?
T
ransparentTextInpu
tStyle
.
backgroundColor
.
focused
:
TextEditStyle
.
backgroundColor
.
normal
:
'
transparent
'
InvertedMouseArea
{
InvertedMouseArea
{
anchors.fill
:
parent
anchors.fill
:
parent
...
@@ -64,8 +64,8 @@ Item {
...
@@ -64,8 +64,8 @@ Item {
id
:
textEdit
id
:
textEdit
color
:
activeFocus
&&
!
readOnly
color
:
activeFocus
&&
!
readOnly
?
T
extEdi
tStyle
.
textColor
.
focused
?
T
ransparentTextInpu
tStyle
.
textColor
.
focused
:
T
extEdi
tStyle
.
textColor
.
normal
:
T
ransparentTextInpu
tStyle
.
textColor
.
normal
selectByMouse
:
true
selectByMouse
:
true
width
:
flick
.
width
width
:
flick
.
width
wrapMode
:
Text
.
Wrap
wrapMode
:
Text
.
Wrap
...
...
tests/ui/modules/Common/Form/TextEdit.qml
deleted
100644 → 0
View file @
93c88e8a
import
QtQuick
2.7
import
Common
1.0
import
Common
.
Styles
1.0
// ===================================================================
TextInput
{
id
:
textEdit
clip
:
true
color
:
activeFocus
&&
!
readOnly
?
TextEditStyle
.
textColor
.
focused
:
TextEditStyle
.
textColor
.
normal
padding
:
ListFormStyle
.
value
.
text
.
padding
selectByMouse
:
true
verticalAlignment
:
TextEdit
.
AlignVCenter
Keys.onEscapePressed
:
focus
=
false
Keys.onReturnPressed
:
focus
=
false
InvertedMouseArea
{
anchors.fill
:
parent
enabled
:
textEdit
.
activeFocus
onPressed
:
textEdit
.
focus
=
false
}
Rectangle
{
anchors.fill
:
textEdit
color
:
textEdit
.
activeFocus
&&
!
readOnly
?
TextEditStyle
.
backgroundColor
.
focused
:
TextEditStyle
.
backgroundColor
.
normal
z
:
-
1
}
}
tests/ui/modules/Common/Form/TextField.qml
View file @
30c2c8cd
...
@@ -4,6 +4,8 @@ import QtQuick.Controls 2.0 as Controls
...
@@ -4,6 +4,8 @@ import QtQuick.Controls 2.0 as Controls
import
Common
1.0
import
Common
1.0
import
Common
.
Styles
1.0
import
Common
.
Styles
1.0
// ===================================================================
// A classic TextInput which supports an icon attribute.
// ===================================================================
// ===================================================================
Controls.TextField
{
Controls.TextField
{
...
...
tests/ui/modules/Common/Form/TransparentTextInput.qml
0 → 100644
View file @
30c2c8cd
import
QtQuick
2.7
import
Common
1.0
import
Common
.
Styles
1.0
// ===================================================================
Item
{
property
alias
color
:
textInput
.
color
property
alias
font
:
textInput
.
font
property
alias
readOnly
:
textInput
.
readOnly
property
alias
text
:
textInput
.
text
property
int
padding
:
TransparentTextInputStyle
.
padding
signal
editingFinished
// -----------------------------------------------------------------
Rectangle
{
anchors.fill
:
parent
color
:
textInput
.
activeFocus
&&
!
readOnly
?
TransparentTextInputStyle
.
backgroundColor
:
// No Style constant, see component name.
// It's a `transparent` TextInput.
'
transparent
'
z
:
-
1
}
TextInput
{
id
:
textInput
anchors.centerIn
:
parent
height
:
parent
.
height
-
parent
.
padding
*
2
width
:
parent
.
width
-
parent
.
padding
*
2
clip
:
true
color
:
activeFocus
&&
!
readOnly
?
TransparentTextInputStyle
.
textColor
.
focused
:
TransparentTextInputStyle
.
textColor
.
normal
selectByMouse
:
true
verticalAlignment
:
TextInput
.
AlignVCenter
Keys.onEscapePressed
:
focus
=
false
Keys.onReturnPressed
:
focus
=
false
onEditingFinished
:
{
cursorPosition
=
0
parent
.
editingFinished
()
}
InvertedMouseArea
{
anchors.fill
:
parent
enabled
:
textInput
.
activeFocus
onPressed
:
textInput
.
focus
=
false
}
}
}
tests/ui/modules/Common/Styles/Form/ListFormStyle.qml
View file @
30c2c8cd
...
@@ -6,7 +6,7 @@ import Common 1.0
...
@@ -6,7 +6,7 @@ import Common 1.0
// ===================================================================
// ===================================================================
QtObject
{
QtObject
{
property
int
lineHeight
:
3
0
property
int
lineHeight
:
3
5
property
QtObject
value
:
QtObject
{
property
QtObject
value
:
QtObject
{
property
QtObject
placeholder
:
QtObject
{
property
QtObject
placeholder
:
QtObject
{
...
...
tests/ui/modules/Common/Styles/Form/T
extEdi
tStyle.qml
→
tests/ui/modules/Common/Styles/Form/T
ransparentTextInpu
tStyle.qml
View file @
30c2c8cd
...
@@ -6,10 +6,8 @@ import Common 1.0
...
@@ -6,10 +6,8 @@ import Common 1.0
// ===================================================================
// ===================================================================
QtObject
{
QtObject
{
property
QtObject
backgroundColor
:
QtObject
{
property
color
backgroundColor
:
Colors
.
q
property
color
focused
:
Colors
.
q
property
int
padding
:
10
property
color
normal
:
Colors
.
a
}
property
QtObject
textColor
:
QtObject
{
property
QtObject
textColor
:
QtObject
{
property
color
focused
:
Colors
.
l
property
color
focused
:
Colors
.
l
...
...
tests/ui/modules/Common/Styles/qmldir
View file @
30c2c8cd
...
@@ -22,9 +22,9 @@ singleton ListFormStyle 1.0 Form/ListFormStyle.qml
...
@@ -22,9 +22,9 @@ singleton ListFormStyle 1.0 Form/ListFormStyle.qml
singleton SmallButtonStyle 1.0 Form/SmallButtonStyle.qml
singleton SmallButtonStyle 1.0 Form/SmallButtonStyle.qml
singleton TextButtonAStyle 1.0 Form/TextButtonAStyle.qml
singleton TextButtonAStyle 1.0 Form/TextButtonAStyle.qml
singleton TextButtonBStyle 1.0 Form/TextButtonBStyle.qml
singleton TextButtonBStyle 1.0 Form/TextButtonBStyle.qml
singleton TextEditStyle 1.0 Form/TextEditStyle.qml
singleton TextFieldStyle 1.0 Form/TextFieldStyle.qml
singleton TextFieldStyle 1.0 Form/TextFieldStyle.qml
singleton TransparentComboBoxStyle 1.0 Form/TransparentComboBoxStyle.qml
singleton TransparentComboBoxStyle 1.0 Form/TransparentComboBoxStyle.qml
singleton TransparentTextInputStyle 1.0 Form/TransparentTextInputStyle.qml
singleton ActionMenuStyle 1.0 Menu/ActionMenuStyle.qml
singleton ActionMenuStyle 1.0 Menu/ActionMenuStyle.qml
singleton MenuStyle 1.0 Menu/MenuStyle.qml
singleton MenuStyle 1.0 Menu/MenuStyle.qml
...
...
tests/ui/modules/Common/qmldir
View file @
30c2c8cd
...
@@ -41,9 +41,9 @@ ListForm 1.0 Form/ListForm.qml
...
@@ -41,9 +41,9 @@ ListForm 1.0 Form/ListForm.qml
ScrollableTextEdit 1.0 Form/ScrollableTextEdit.qml
ScrollableTextEdit 1.0 Form/ScrollableTextEdit.qml
TextButtonA 1.0 Form/TextButtonA.qml
TextButtonA 1.0 Form/TextButtonA.qml
TextButtonB 1.0 Form/TextButtonB.qml
TextButtonB 1.0 Form/TextButtonB.qml
TextEdit 1.0 Form/TextEdit.qml
TextField 1.0 Form/TextField.qml
TextField 1.0 Form/TextField.qml
TransparentComboBox 1.0 Form/TransparentComboBox.qml
TransparentComboBox 1.0 Form/TransparentComboBox.qml
TransparentTextInput 1.0 Form/TransparentTextInput.qml
# Image
# Image
Icon 1.0 Image/Icon.qml
Icon 1.0 Image/Icon.qml
...
...
tests/ui/modules/Linphone/Chat/Message.qml
View file @
30c2c8cd
...
@@ -69,6 +69,7 @@ Item {
...
@@ -69,6 +69,7 @@ Item {
// See http://doc.qt.io/qt-5/qml-qtquick-text.html#textFormat-prop
// See http://doc.qt.io/qt-5/qml-qtquick-text.html#textFormat-prop
// and http://doc.qt.io/qt-5/richtext-html-subset.html
// and http://doc.qt.io/qt-5/richtext-html-subset.html
textFormat
:
Text
.
RichText
// To supports links and imgs.
textFormat
:
Text
.
RichText
// To supports links and imgs.
wrapMode
:
TextEdit
.
Wrap
onHoveredLinkChanged
:
_handleHoveredLink
(
hoveredLink
)
onHoveredLinkChanged
:
_handleHoveredLink
(
hoveredLink
)
onLinkActivated
:
Qt
.
openUrlExternally
(
link
)
onLinkActivated
:
Qt
.
openUrlExternally
(
link
)
...
...
tests/ui/views/App/MainWindow/ContactEdit.qml
View file @
30c2c8cd
...
@@ -96,7 +96,7 @@ ColumnLayout {
...
@@ -96,7 +96,7 @@ ColumnLayout {
}
}
}
}
ScrollableTextEdi
t
{
TransparentTextInpu
t
{
id
:
editUsername
id
:
editUsername
Layout.fillWidth
:
true
Layout.fillWidth
:
true
...
...
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