mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-06-02 02:26:00 +00:00
autofmt
This commit is contained in:
+39
-39
@@ -75,31 +75,31 @@ ColumnLayout {
|
||||
propagateComposedEvents: false
|
||||
|
||||
onPressed: mouse => {
|
||||
mouse.accepted = true
|
||||
// Focus the input and position cursor
|
||||
input.forceActiveFocus()
|
||||
var inputPos = mapToItem(inputContainer, mouse.x, mouse.y)
|
||||
if (inputPos.x >= 0 && inputPos.x <= inputContainer.width) {
|
||||
var textPos = inputPos.x - Style.marginM
|
||||
if (textPos >= 0 && textPos <= input.width) {
|
||||
input.cursorPosition = input.positionAt(textPos, input.height / 2)
|
||||
}
|
||||
}
|
||||
}
|
||||
mouse.accepted = true
|
||||
// Focus the input and position cursor
|
||||
input.forceActiveFocus()
|
||||
var inputPos = mapToItem(inputContainer, mouse.x, mouse.y)
|
||||
if (inputPos.x >= 0 && inputPos.x <= inputContainer.width) {
|
||||
var textPos = inputPos.x - Style.marginM
|
||||
if (textPos >= 0 && textPos <= input.width) {
|
||||
input.cursorPosition = input.positionAt(textPos, input.height / 2)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onReleased: mouse => {
|
||||
mouse.accepted = true
|
||||
}
|
||||
mouse.accepted = true
|
||||
}
|
||||
onDoubleClicked: mouse => {
|
||||
mouse.accepted = true
|
||||
input.selectAll()
|
||||
}
|
||||
mouse.accepted = true
|
||||
input.selectAll()
|
||||
}
|
||||
onPositionChanged: mouse => {
|
||||
mouse.accepted = true
|
||||
}
|
||||
mouse.accepted = true
|
||||
}
|
||||
onWheel: wheel => {
|
||||
wheel.accepted = true
|
||||
}
|
||||
wheel.accepted = true
|
||||
}
|
||||
}
|
||||
|
||||
// Container for the actual text field
|
||||
@@ -167,32 +167,32 @@ ColumnLayout {
|
||||
property int selectionStart: 0
|
||||
|
||||
onPressed: mouse => {
|
||||
mouse.accepted = true
|
||||
input.forceActiveFocus()
|
||||
var pos = input.positionAt(mouse.x, mouse.y)
|
||||
input.cursorPosition = pos
|
||||
selectionStart = pos
|
||||
}
|
||||
mouse.accepted = true
|
||||
input.forceActiveFocus()
|
||||
var pos = input.positionAt(mouse.x, mouse.y)
|
||||
input.cursorPosition = pos
|
||||
selectionStart = pos
|
||||
}
|
||||
|
||||
onPositionChanged: mouse => {
|
||||
if (mouse.buttons & Qt.LeftButton) {
|
||||
mouse.accepted = true
|
||||
var pos = input.positionAt(mouse.x, mouse.y)
|
||||
input.select(selectionStart, pos)
|
||||
}
|
||||
}
|
||||
if (mouse.buttons & Qt.LeftButton) {
|
||||
mouse.accepted = true
|
||||
var pos = input.positionAt(mouse.x, mouse.y)
|
||||
input.select(selectionStart, pos)
|
||||
}
|
||||
}
|
||||
|
||||
onDoubleClicked: mouse => {
|
||||
mouse.accepted = true
|
||||
input.selectAll()
|
||||
}
|
||||
mouse.accepted = true
|
||||
input.selectAll()
|
||||
}
|
||||
|
||||
onReleased: mouse => {
|
||||
mouse.accepted = true
|
||||
}
|
||||
mouse.accepted = true
|
||||
}
|
||||
onWheel: wheel => {
|
||||
wheel.accepted = true
|
||||
}
|
||||
wheel.accepted = true
|
||||
}
|
||||
}
|
||||
}
|
||||
NIconButton {
|
||||
|
||||
Reference in New Issue
Block a user