summaryrefslogtreecommitdiff
path: root/src/webengine/ui/MessageBubble.qml
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@theqtcompany.com>2016-07-06 13:55:31 +0200
committerMichal Klocek <michal.klocek@qt.io>2016-10-04 11:50:43 +0000
commit33348994de656361942456834ac0c719ff5d87b8 (patch)
treebe9dd0c863d7a87575183d7484f5fad9cc830e4c /src/webengine/ui/MessageBubble.qml
parent7f763e5fd0ba5481040d08f97034fec0dac61236 (diff)
downloadqtwebengine-33348994de656361942456834ac0c719ff5d87b8.tar.gz
Clean up qt quick controls 1 dialogs
Based on code review for qqc2 integration, apply cleanup changes to qqc1. Change-Id: I9752ce944385a529a1d999a5419638868e18d799 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'src/webengine/ui/MessageBubble.qml')
-rw-r--r--src/webengine/ui/MessageBubble.qml52
1 files changed, 26 insertions, 26 deletions
diff --git a/src/webengine/ui/MessageBubble.qml b/src/webengine/ui/MessageBubble.qml
index c43e46474..056aac1fe 100644
--- a/src/webengine/ui/MessageBubble.qml
+++ b/src/webengine/ui/MessageBubble.qml
@@ -46,8 +46,8 @@ Item {
height: 1
property int maxWidth: 0
- property string mainText: "";
- property string subText: "";
+ property string mainText: ""
+ property string subText: ""
property int border: 1
@@ -111,40 +111,40 @@ Item {
property int messageBoxBottom: height - border
onPaint: {
- var ctx = getContext("2d")
+ var ctx = getContext("2d");
- ctx.lineWidth = bubble.border
- ctx.strokeStyle = "#555"
- ctx.fillStyle = "#ffffe1"
+ ctx.lineWidth = bubble.border;
+ ctx.strokeStyle = "#555";
+ ctx.fillStyle = "#ffffe1";
- ctx.beginPath()
+ ctx.beginPath();
- ctx.moveTo(messageBoxLeft + cornerRadius, messageBoxTop)
+ ctx.moveTo(messageBoxLeft + cornerRadius, messageBoxTop);
// Arrow
- ctx.lineTo(messageBoxLeft + bubble.arrowOffset, messageBoxTop)
- ctx.lineTo(messageBoxLeft + bubble.arrowOffset, messageBoxTop - bubble.arrowHeight)
- ctx.lineTo(messageBoxLeft + bubble.arrowOffset + bubble.arrowWidth, messageBoxTop)
+ ctx.lineTo(messageBoxLeft + bubble.arrowOffset, messageBoxTop);
+ ctx.lineTo(messageBoxLeft + bubble.arrowOffset, messageBoxTop - bubble.arrowHeight);
+ ctx.lineTo(messageBoxLeft + bubble.arrowOffset + bubble.arrowWidth, messageBoxTop);
// Message Box
- ctx.lineTo(messageBoxRight - cornerRadius, messageBoxTop)
- ctx.quadraticCurveTo(messageBoxRight, messageBoxTop, messageBoxRight, messageBoxTop + cornerRadius)
- ctx.lineTo(messageBoxRight, messageBoxBottom - cornerRadius)
- ctx.quadraticCurveTo(messageBoxRight, messageBoxBottom, messageBoxRight - cornerRadius, messageBoxBottom)
- ctx.lineTo(messageBoxLeft + cornerRadius, messageBoxBottom)
- ctx.quadraticCurveTo(messageBoxLeft, messageBoxBottom, messageBoxLeft, messageBoxBottom - cornerRadius)
- ctx.lineTo(messageBoxLeft, messageBoxTop + cornerRadius)
- ctx.quadraticCurveTo(messageBoxLeft, messageBoxTop, messageBoxLeft + cornerRadius, messageBoxTop)
-
- ctx.closePath()
-
- ctx.fill()
- ctx.stroke()
+ ctx.lineTo(messageBoxRight - cornerRadius, messageBoxTop);
+ ctx.quadraticCurveTo(messageBoxRight, messageBoxTop, messageBoxRight, messageBoxTop + cornerRadius);
+ ctx.lineTo(messageBoxRight, messageBoxBottom - cornerRadius);
+ ctx.quadraticCurveTo(messageBoxRight, messageBoxBottom, messageBoxRight - cornerRadius, messageBoxBottom);
+ ctx.lineTo(messageBoxLeft + cornerRadius, messageBoxBottom);
+ ctx.quadraticCurveTo(messageBoxLeft, messageBoxBottom, messageBoxLeft, messageBoxBottom - cornerRadius);
+ ctx.lineTo(messageBoxLeft, messageBoxTop + cornerRadius);
+ ctx.quadraticCurveTo(messageBoxLeft, messageBoxTop, messageBoxLeft + cornerRadius, messageBoxTop);
+
+ ctx.closePath();
+
+ ctx.fill();
+ ctx.stroke();
}
onPainted: {
- bubble.width = bubbleCanvas.width
- bubble.height = bubbleCanvas.height
+ bubble.width = bubbleCanvas.width;
+ bubble.height = bubbleCanvas.height;
}
}
}