Cinque difetti dalla suite (0.23.1)
RENAME/DELETE: il protocollo vuole place.section(tab,1), non il place intero. Spostamenti: mancava Commit della destinazione (messaggio sparito ma non ricomparso; stesso per il junk). Marcatori: insert(-1) con selectionStart -1. Pulsanti stretti. Esito dell'invio spostato accanto al pulsante.
This commit is contained in:
1 parent
6535624d46
commit
bc4b2044e7
4 files changed
+54
-19
No files matched your search
+27
-12
@@ -212,7 +212,8 @@ Page {
|
||||
]
|
||||
delegate: Button {
|
||||
text: modelData.t
|
||||
preferredWidth: Theme.buttonWidthSmall
|
||||
width: Theme.itemSizeSmall
|
||||
height: Theme.itemSizeSmall
|
||||
enabled: !page.inviando
|
||||
onClicked: page.marca(modelData.prima, modelData.dopo)
|
||||
}
|
||||
@@ -220,7 +221,8 @@ Page {
|
||||
|
||||
Button {
|
||||
text: qsTr("link")
|
||||
preferredWidth: Theme.buttonWidthMedium
|
||||
height: Theme.itemSizeSmall
|
||||
width: Theme.itemSizeMedium
|
||||
enabled: !page.inviando
|
||||
onClicked: page.marca("[", "](https://)", qsTr("il testo del link"))
|
||||
}
|
||||
@@ -296,16 +298,6 @@ Page {
|
||||
onClicked: page.salvaBozza()
|
||||
}
|
||||
|
||||
Label {
|
||||
width: parent.width - 2 * Theme.horizontalPageMargin
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: page.errore
|
||||
visible: page.errore.length > 0
|
||||
font.pixelSize: Theme.fontSizeExtraSmall
|
||||
color: Theme.highlightColor
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
|
||||
Button {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
@@ -398,6 +390,24 @@ Page {
|
||||
opacity: 0.92
|
||||
}
|
||||
|
||||
Label {
|
||||
id: erroreInBasso
|
||||
anchors {
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
bottom: pulsanteInvia.top
|
||||
leftMargin: Theme.horizontalPageMargin
|
||||
rightMargin: Theme.horizontalPageMargin
|
||||
bottomMargin: Theme.paddingSmall
|
||||
}
|
||||
text: page.errore
|
||||
visible: page.errore.length > 0
|
||||
color: Theme.highlightColor
|
||||
font.pixelSize: Theme.fontSizeExtraSmall
|
||||
wrapMode: Text.Wrap
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
|
||||
Button {
|
||||
id: pulsanteInvia
|
||||
anchors {
|
||||
@@ -467,6 +477,11 @@ Page {
|
||||
function marca(prima, dopo, segnaposto) {
|
||||
var a = campoCorpo.selectionStart;
|
||||
var b = campoCorpo.selectionEnd;
|
||||
// selectionStart vale -1 quando non c'è selezione: in quel caso la
|
||||
// posizione giusta è il cursore. Con -1 insert() non fa niente, ed è
|
||||
// per questo che i pulsanti sembravano morti.
|
||||
if (a < 0) a = campoCorpo.cursorPosition;
|
||||
if (b < 0) b = a;
|
||||
if (a === b) {
|
||||
var dentro = segnaposto === undefined ? "" : segnaposto;
|
||||
campoCorpo.insert(a, prima + dentro + dopo);
|
||||
|
||||
Reference in new issue
Block a user