backport QML code changes from awesome-widgets to deskop-panel

This commit is contained in:
2016-04-22 15:39:36 +03:00
parent 82dda14260
commit 22586811de
5 changed files with 59 additions and 42 deletions

View File

@ -71,7 +71,9 @@ Item {
title: i18n("Select a color")
onAccepted: {
var text = textPattern.text
textPattern.text = "<body bgcolor=\"" + backgroundDialog.color + "\">" + text + "</body>"
textPattern.text = "<body bgcolor=\"" +
backgroundDialog.color + "\">" +
text + "</body>"
}
}
}
@ -292,10 +294,9 @@ Item {
onClicked: {
if (!tags.currentText) return
if (debug) console.debug("Add tag button")
var pos = textPattern.cursorPosition
var selected = textPattern.selectedText
textPattern.remove(textPattern.selectionStart, textPattern.selectionEnd)
textPattern.insert(pos, selected + "$" + tags.currentText)
textPattern.insert(textPattern.cursorPosition, selected + "$" + tags.currentText)
}
}
QtControls.Button {