Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Plasma Workspace
Commits
f476c182
Verified
Commit
f476c182
authored
Jan 29, 2022
by
Fushan Wen
Browse files
applets/clipboard: Focus on text area when transition is done
parent
b55521b8
Pipeline
#141074
passed with stage
in 12 minutes and 25 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
applets/clipboard/contents/ui/EditPage.qml
View file @
f476c182
...
...
@@ -5,6 +5,7 @@
*/
import
QtQuick
2.0
import
QtQuick
.
Controls
2.15
as
QQC2
// For StackView
import
QtQuick
.
Layouts
1.1
import
org
.
kde
.
plasma
.
core
2.0
as
PlasmaCore
import
org
.
kde
.
plasma
.
components
3.0
as
PlasmaComponents3
...
...
@@ -31,16 +32,18 @@ ColumnLayout {
done
();
}
Component.onCompleted
:
{
textArea
.
forceActiveFocus
();
textArea
.
cursorPosition
=
textArea
.
text
.
length
;
}
function
done
()
{
// The modified item will be pushed to the top, and we would like to highlight the real first item
Qt
.
callLater
(()
=>
{
stack
.
initialItem
.
view
.
currentIndex
=
0
;});
}
QQC2.StackView.onStatusChanged
:
{
if
(
QQC2
.
StackView
.
status
===
QQC2
.
StackView
.
Active
)
{
textArea
.
forceActiveFocus
();
textArea
.
cursorPosition
=
textArea
.
text
.
length
;
}
}
PlasmaComponents3.ScrollView
{
Layout.fillWidth
:
true
Layout.fillHeight
:
true
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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