Changeset View
Changeset View
Standalone View
Standalone View
src/QuickEditor/EditorRoot.qml
Show All 13 Lines | |||||
14 | * You should have received a copy of the GNU Lesser General Public License | 14 | * You should have received a copy of the GNU Lesser General Public License | ||
15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, | 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
17 | * Boston, MA 02110-1301, USA. | 17 | * Boston, MA 02110-1301, USA. | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | import QtQuick 2.5 | 20 | import QtQuick 2.5 | ||
21 | import QtQuick.Window 2.2 | 21 | import QtQuick.Window 2.2 | ||
22 | import QtQuick.Layouts 1.3 | ||||
23 | import QtQuick.Controls 1.4 | ||||
22 | 24 | | |||
23 | Item { | 25 | Item { | ||
24 | id: editorRoot; | 26 | id: editorRoot; | ||
25 | objectName: "editorRoot"; | 27 | objectName: "editorRoot"; | ||
26 | 28 | | |||
27 | // properties and setters | 29 | // properties and setters | ||
28 | 30 | | |||
29 | property var selection: undefined; | 31 | property var selection: undefined; | ||
▲ Show 20 Lines • Show All 218 Lines • ▼ Show 20 Line(s) | 110 | Canvas { | |||
248 | } | 250 | } | ||
249 | 251 | | |||
250 | Rectangle { | 252 | Rectangle { | ||
251 | id: midHelpText; | 253 | id: midHelpText; | ||
252 | objectName: "midHelpText"; | 254 | objectName: "midHelpText"; | ||
253 | 255 | | |||
254 | height: midHelpTextElement.height + 40; | 256 | height: midHelpTextElement.height + 40; | ||
255 | width: midHelpTextElement.width + 40; | 257 | width: midHelpTextElement.width + 40; | ||
256 | radius: 10; | | |||
257 | border.width: 2; | | |||
258 | border.color: Qt.rgba(0, 0, 0, 1); | 258 | border.color: Qt.rgba(0, 0, 0, 1); | ||
259 | color: Qt.rgba(1, 1, 1, 0.85); | 259 | color: Qt.rgba(1, 1, 1, 0.85); | ||
260 | 260 | | |||
261 | visible: false; | ||||
261 | anchors.centerIn: parent; | 262 | anchors.centerIn: parent; | ||
262 | 263 | | |||
263 | Text { | 264 | Label { | ||
264 | id: midHelpTextElement; | 265 | id: midHelpTextElement; | ||
265 | text: i18n("Click anywhere on the screen (including here) to start drawing a selection rectangle, or press Esc to quit"); | 266 | text: i18n("Click anywhere to start drawing a selection rectangle,\n" + | ||
266 | font.pointSize: 12; | 267 | "or press Esc to cancel."); | ||
268 | font.pixelSize: Qt.application.font.pixelSize * 1.2; | ||||
267 | 269 | | |||
268 | anchors.centerIn: parent; | 270 | anchors.centerIn: parent; | ||
269 | } | 271 | } | ||
270 | } | 272 | } | ||
271 | 273 | | |||
272 | Rectangle { | 274 | Rectangle { | ||
273 | id: bottomHelpText; | 275 | id: bottomHelpText; | ||
274 | objectName: "bottomHelpText"; | 276 | objectName: "bottomHelpText"; | ||
275 | 277 | | |||
276 | height: bottomHelpTextElement.height + 16; | 278 | height: bottomHelpTextElement.height + 20; | ||
277 | width: bottomHelpTextElement.width + 24; | 279 | width: bottomHelpTextElement.width + 20; | ||
278 | border.width: 1; | | |||
279 | border.color: Qt.rgba(0, 0, 0, 1); | 280 | border.color: Qt.rgba(0, 0, 0, 1); | ||
280 | color: Qt.rgba(1, 1, 1, 0.85); | 281 | color: Qt.rgba(1, 1, 1, 0.85); | ||
281 | 282 | | |||
283 | visible: false; | ||||
ngraham: How come? | |||||
See summary:
You should be able to test this by following the test plan before and after the patch. rkflx: See summary:
> Setting the default visibility of the help texts to `false` avoids showing them… | |||||
282 | anchors.bottom: parent.bottom; | 284 | anchors.bottom: parent.bottom; | ||
283 | anchors.horizontalCenter: parent.horizontalCenter; | 285 | anchors.horizontalCenter: parent.horizontalCenter; | ||
284 | 286 | | |||
285 | Text { | 287 | GridLayout { | ||
286 | id: bottomHelpTextElement; | 288 | id: bottomHelpTextElement; | ||
287 | text: i18n("To take the screenshot, double-click or press Enter. Right-click to reset the selection, or press Esc to quit"); | 289 | columns: 2 | ||
288 | font.pointSize: 9; | | |||
289 | | ||||
290 | anchors.centerIn: parent; | 290 | anchors.centerIn: parent; | ||
291 | | ||||
292 | Label { | ||||
293 | text: i18n("Enter, double-click:"); | ||||
294 | Layout.alignment: Qt.AlignRight; | ||||
295 | } | ||||
296 | Label { text: i18n("Take screenshot"); } | ||||
297 | | ||||
298 | Label { | ||||
299 | text: i18n("Shift:"); | ||||
300 | Layout.alignment: Qt.AlignRight; | ||||
301 | } | ||||
302 | Label { text: i18n("Hold to toggle magnifier"); } | ||||
303 | | ||||
304 | Label { | ||||
305 | text: i18n("Right-click:"); | ||||
306 | Layout.alignment: Qt.AlignRight; | ||||
307 | } | ||||
308 | Label { text: i18n("Reset selection"); } | ||||
309 | | ||||
310 | Label { | ||||
311 | text: i18n("Esc:"); | ||||
312 | Layout.alignment: Qt.AlignRight; | ||||
313 | } | ||||
314 | Label { text: i18n("Cancel"); } | ||||
291 | } | 315 | } | ||
292 | } | 316 | } | ||
293 | 317 | | |||
294 | // Use Rectangle so that the background is white when cursor nearby edge | 318 | // Use Rectangle so that the background is white when cursor nearby edge | ||
295 | Rectangle { | 319 | Rectangle { | ||
296 | id: crossMagnifier; | 320 | id: crossMagnifier; | ||
297 | 321 | | |||
298 | height: (magPixels * 2 + 1) * magZoom; | 322 | height: (magPixels * 2 + 1) * magZoom; | ||
▲ Show 20 Lines • Show All 108 Lines • Show Last 20 Lines |
How come?