58
61
"Zoom (scroll): x " + root.scaleFactor.toFixed(1) + "\n\n" +
59
62
"Background colors (a/z): " + shape.backgroundColor + ", " + shape.secondaryBackgroundColor + "\n" +
60
63
"Background mode (e): " + root.backgroundModeTable[shape.backgroundMode] + "\n\n" +
61
"Overlay color (r): " + shape.overlayColor + "\n" +
62
"Overlay geometry (t/y/u/i): " + shape.overlayRect.x.toFixed(2) + ", " + shape.overlayRect.y.toFixed(2) + ", " + shape.overlayRect.width.toFixed(2) + ", " + shape.overlayRect.height.toFixed(2) + "\n\n" +
64
"Radius (r): " + "\"" + shape.radius + "\"\n" +
65
"Aspect (t): " + root.aspectTable[shape.aspect] + "\n\n" +
63
66
"Source (o): " + shape.source + "\n" +
64
67
"Source opacity (p): " + shape.sourceOpacity.toFixed(2) + "\n" +
65
68
"Source fill (q): " + root.sourceFillModeTable[shape.sourceFillMode] + "\n" +
73
76
"Image fill (w): " + root.imageFillModeTable[img1.fillMode] + "\n" +
74
77
"Image halign (x): " + img1.horizontalAlignment + "\n" +
75
78
"Image valign (c): " + img1.verticalAlignment + "\n\n" +
76
"Radius (v): " + "\"" + shape.radius + "\"\n" +
77
"Border (b): " + "\"" + shape.borderSource + "\"\n\n" +
78
"Colors (deprecated) (n/,): " + shape.color + ", " + shape.gradientColor
79
"Border (deprecated) (b): " + "\"" + shape.borderSource + "\"\n\n" +
80
"Colors (deprecated) (n/,): " + shape.color + ", " + shape.gradientColor + "\n\n" +
81
"Overlay color (F1): " + shape.overlayColor + "\n" +
82
"Overlay rect (F2/F3/F4/F5): " + shape.overlayRect.x.toFixed(2) + ", " + shape.overlayRect.y.toFixed(2) + ", " + shape.overlayRect.width.toFixed(2) + ", " + shape.overlayRect.height.toFixed(2)
214
219
} else if (event.key == Qt.Key_E) {
215
220
shape.backgroundMode = (shape.backgroundMode + 1) % 3;
218
223
} else if (event.key == Qt.Key_R) {
219
shape.overlayColor = Qt.rgba(
220
Math.random(), Math.random(), Math.random(), Math.random());
224
shape.radius = (shape.radius == "medium") ? "small" : "medium";
221
225
} else if (event.key == Qt.Key_T) {
222
var x = Math.max(0.0, Math.min(1.0,
223
shape.overlayRect.x + ((event.modifiers & shift) ? 0.005 : -0.005)));
224
shape.overlayRect = Qt.rect(
225
x, shape.overlayRect.y, shape.overlayRect.width,
226
shape.overlayRect.height);
227
} else if (event.key == Qt.Key_Y) {
228
var y = Math.max(0.0, Math.min(1.0,
229
shape.overlayRect.y + ((event.modifiers & shift) ? 0.005 : -0.005)));
230
shape.overlayRect = Qt.rect(
231
shape.overlayRect.x, y, shape.overlayRect.width,
232
shape.overlayRect.height);
233
} else if (event.key == Qt.Key_U) {
234
var width = Math.max(0.0, Math.min(1.0,
235
shape.overlayRect.width + ((event.modifiers & shift) ? 0.005 : -0.005)));
236
shape.overlayRect = Qt.rect(
237
shape.overlayRect.x, shape.overlayRect.y, width,
238
shape.overlayRect.height);
239
} else if (event.key == Qt.Key_I) {
240
var height = Math.max(0.0, Math.min(1.0,
241
shape.overlayRect.height + ((event.modifiers & shift) ? 0.005 : -0.005)));
242
shape.overlayRect = Qt.rect(
243
shape.overlayRect.x, shape.overlayRect.y, shape.overlayRect.width,
226
shape.aspect = (shape.aspect + 1) % 2;
247
229
} else if (event.key == Qt.Key_O) {
306
288
img1.verticalAlignment = Image.AlignTop;
310
} else if (event.key == Qt.Key_V) {
311
shape.radius = (shape.radius == "medium") ? "small" : "medium";
291
// Deprecated styling.
312
292
} else if (event.key == Qt.Key_B) {
313
293
if (shape.borderSource == "radius_idle.sci") {
314
294
shape.borderSource = "radius_pressed.sci";
318
298
shape.borderSource = "radius_idle.sci";
322
300
} else if (event.key == Qt.Key_N) {
323
301
shape.color = Qt.rgba(
324
302
Math.random(), Math.random(), Math.random(), Math.random());
325
303
} else if (event.key == Qt.Key_Comma) {
326
304
shape.gradientColor = Qt.rgba(
327
305
Math.random(), Math.random(), Math.random(), Math.random());
308
} else if (event.key == Qt.Key_F1) {
309
shape.overlayColor = Qt.rgba(
310
Math.random(), Math.random(), Math.random(), Math.random());
311
} else if (event.key == Qt.Key_F2) {
312
var x = Math.max(0.0, Math.min(1.0,
313
shape.overlayRect.x + ((event.modifiers & shift) ? 0.005 : -0.005)));
314
shape.overlayRect = Qt.rect(
315
x, shape.overlayRect.y, shape.overlayRect.width,
316
shape.overlayRect.height);
317
} else if (event.key == Qt.Key_F3) {
318
var y = Math.max(0.0, Math.min(1.0,
319
shape.overlayRect.y + ((event.modifiers & shift) ? 0.005 : -0.005)));
320
shape.overlayRect = Qt.rect(
321
shape.overlayRect.x, y, shape.overlayRect.width,
322
shape.overlayRect.height);
323
} else if (event.key == Qt.Key_F4) {
324
var width = Math.max(0.0, Math.min(1.0,
325
shape.overlayRect.width + ((event.modifiers & shift) ? 0.005 : -0.005)));
326
shape.overlayRect = Qt.rect(
327
shape.overlayRect.x, shape.overlayRect.y, width,
328
shape.overlayRect.height);
329
} else if (event.key == Qt.Key_F5) {
330
var height = Math.max(0.0, Math.min(1.0,
331
shape.overlayRect.height + ((event.modifiers & shift) ? 0.005 : -0.005)));
332
shape.overlayRect = Qt.rect(
333
shape.overlayRect.x, shape.overlayRect.y, shape.overlayRect.width,