mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-10 04:15:51 +00:00
update additional files
update translations add "Add lambda" button to ui
This commit is contained in:
@ -233,7 +233,7 @@ Item {
|
||||
width: parent.width
|
||||
QtControls.ComboBox {
|
||||
id: tags
|
||||
width: parent.width - addTagButton.width - showValueButton.width
|
||||
width: parent.width - addTagButton.width - showValueButton.width - addLambdaButton.width
|
||||
}
|
||||
QtControls.Button {
|
||||
id: addTagButton
|
||||
@ -263,6 +263,19 @@ Item {
|
||||
awActions.sendNotification("tag", message)
|
||||
}
|
||||
}
|
||||
QtControls.Button {
|
||||
id: addLambdaButton
|
||||
text: i18n("Add lambda")
|
||||
|
||||
onClicked: {
|
||||
if (debug) console.log("[widget::onClicked] : Lambda button")
|
||||
|
||||
var pos = textPattern.cursorPosition
|
||||
var selected = textPattern.selectedText
|
||||
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
|
||||
textPattern.insert(pos, selected + "${{}}")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
|
Reference in New Issue
Block a user