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
ab7a8659
Commit
ab7a8659
authored
Dec 08, 2016
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(app): remove `ScrollableTextEdit` component
parent
30c2c8cd
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2 additions
and
82 deletions
+2
-82
resources.qrc
tests/resources.qrc
+0
-1
ScrollableTextEdit.qml
tests/ui/modules/Common/Form/ScrollableTextEdit.qml
+0
-80
TransparentTextInput.qml
tests/ui/modules/Common/Form/TransparentTextInput.qml
+2
-0
qmldir
tests/ui/modules/Common/qmldir
+0
-1
No files found.
tests/resources.qrc
View file @
ab7a8659
...
...
@@ -137,7 +137,6 @@
<file>
ui/modules/Common/Form/CheckBoxText.qml
</file>
<file>
ui/modules/Common/Form/ExclusiveButtons.qml
</file>
<file>
ui/modules/Common/Form/ListForm.qml
</file>
<file>
ui/modules/Common/Form/ScrollableTextEdit.qml
</file>
<file>
ui/modules/Common/Form/SmallButton.qml
</file>
<file>
ui/modules/Common/Form/TextButtonA.qml
</file>
<file>
ui/modules/Common/Form/TextButtonB.qml
</file>
...
...
tests/ui/modules/Common/Form/ScrollableTextEdit.qml
deleted
100644 → 0
View file @
30c2c8cd
import
QtQuick
2.7
import
QtQuick
2.7
as
Quick
import
Common
1.0
import
Common
.
Styles
1.0
// ===================================================================
Item
{
property
alias
text
:
textEdit
.
text
property
alias
font
:
textEdit
.
font
property
alias
color
:
textEdit
.
color
signal
editingFinished
// -----------------------------------------------------------------
function
_handleEditingFinished
()
{
textEdit
.
cursorPosition
=
0
editingFinished
()
}
// -----------------------------------------------------------------
Rectangle
{
anchors.fill
:
flick
color
:
textEdit
.
activeFocus
&&
!
textEdit
.
readOnly
?
TransparentTextInputStyle
.
backgroundColor
.
focused
:
'
transparent
'
InvertedMouseArea
{
anchors.fill
:
parent
enabled
:
textEdit
.
activeFocus
onPressed
:
textEdit
.
focus
=
false
}
}
Flickable
{
id
:
flick
// See: http://doc.qt.io/qt-5/qml-qtquick-texttextEdit.html
function
_ensureVisible
(
r
)
{
if
(
contentX
>=
r
.
x
)
{
contentX
=
r
.
x
}
else
if
(
contentX
+
width
<=
r
.
x
+
r
.
width
)
{
contentX
=
r
.
x
+
r
.
width
-
width
}
if
(
contentY
>=
r
.
y
)
{
contentY
=
r
.
y
}
else
if
(
contentY
+
height
<=
r
.
y
+
r
.
height
)
{
contentY
=
r
.
y
+
r
.
height
-
height
}
}
anchors.fill
:
parent
boundsBehavior
:
Flickable
.
StopAtBounds
clip
:
true
contentHeight
:
textEdit
.
paintedHeight
contentWidth
:
textEdit
.
paintedWidth
interactive
:
textEdit
.
activeFocus
Quick.TextEdit
{
id
:
textEdit
color
:
activeFocus
&&
!
readOnly
?
TransparentTextInputStyle
.
textColor
.
focused
:
TransparentTextInputStyle
.
textColor
.
normal
selectByMouse
:
true
width
:
flick
.
width
wrapMode
:
Text
.
Wrap
Keys.onEscapePressed
:
focus
=
false
Keys.onReturnPressed
:
focus
=
false
onCursorRectangleChanged
:
flick
.
_ensureVisible
(
cursorRectangle
)
onEditingFinished
:
_handleEditingFinished
()
}
}
}
tests/ui/modules/Common/Form/TransparentTextInput.qml
View file @
ab7a8659
...
...
@@ -3,6 +3,8 @@ import QtQuick 2.7
import
Common
1.0
import
Common
.
Styles
1.0
// ===================================================================
// A editable text that become the content of a box on focus.
// ===================================================================
Item
{
...
...
tests/ui/modules/Common/qmldir
View file @
ab7a8659
...
...
@@ -38,7 +38,6 @@ CheckBoxText 1.0 Form/CheckBoxText.qml
ExclusiveButtons 1.0 Form/ExclusiveButtons.qml
LightButton 1.0 Form/LightButton.qml
ListForm 1.0 Form/ListForm.qml
ScrollableTextEdit 1.0 Form/ScrollableTextEdit.qml
TextButtonA 1.0 Form/TextButtonA.qml
TextButtonB 1.0 Form/TextButtonB.qml
TextField 1.0 Form/TextField.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