summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2016-10-06 17:08:46 (GMT)
committerPeter Wu <peter@lekensteyn.nl>2016-10-11 21:01:17 (GMT)
commit45d3a0700aaa7564c5090398173a98828d38d2d4 (patch)
tree86ee9fb6642b995109a35d72f400d4dbd6acc104
parent362cf1c7b5eca33c46de7c838776124f230e2eca (diff)
Hide bottom help text when selection is overlapping
After some use, the user should already know how to take a screenshot. For most users, this help message is just annoying when trying to select an area at the bottom of the screen. REVIEW: 129113
-rw-r--r--src/QuickEditor/EditorRoot.qml3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/QuickEditor/EditorRoot.qml b/src/QuickEditor/EditorRoot.qml
index f28b7cb..1719816 100644
--- a/src/QuickEditor/EditorRoot.qml
+++ b/src/QuickEditor/EditorRoot.qml
@@ -106,7 +106,8 @@ Item {
if (selection) {
midHelpText.visible = false;
- bottomHelpText.visible = true;
+ // display bottom help text only if it does not intersect with the selection
+ bottomHelpText.visible = (selection.y + selection.height < bottomHelpText.y) || (selection.x > bottomHelpText.x + bottomHelpText.width) || (selection.x + selection.width < bottomHelpText.x);
// if we have a selection polygon, cut it out
ctx.fillStyle = strokeColour;