Fixing X Cursors' history and label position.
This commit is contained in:
parent
9c26195f66
commit
ae62d3d26a
3 changed files with 23 additions and 3 deletions
|
@ -156,7 +156,7 @@ MenuBar {
|
||||||
Action {
|
Action {
|
||||||
text: qsTr("&User manual")
|
text: qsTr("&User manual")
|
||||||
icon.name: 'documentation'
|
icon.name: 'documentation'
|
||||||
onTriggered: Qt.openUrlExternally("https://git.ad5001.eu/Ad5001/LogarithmPlotter/wiki")
|
onTriggered: Qt.openUrlExternally("https://git.ad5001.eu/Ad5001/LogarithmPlotter/wiki/User-Manual")
|
||||||
}
|
}
|
||||||
Action {
|
Action {
|
||||||
text: qsTr("&Changelog")
|
text: qsTr("&Changelog")
|
||||||
|
|
|
@ -84,8 +84,8 @@ class EditedProperty extends C.Action {
|
||||||
this.next = this.propertyType.translatedValues[this.propertyType.values.indexOf(this.newValue)]
|
this.next = this.propertyType.translatedValues[this.propertyType.values.indexOf(this.newValue)]
|
||||||
break;
|
break;
|
||||||
case "ObjectType":
|
case "ObjectType":
|
||||||
this.prev = this.previousValue.name
|
this.prev = this.previousValue == null ? "null" : this.previousValue.name
|
||||||
this.next = this.newValue.name
|
this.next = this.newValue == null ? "null" : this.newValue.name
|
||||||
break;
|
break;
|
||||||
case "List":
|
case "List":
|
||||||
this.prev = this.previousValue.join(",")
|
this.prev = this.previousValue.join(",")
|
||||||
|
|
|
@ -146,9 +146,15 @@ class XCursor extends Common.DrawableObject {
|
||||||
|
|
||||||
switch(this.labelPosition) {
|
switch(this.labelPosition) {
|
||||||
case 'left':
|
case 'left':
|
||||||
|
case 'above-left':
|
||||||
|
case 'below-left':
|
||||||
|
case 'below':
|
||||||
|
case 'above':
|
||||||
canvas.drawVisibleText(ctx, text, xpos-textSize.width-5, textSize.height+5)
|
canvas.drawVisibleText(ctx, text, xpos-textSize.width-5, textSize.height+5)
|
||||||
break;
|
break;
|
||||||
case 'right':
|
case 'right':
|
||||||
|
case 'above-right':
|
||||||
|
case 'below-right':
|
||||||
canvas.drawVisibleText(ctx, text, xpos+5, textSize.height+5)
|
canvas.drawVisibleText(ctx, text, xpos+5, textSize.height+5)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -159,11 +165,25 @@ class XCursor extends Common.DrawableObject {
|
||||||
var ypox = canvas.y2px(this.targetElement.execute(this.x.execute()))
|
var ypox = canvas.y2px(this.targetElement.execute(this.x.execute()))
|
||||||
switch(this.labelPosition) {
|
switch(this.labelPosition) {
|
||||||
case 'left':
|
case 'left':
|
||||||
|
case 'below':
|
||||||
|
case 'above':
|
||||||
canvas.drawVisibleText(ctx, text, xpos-textSize.width-5, ypox+textSize.height)
|
canvas.drawVisibleText(ctx, text, xpos-textSize.width-5, ypox+textSize.height)
|
||||||
break;
|
break;
|
||||||
|
case 'above-left':
|
||||||
|
canvas.drawVisibleText(ctx, text, xpos-textSize.width-5, ypox+textSize.height+12)
|
||||||
|
break;
|
||||||
|
case 'below-left':
|
||||||
|
canvas.drawVisibleText(ctx, text, xpos-textSize.width-5, ypox+textSize.height-12)
|
||||||
|
break;
|
||||||
case 'right':
|
case 'right':
|
||||||
canvas.drawVisibleText(ctx, text, xpos+5, ypox+textSize.height)
|
canvas.drawVisibleText(ctx, text, xpos+5, ypox+textSize.height)
|
||||||
break;
|
break;
|
||||||
|
case 'above-right':
|
||||||
|
canvas.drawVisibleText(ctx, text, xpos+5, ypox+textSize.height+12)
|
||||||
|
break;
|
||||||
|
case 'below-right':
|
||||||
|
canvas.drawVisibleText(ctx, text, xpos+5, ypox+textSize.height-12)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue