Compare commits
877 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cb1f3ad0ce | ||
|
|
c81a842b6e | ||
|
|
26ad7b78b5 | ||
|
|
381442a138 | ||
|
|
7cb24f50b8 | ||
|
|
8c5891e28a | ||
|
|
61c0e15404 | ||
|
|
b03714ec45 | ||
|
|
701f063797 | ||
|
|
6ed5369829 | ||
|
|
4661167734 | ||
|
|
39d9d7d071 | ||
|
|
8ad5fd4c76 | ||
|
|
3c28ecef93 | ||
|
|
d3943ca2a9 | ||
|
|
73f76cec99 | ||
|
|
b76b43da6c | ||
|
|
21d8c096ff | ||
|
|
13ca3eeb84 | ||
|
|
4cea7e1647 | ||
|
|
afc2e846fd | ||
|
|
c601313943 | ||
|
|
73c0522a56 | ||
|
|
06a66e3a00 | ||
|
|
12355deb94 | ||
|
|
cbbbf30198 | ||
|
|
40e108eb2b | ||
|
|
cdfe9f338f | ||
|
|
adb04cef71 | ||
|
|
1123dd7046 | ||
|
|
f1fdbee25d | ||
|
|
ff51dd08d3 | ||
|
|
476896864c | ||
|
|
0b7cf4a544 | ||
|
|
caff6193f2 | ||
|
|
e2a82c9037 | ||
|
|
28ee4164cd | ||
|
|
7af099958e | ||
|
|
0d8e363407 | ||
|
|
7306b84d41 | ||
|
|
9d25f7230b | ||
|
|
b28f2dae33 | ||
|
|
619b2d7947 | ||
|
|
a23c49e5b6 | ||
|
|
61fc38b29c | ||
|
|
22386aa7e1 | ||
|
|
f5c5df7b67 | ||
|
|
1aa98c3cfd | ||
|
|
67c47d468c | ||
|
|
0fcaadae53 | ||
|
|
5b5c0ac658 | ||
|
|
1b4c21700f | ||
|
|
9df9cb8da7 | ||
|
|
a32d39cc96 | ||
|
|
8ef7b7c89a | ||
|
|
1ef96f9544 | ||
|
|
d413b16d34 | ||
|
|
37fea0ee33 | ||
|
|
b12ec3b0f0 | ||
|
|
4c257aff67 | ||
|
|
be1f63f93d | ||
|
|
839167aff5 | ||
|
|
87400e781e | ||
|
|
98ce87a572 | ||
|
|
d555ba55a9 | ||
|
|
1387fd4f9c | ||
|
|
6ff43fa81e | ||
|
|
076c70906a | ||
|
|
923a32cfd5 | ||
|
|
e7c37fc7bc | ||
|
|
2b83edc982 | ||
|
|
4208b66baf | ||
|
|
b9e74f6b6d | ||
|
|
270b86b142 | ||
|
|
6c67a39d2e | ||
|
|
91239881f1 | ||
|
|
2d464a1266 | ||
|
|
0dda5796ec | ||
|
|
e1987522e2 | ||
|
|
1b519b8302 | ||
|
|
d488979351 | ||
|
|
d313c2de37 | ||
|
|
560dd09f8a | ||
|
|
ea778c41dd | ||
|
|
6595a7b1c1 | ||
|
|
dea513fc84 | ||
|
|
55759545d1 | ||
|
|
248ec22eb5 | ||
|
|
04eab65b10 | ||
|
|
8643f85fef | ||
|
|
e0679ce5e6 | ||
|
|
31dbe7ea42 | ||
|
|
f745670b36 | ||
|
|
a80746adf1 | ||
|
|
2e8bec15da | ||
|
|
24d8360da1 | ||
|
|
f75d988437 | ||
|
|
3a1601f132 | ||
|
|
fd956b54b5 | ||
|
|
6467333fe7 | ||
|
|
4effbd3c8e | ||
|
|
8845ce6d49 | ||
|
|
3aeaf99057 | ||
|
|
c41e3d8e7a | ||
|
|
9d05462715 | ||
|
|
394e56915d | ||
|
|
749c166b10 | ||
|
|
a563582d95 | ||
|
|
a000b8d850 | ||
|
|
4b626924e6 | ||
|
|
e97fb0b3d8 | ||
|
|
aa1ab4f448 | ||
|
|
1752fde08b | ||
|
|
121904f340 | ||
|
|
05f63a24cc | ||
|
|
e2085bdaa3 | ||
|
|
7e83173c77 | ||
|
|
183c8084a5 | ||
|
|
5bc305679c | ||
|
|
2557bdb35f | ||
|
|
79a87ca03b | ||
|
|
a8eab144e4 | ||
|
|
83cffa469e | ||
|
|
b1b7307578 | ||
|
|
e0dfda2189 | ||
|
|
370607a7dc | ||
|
|
dc1d0a68c8 | ||
|
|
fed38b9e06 | ||
|
|
17213bfe8c | ||
|
|
e1b5ee24e9 | ||
|
|
35f92b76a2 | ||
|
|
9255d649d9 | ||
|
|
86f5aae63d | ||
|
|
75e433388f | ||
|
|
f51b0f6704 | ||
|
|
1895755efb | ||
|
|
03db3f96ff | ||
|
|
1d2840f8b5 | ||
|
|
4e16698558 | ||
|
|
c013d7d125 | ||
|
|
27e4771622 | ||
|
|
e65159163d | ||
|
|
77b7a5244a | ||
|
|
3c69023135 | ||
|
|
fad8dab165 | ||
|
|
16646eb651 | ||
|
|
6898d5dd42 | ||
|
|
67be96e6d5 | ||
|
|
9ce88c6aeb | ||
|
|
5ea99a73e7 | ||
|
|
43aeea8eb7 | ||
|
|
7eeda0a8f0 | ||
|
|
9220937c4b | ||
|
|
6aaf294f0b | ||
|
|
721a0cbf91 | ||
|
|
d1bde4f8b2 | ||
|
|
380b955bce | ||
|
|
0db4c36db0 | ||
|
|
dcc040a119 | ||
|
|
63e32c4a83 | ||
|
|
7972d8a219 | ||
|
|
872b81fe39 | ||
|
|
6136e88fcb | ||
|
|
c77637d141 | ||
|
|
0d047035fb | ||
|
|
b5aa659757 | ||
|
|
88d297d8cc | ||
|
|
eb924a34d1 | ||
|
|
352da92229 | ||
|
|
99907e539a | ||
|
|
e8bcabe66b | ||
|
|
829414ed01 | ||
|
|
36262f029a | ||
|
|
13ee9b1f26 | ||
|
|
085abb798a | ||
|
|
c137a6ea36 | ||
|
|
2cea0fc669 | ||
|
|
aaa1cb47c0 | ||
|
|
1577ce278b | ||
|
|
9d48f96fc8 | ||
|
|
1a51e93e55 | ||
|
|
b62b821002 | ||
|
|
f3ee46175c | ||
|
|
17a3c51a43 | ||
|
|
410897ced7 | ||
|
|
2fd3974194 | ||
|
|
7c50e1ff4b | ||
|
|
dec5dcf25c | ||
|
|
9fc260c62d | ||
|
|
c9d36b1302 | ||
|
|
d931022963 | ||
|
|
df885b6eaa | ||
|
|
f78c95b73b | ||
|
|
b22fb24e47 | ||
|
|
8c8faf29e4 | ||
|
|
b7b1221221 | ||
|
|
38c3534ead | ||
|
|
f631b75f0a | ||
|
|
11fd19e0f8 | ||
|
|
1572b4cf79 | ||
|
|
10a47d783e | ||
|
|
14cc1d096a | ||
|
|
840421fd7b | ||
|
|
51739dfb22 | ||
|
|
be5e6772a4 | ||
|
|
c869390272 | ||
|
|
50c22ca300 | ||
|
|
f1b4eb6c56 | ||
|
|
d37c4ddef2 | ||
|
|
2522ff13fe | ||
|
|
596b71b293 | ||
|
|
8159b75be3 | ||
|
|
7677103f1b | ||
|
|
fead82b198 | ||
|
|
f55bf48bad | ||
|
|
e0faddf964 | ||
|
|
a00ed6a75a | ||
|
|
b54127e997 | ||
|
|
c672d8016d | ||
|
|
ccd8eb1c3a | ||
|
|
d5b165bde2 | ||
|
|
c978027933 | ||
|
|
9deec4dad0 | ||
|
|
e306992ce8 | ||
|
|
19daa074ca | ||
|
|
1c62edeff4 | ||
|
|
34439af67e | ||
|
|
e1e862bce4 | ||
|
|
0b2e74cdb5 | ||
|
|
3fee17e564 | ||
|
|
1e7d8293cb | ||
|
|
a3fc6754e0 | ||
|
|
8354c251c5 | ||
|
|
8f5053bd61 | ||
|
|
92b0a115f4 | ||
|
|
6a3e1aaf40 | ||
|
|
c32e11d3e8 | ||
|
|
9580c19da3 | ||
|
|
27532dc1bf | ||
|
|
c0e0626b84 | ||
|
|
c6d5c5dc3a | ||
|
|
749460fb46 | ||
|
|
c9ee76c2ee | ||
|
|
94dbf179d5 | ||
|
|
7deecbfdf6 | ||
|
|
29a742ba26 | ||
|
|
47559e51be | ||
|
|
f64dcde600 | ||
|
|
52c090b82f | ||
|
|
1edc068047 | ||
|
|
d18af7da72 | ||
|
|
53066ae92b | ||
|
|
333c9ee311 | ||
|
|
ff4de8e8f7 | ||
|
|
ef5d855950 | ||
|
|
e6f30578c0 | ||
|
|
f1e3926192 | ||
|
|
7f0c19950b | ||
|
|
1580c3a574 | ||
|
|
c8f4355e15 | ||
|
|
39561f8ead | ||
|
|
b15dbbb9b0 | ||
|
|
a73a4363ec | ||
|
|
55cbc562b6 | ||
|
|
e6c4c32d01 | ||
|
|
e36d4a918f | ||
|
|
0355ca2747 | ||
|
|
c946905907 | ||
|
|
a8bd2ab77e | ||
|
|
149e373367 | ||
|
|
fa3c8b5f89 | ||
|
|
e0f6577afd | ||
|
|
43f0854de9 | ||
|
|
f38e460842 | ||
|
|
527adcba17 | ||
|
|
0de1ba9f51 | ||
|
|
66e769603c | ||
|
|
15038850c2 | ||
|
|
efc9ad45e4 | ||
|
|
754a968706 | ||
|
|
c20a0ef928 | ||
|
|
eab98e3a48 | ||
|
|
2a8960bc2c | ||
|
|
fe68f59763 | ||
|
|
80e8dd6aef | ||
|
|
c82bd94bc3 | ||
|
|
28ca9503df | ||
|
|
73cc400ae8 | ||
|
|
8b7438ace2 | ||
|
|
210248e6ef | ||
|
|
f82948f4b0 | ||
|
|
da4e0dbf0f | ||
|
|
9dd3f4fecb | ||
|
|
abbe042c8a | ||
|
|
72a3b346bb | ||
|
|
d662e46146 | ||
|
|
bbc9ca8f08 | ||
|
|
f7271d1c7b | ||
|
|
afe1ae9b9c | ||
|
|
7f5b8ea0ad | ||
|
|
aa5000f556 | ||
|
|
8b6978b2a5 | ||
|
|
86d21a34ba | ||
|
|
4354a76df9 | ||
|
|
b616a14f88 | ||
|
|
7536e922e9 | ||
|
|
5bf0dd9684 | ||
|
|
cdf4ce2d6f | ||
|
|
37a8bcb525 | ||
|
|
2f8c0ca499 | ||
|
|
38612c1285 | ||
|
|
1d3a201077 | ||
|
|
a91a4f51ab | ||
|
|
52fbbae484 | ||
|
|
8f70fb4f79 | ||
|
|
c439d6814b | ||
|
|
f26f1469ca | ||
|
|
487e706f06 | ||
|
|
503c1af5f8 | ||
|
|
ca79525fdb | ||
|
|
7db5de082d | ||
|
|
ce6cc47afe | ||
|
|
a10a94f51c | ||
|
|
1833c16e39 | ||
|
|
d7207bfde3 | ||
|
|
5265e52b8b | ||
|
|
b6fdb709ba | ||
|
|
9aef3bab33 | ||
|
|
4b55197e18 | ||
|
|
11617d2f76 | ||
|
|
765e93cfd0 | ||
|
|
d31e661cd1 | ||
|
|
7f9b28c05f | ||
|
|
4a7ccd8d82 | ||
|
|
be954cc2c4 | ||
|
|
387e643ae9 | ||
|
|
6f71d47806 | ||
|
|
135c970ad9 | ||
|
|
fd5d1f584e | ||
|
|
2195c67f58 | ||
|
|
5c13624596 | ||
|
|
cfdba59584 | ||
|
|
4141832a4d | ||
|
|
5f183da6e3 | ||
|
|
30c54b1c6e | ||
|
|
c1da3d1c97 | ||
|
|
cbd03229dd | ||
|
|
2fc1b287dd | ||
|
|
7c8c6a116f | ||
|
|
ef93139a80 | ||
|
|
1b7844ec34 | ||
|
|
8f63e8870f | ||
|
|
286c75aa5b | ||
|
|
0a4d65dd99 | ||
|
|
83ccadb6a8 | ||
|
|
eae7eff9db | ||
|
|
2102e4be0d | ||
|
|
02eec351b9 | ||
|
|
ce4cb6512d | ||
|
|
3d24300963 | ||
|
|
9748974ce0 | ||
|
|
120b5285fb | ||
|
|
b022735506 | ||
|
|
33c1a6f4fc | ||
|
|
4b0dcb95bf | ||
|
|
fdb7f806fa | ||
|
|
a810bf3eb7 | ||
|
|
a99eef68f5 | ||
|
|
7ebdb884a1 | ||
|
|
c7f9ac926b | ||
|
|
9b98e0a2f5 | ||
|
|
3835387eea | ||
|
|
238b1b777f | ||
|
|
3af99e91e4 | ||
|
|
07ecca5af4 | ||
|
|
b245d0af7a | ||
|
|
585fb2810d | ||
|
|
0784532001 | ||
|
|
dcbdae0954 | ||
|
|
2bef74fe8a | ||
|
|
81d5dd1cae | ||
|
|
50767570f0 | ||
|
|
1d5b940349 | ||
|
|
3563d44d99 | ||
|
|
ffceda9159 | ||
|
|
a75a0fb8c5 | ||
|
|
5fa64c34ec | ||
|
|
376421667a | ||
|
|
8a73fd241e | ||
|
|
9760886eff | ||
|
|
34089599cd | ||
|
|
4a7a98034e | ||
|
|
79f78f48e2 | ||
|
|
fee81ba210 | ||
|
|
a078705ec6 | ||
|
|
de6a9b6779 | ||
|
|
3f13a5c9a4 | ||
|
|
fb7470a2a6 | ||
|
|
e2c6ae6472 | ||
|
|
ea25b71ca6 | ||
|
|
5ebe3f5092 | ||
|
|
8e4124f06a | ||
|
|
e47fd5f760 | ||
|
|
8767c71107 | ||
|
|
2156a6533b | ||
|
|
7eac690d44 | ||
|
|
31adc6cfd6 | ||
|
|
d582fd338d | ||
|
|
eed51e3ffa | ||
|
|
6a889bdaa1 | ||
|
|
5f27a45910 | ||
|
|
e1258e0ada | ||
|
|
925cced7d7 | ||
|
|
94083e746f | ||
|
|
a49d579bd3 | ||
|
|
6ed7fcec67 | ||
|
|
6d7db135e7 | ||
|
|
042400b83f | ||
|
|
df54439972 | ||
|
|
86252506f0 | ||
|
|
a9fea2462b | ||
|
|
58987b2ec6 | ||
|
|
aecd218d15 | ||
|
|
856843b52a | ||
|
|
fc740a89ab | ||
|
|
0643607ec3 | ||
|
|
5872bc8a2b | ||
|
|
d07da76383 | ||
|
|
c092de97f2 | ||
|
|
c84a8fb07d | ||
|
|
63b4566475 | ||
|
|
3699dc9f2e | ||
|
|
eee48ce74c | ||
|
|
9072f89a4e | ||
|
|
c9e461dcb6 | ||
|
|
55b548f31c | ||
|
|
dede10ea1a | ||
|
|
b739cdd52a | ||
|
|
94a27b964a | ||
|
|
c7df74dab7 | ||
|
|
bf9b04b126 | ||
|
|
d21c22b444 | ||
|
|
cee56a7d23 | ||
|
|
c3a34227b7 | ||
|
|
7a86856063 | ||
|
|
86f35992dc | ||
|
|
cb84652c8e | ||
|
|
dc3a99c9ca | ||
|
|
566beeaf4b | ||
|
|
9deca92e07 | ||
|
|
09ff85af44 | ||
|
|
a0b6c8a397 | ||
|
|
44dfb80633 | ||
|
|
7067195c2f | ||
|
|
19cf510e62 | ||
|
|
c14852cbd7 | ||
|
|
57d330244b | ||
|
|
dfd8ff9809 | ||
|
|
b4a65c52cc | ||
|
|
386c5e3d30 | ||
|
|
5069e6ecae | ||
|
|
7c38a836d3 | ||
|
|
0731972499 | ||
|
|
f9b9d43ac1 | ||
|
|
d1e431c5e8 | ||
|
|
4c0996888a | ||
|
|
a9d855ad00 | ||
|
|
636ca1c41d | ||
|
|
872b18d5af | ||
|
|
98abdaa5d5 | ||
|
|
b5fafb55c9 | ||
|
|
fbfc5310d5 | ||
|
|
478fddaf57 | ||
|
|
d175070f55 | ||
|
|
0af7a4320d | ||
|
|
48aab5c6e5 | ||
|
|
a20422da74 | ||
|
|
eb7fae92ef | ||
|
|
4b1a6eb49b | ||
|
|
df614cd0a0 | ||
|
|
0adafaaa91 | ||
|
|
467dd8b664 | ||
|
|
dba48334e6 | ||
|
|
98ab4ea2aa | ||
|
|
0629f06156 | ||
|
|
e05e6346ac | ||
|
|
d5469c8247 | ||
|
|
080ec28eb4 | ||
|
|
8f197bc6ac | ||
|
|
82bc71c81d | ||
|
|
5a4f27b375 | ||
|
|
b6d554eebd | ||
|
|
900f478abe | ||
|
|
742a4659f4 | ||
|
|
35b7a5f6bb | ||
|
|
21e8c7ca17 | ||
|
|
8ef1b41093 | ||
|
|
911ff4288d | ||
|
|
6dd759de33 | ||
|
|
e59e247048 | ||
|
|
8940d2b8d1 | ||
|
|
6940390a5e | ||
|
|
7ebf50dc6f | ||
|
|
2c515ceb74 | ||
|
|
39aa6e76b1 | ||
|
|
aa5962519a | ||
|
|
a3f5460d12 | ||
|
|
2e262d41d7 | ||
|
|
6de8547047 | ||
|
|
59954df199 | ||
|
|
8a66f7b6f7 | ||
|
|
a5e5bfad46 | ||
|
|
2058c78943 | ||
|
|
4d279a5f02 | ||
|
|
29f0c4667c | ||
|
|
f00b7b42c0 | ||
|
|
80a3da6efa | ||
|
|
2a1cd7dc01 | ||
|
|
9bc6e041ee | ||
|
|
3bab6ccedf | ||
|
|
eebbd2b93e | ||
|
|
a807dcd5df | ||
|
|
0009a886fe | ||
|
|
9c2bceaaed | ||
|
|
50f3e67e81 | ||
|
|
7e6fcff3ee | ||
|
|
f266480f7d | ||
|
|
96106cc818 | ||
|
|
ed9e061489 | ||
|
|
b56c0cd8a2 | ||
|
|
f36098d60f | ||
|
|
00439052e6 | ||
|
|
fae5956bfb | ||
|
|
8dfd7a300d | ||
|
|
7cf0f21ec0 | ||
|
|
098e78f4ef | ||
|
|
4a30d1fc38 | ||
|
|
148c1b9816 | ||
|
|
cc22693504 | ||
|
|
c4bdf5621c | ||
|
|
a8618b0471 | ||
|
|
b4a6569e63 | ||
|
|
e5a6a50e49 | ||
|
|
c7f272d86a | ||
|
|
023951fd84 | ||
|
|
ef2b0cfa4a | ||
|
|
fe08950b03 | ||
|
|
a5b500cd93 | ||
|
|
16fd1d1eee | ||
|
|
266b1f167d | ||
|
|
40a1edbbcb | ||
|
|
0999daf1f2 | ||
|
|
7462c64fe2 | ||
|
|
4920df95e3 | ||
|
|
6a453039ee | ||
|
|
5281244b33 | ||
|
|
525822f391 | ||
|
|
23e3d82441 | ||
|
|
5ca671e5f5 | ||
|
|
118ad125c4 | ||
|
|
c98ffcca5d | ||
|
|
e74075bb0e | ||
|
|
916c0e4406 | ||
|
|
b626fcba08 | ||
|
|
c765bbb1fd | ||
|
|
43f378b7d2 | ||
|
|
b73551d6ab | ||
|
|
632d82ac95 | ||
|
|
3fb775de28 | ||
|
|
82affff63f | ||
|
|
6d0593a26b | ||
|
|
13ea4035b5 | ||
|
|
1c97e9796d | ||
|
|
4eca4194b7 | ||
|
|
5c801ec2ad | ||
|
|
7f324fb3e6 | ||
|
|
710159a236 | ||
|
|
7afbcc9855 | ||
|
|
8d0647d677 | ||
|
|
9a5296f00e | ||
|
|
6f53cc4dda | ||
|
|
86f573f02c | ||
|
|
181866ba4a | ||
|
|
ded0a4da48 | ||
|
|
3f4f6f01dc | ||
|
|
6a5de80bd9 | ||
|
|
1fef418adb | ||
|
|
c6c094bbd5 | ||
|
|
10dea6073b | ||
|
|
beeddea678 | ||
|
|
66f6b95b5c | ||
|
|
3c6a1e45d7 | ||
|
|
3528bcd6b5 | ||
|
|
f8262b0d27 | ||
|
|
c5785ed195 | ||
|
|
500c7ec82e | ||
|
|
3e07ecabf9 | ||
|
|
98279f54fb | ||
|
|
a6818cd274 | ||
|
|
4c7d402eaf | ||
|
|
3984f8d1e8 | ||
|
|
f2424ddeaa | ||
|
|
b963028f10 | ||
|
|
4aac66a024 | ||
|
|
598de0f03f | ||
|
|
bd3b26c33d | ||
|
|
66f5b7310f | ||
|
|
5ff030783a | ||
|
|
7c11ac4d98 | ||
|
|
05a0d21f4c | ||
|
|
d0c2740a51 | ||
|
|
118752e775 | ||
|
|
1ed02f7d7a | ||
|
|
4042186fac | ||
|
|
abd98b95f6 | ||
|
|
d6ccae342d | ||
|
|
78f8cb2595 | ||
|
|
aa96e2ff3e | ||
|
|
ec83dea3c3 | ||
|
|
3ea329e45f | ||
|
|
a83adb70ad | ||
|
|
94561ed2a6 | ||
|
|
8c511722e0 | ||
|
|
131769f175 | ||
|
|
4a86a1cf76 | ||
|
|
e0ab9aa898 | ||
|
|
cc86795fa3 | ||
|
|
50cb72656a | ||
|
|
c9900c05b2 | ||
|
|
4e1f7349c4 | ||
|
|
5dccde25f4 | ||
|
|
24ac001daa | ||
|
|
163fa733ae | ||
|
|
a113670905 | ||
|
|
1661c82449 | ||
|
|
088d32e712 | ||
|
|
ba24fd79bb | ||
|
|
46227bdad0 | ||
|
|
872b49f29a | ||
|
|
38d412a3fa | ||
|
|
2833fdb907 | ||
|
|
b940ad72be | ||
|
|
17ea26e02a | ||
|
|
1cee81b996 | ||
|
|
f03ea0461c | ||
|
|
6ce9a3cba0 | ||
|
|
8cd32987d4 | ||
|
|
648b775a25 | ||
|
|
b24ccc2fe3 | ||
|
|
00783e7b68 | ||
|
|
dafc47050a | ||
|
|
0e65d89172 | ||
|
|
fd9e7d00ed | ||
|
|
3d7ded209a | ||
|
|
e81a589a8d | ||
|
|
074d8fb42e | ||
|
|
b632d078e5 | ||
|
|
1c2920a339 | ||
|
|
676b8d6921 | ||
|
|
9d5eb002ae | ||
|
|
63d4ba6df8 | ||
|
|
c2dbda63c6 | ||
|
|
6e7b4ff9f9 | ||
|
|
1269f0a13a | ||
|
|
04b91e76f2 | ||
|
|
c9c7bb9171 | ||
|
|
619661a61d | ||
|
|
457b1dee49 | ||
|
|
7cca39ad48 | ||
|
|
90406dfd1e | ||
|
|
6d7abaf5c0 | ||
|
|
bc40942889 | ||
|
|
646d3394d3 | ||
|
|
c06cb5cc58 | ||
|
|
983a3ba7ad | ||
|
|
265afe1610 | ||
|
|
32f7666912 | ||
|
|
20a58143b6 | ||
|
|
4cc3d3f3e2 | ||
|
|
2ab3d8ebf2 | ||
|
|
9e4bfb1ef2 | ||
|
|
97a9ac9bf8 | ||
|
|
2d23917afb | ||
|
|
52182ef9b1 | ||
|
|
91aff7c0e4 | ||
|
|
1723d04902 | ||
|
|
c83c74d3c2 | ||
|
|
d06ae80e0a | ||
|
|
8dd2a20ff8 | ||
|
|
e04db9299d | ||
|
|
7b0cd19487 | ||
|
|
c0fa4f5d27 | ||
|
|
d5f4d5d93f | ||
|
|
9ba1960207 | ||
|
|
04a665db0c | ||
|
|
f47335f89f | ||
|
|
f75aa22b26 | ||
|
|
50e1ce1460 | ||
|
|
df02532fd5 | ||
|
|
bd20626460 | ||
|
|
8738210991 | ||
|
|
6c2c17ada1 | ||
|
|
380f218b3a | ||
|
|
12647fac73 | ||
|
|
9f0f40af80 | ||
|
|
c316fab29f | ||
|
|
37de27d7f6 | ||
|
|
c61d857a67 | ||
|
|
56023facaa | ||
|
|
1dc45bad87 | ||
|
|
0daf2aacf5 | ||
|
|
06ccded94e | ||
|
|
ff38e965bd | ||
|
|
a9a59fd314 | ||
|
|
e2a187f892 | ||
|
|
4a526810ce | ||
|
|
2f5c47e95f | ||
|
|
34b216e6dc | ||
|
|
d2b9d5690b | ||
|
|
d10f1b5d30 | ||
|
|
fea3bb503f | ||
|
|
d92cc944cb | ||
|
|
f57b2d57cd | ||
|
|
cf0e5a811e | ||
|
|
ea8f51d168 | ||
|
|
e8befc4c67 | ||
|
|
5518771a8b | ||
|
|
47bc0f2a3c | ||
|
|
8bd820b909 | ||
|
|
f948d0e214 | ||
|
|
3a7c9e6c8e | ||
|
|
5a65d28d29 | ||
|
|
e9cdaf4dbe | ||
|
|
17f032ea11 | ||
|
|
ef565e5fa3 | ||
|
|
92f9bec1e7 | ||
|
|
0e3f3c13a1 | ||
|
|
74e12ce71d | ||
|
|
5fe6b48517 | ||
|
|
7f7a39292c | ||
|
|
2e1e227b4c | ||
|
|
ee68bcb6e9 | ||
|
|
025a638082 | ||
|
|
33babc5d85 | ||
|
|
a4c17ac82b | ||
|
|
06ba205320 | ||
|
|
5df14abed2 | ||
|
|
cdad85c0ef | ||
|
|
40e2d2045b | ||
|
|
212c8dd054 | ||
|
|
290582d428 | ||
|
|
582267a923 | ||
|
|
fe3c06c36b | ||
|
|
95d7826163 | ||
|
|
5e2099ad47 | ||
|
|
44280d1e52 | ||
|
|
897d879dad | ||
|
|
631a1c49c8 | ||
|
|
d3b20d2c04 | ||
|
|
c60c9ee69a | ||
|
|
965081c554 | ||
|
|
e6458b58ef | ||
|
|
9207462676 | ||
|
|
ab020358e7 | ||
|
|
135cfbac68 | ||
|
|
3dbf09e7ad | ||
|
|
32257c8fab | ||
|
|
5ecca50977 | ||
|
|
ae2fdc7ab3 | ||
|
|
f72ed257ce | ||
|
|
947e265a1a | ||
|
|
77ff362b58 | ||
|
|
9d40baa3ef | ||
|
|
d3b81cb6f8 | ||
|
|
c87ebf1f31 | ||
|
|
4905341999 | ||
|
|
047dee4eb4 | ||
|
|
dd1046b31f | ||
|
|
2b82a472ae | ||
|
|
8d5ef035d2 | ||
|
|
a3d41a80bf | ||
|
|
413507bba9 | ||
|
|
2ca76ff13c | ||
|
|
a6cd010695 | ||
|
|
411505bff5 | ||
|
|
4f4e879f8d | ||
|
|
448727f4b5 | ||
|
|
ca8138bb46 | ||
|
|
10764b8a68 | ||
|
|
b91afaf5c7 | ||
|
|
31501316c9 | ||
|
|
120a62257f | ||
|
|
a1e416ee83 | ||
|
|
3cf2dc0c04 | ||
|
|
6df9e584b3 | ||
|
|
0d247a9b8a | ||
|
|
bc22de47f9 | ||
|
|
a5b2d5e727 | ||
|
|
2c78f77eb2 | ||
|
|
738e802f3c | ||
|
|
8dab0755d3 | ||
|
|
5f81b573c0 | ||
|
|
a267712d10 | ||
|
|
0abaae073d | ||
|
|
a6791561d6 | ||
|
|
3ca2473239 | ||
|
|
779cc3e24d | ||
|
|
cfd2139310 | ||
|
|
4c05bff21e | ||
|
|
5392dd7ed0 | ||
|
|
cb9cb6eb09 | ||
|
|
3a33ddeecd | ||
|
|
a83910d7de | ||
|
|
336ed9d6e5 | ||
|
|
346e942e93 | ||
|
|
13a5be7306 | ||
|
|
bdceff6380 | ||
|
|
17c61f897a | ||
|
|
9a58e88ec6 | ||
|
|
355cccaa64 | ||
|
|
29580de2c7 | ||
|
|
67e08da918 | ||
|
|
e660b2d169 | ||
|
|
40bdf692d1 | ||
|
|
562c46660a | ||
|
|
0724dd0043 | ||
|
|
c0932a1bd5 | ||
|
|
d7a65fafad | ||
|
|
239e27c1b5 | ||
|
|
1ca10373a3 | ||
|
|
ac6687f6ff | ||
|
|
b616e1c8f6 | ||
|
|
1ec22b3d0c | ||
|
|
a01ffc6e1a | ||
|
|
e1bbc1e525 | ||
|
|
049cef9ce3 | ||
|
|
18f7a6a694 | ||
|
|
30a3abedbe | ||
|
|
2f5c926c82 | ||
|
|
55b4425c5d | ||
|
|
dc49d7af38 | ||
|
|
e01c2e903a | ||
|
|
886be81af2 | ||
|
|
671ddf5bef | ||
|
|
5f8cb04fee | ||
|
|
3f06560c51 | ||
|
|
f666e6f42e | ||
|
|
e546ce83b4 | ||
|
|
059a2d754e | ||
|
|
1e64ebe17a | ||
|
|
8abf8f844f | ||
|
|
01740a253d | ||
|
|
0461a28701 | ||
|
|
a3b1590286 | ||
|
|
b5cbb8b990 | ||
|
|
ff23a5bf1e | ||
|
|
afe2b14430 | ||
|
|
d4a6826d13 | ||
|
|
8d17018019 | ||
|
|
a65222d057 | ||
|
|
25e56ee8fb | ||
|
|
40c3e38f5a | ||
|
|
f810c56100 | ||
|
|
95b3bb955c | ||
|
|
8db07974e2 | ||
|
|
6c25650bbd | ||
|
|
4775fd74b8 | ||
|
|
f20ab12cf3 | ||
|
|
e6642c4338 | ||
|
|
5b81a1a9d6 | ||
|
|
7e40a810eb | ||
|
|
e7653d0497 | ||
|
|
8f7d2b592a | ||
|
|
7480f9b559 | ||
|
|
ba33649d7e | ||
|
|
2d72f55e57 | ||
|
|
ab47b4a783 |
1
.dockerignore
Normal file
@@ -0,0 +1 @@
|
||||
*
|
||||
93
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
name: continuous-integration/gh-actions/gui
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build-macos:
|
||||
runs-on: macOS-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: install dependencies
|
||||
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install boost hidapi zmq libpgm miniupnpc ldns expat libunwind-headers protobuf qt5 pkg-config
|
||||
- name: build
|
||||
run: DEV_MODE=ON make release -j3
|
||||
- name: test qml
|
||||
run: build/release/bin/monero-wallet-gui.app/Contents/MacOS/monero-wallet-gui --test-qml
|
||||
|
||||
build-ubuntu:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: remove bundled boost
|
||||
run: sudo rm -rf /usr/local/share/boost
|
||||
- name: set apt conf
|
||||
run: |
|
||||
echo "Acquire::Retries \"3\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom
|
||||
echo "Acquire::http::Timeout \"120\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom
|
||||
echo "Acquire::ftp::Timeout \"120\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom
|
||||
- name: update apt
|
||||
run: sudo apt update
|
||||
- name: install monero dependencies
|
||||
run: sudo apt -y install build-essential cmake libboost-all-dev miniupnpc libunbound-dev graphviz doxygen libunwind8-dev pkg-config libssl-dev libzmq3-dev libsodium-dev libhidapi-dev libnorm-dev libusb-1.0-0-dev libpgm-dev libprotobuf-dev protobuf-compiler
|
||||
- name: install monero gui dependencies
|
||||
run: sudo apt -y install qtbase5-dev qt5-default qtdeclarative5-dev qml-module-qtquick-controls qml-module-qtquick-controls2 qml-module-qtquick-dialogs qml-module-qtquick-xmllistmodel qml-module-qt-labs-settings qml-module-qt-labs-folderlistmodel qttools5-dev-tools qml-module-qtquick-templates2 libqt5svg5-dev libgcrypt20-dev xvfb
|
||||
- name: build
|
||||
run: DEV_MODE=ON make release -j3
|
||||
- name: test qml
|
||||
run: xvfb-run -a build/release/bin/monero-wallet-gui --test-qml
|
||||
|
||||
build-windows:
|
||||
runs-on: windows-latest
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: eine/setup-msys2@v1
|
||||
with:
|
||||
update: true
|
||||
install: mingw-w64-x86_64-toolchain make mingw-w64-x86_64-cmake mingw-w64-x86_64-boost mingw-w64-x86_64-openssl mingw-w64-x86_64-zeromq mingw-w64-x86_64-libsodium mingw-w64-x86_64-hidapi mingw-w64-x86_64-protobuf-c mingw-w64-x86_64-libusb git mingw-w64-x86_64-qt5 mingw-w64-x86_64-libgcrypt
|
||||
- name: build
|
||||
run: DEV_MODE=ON make release-win64 -j2
|
||||
- name: test qml
|
||||
run: build/release/bin/monero-wallet-gui --test-qml
|
||||
|
||||
docker-linux-static:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: satackey/action-docker-layer-caching@v0.0.8
|
||||
continue-on-error: true
|
||||
with:
|
||||
key: docker-linux-static-{hash}
|
||||
restore-keys: |
|
||||
docker-linux-static-
|
||||
- name: preprare build enviroment
|
||||
run: docker build --tag monero:build-env-linux --build-arg THREADS=3 --file Dockerfile.linux .
|
||||
- name: build
|
||||
run: docker run --rm -v /home/runner/work/monero-gui/monero-gui:/monero-gui -w /monero-gui monero:build-env-linux sh -c 'make release-static -j3'
|
||||
|
||||
docker-windows-static:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: satackey/action-docker-layer-caching@v0.0.8
|
||||
continue-on-error: true
|
||||
with:
|
||||
key: docker-windows-static-{hash}
|
||||
restore-keys: |
|
||||
docker-windows-static-
|
||||
- name: preprare build enviroment
|
||||
run: docker build --tag monero:build-env-windows --build-arg THREADS=3 --file Dockerfile.windows .
|
||||
- name: build
|
||||
run: docker run --rm -v /home/runner/work/monero-gui/monero-gui:/monero-gui -w /monero-gui monero:build-env-windows sh -c 'make depends root=/depends target=x86_64-w64-mingw32 tag=win-x64 -j3'
|
||||
2
.gitignore
vendored
@@ -13,6 +13,7 @@ monero-wallet-gui_plugin_import.cpp
|
||||
monero-wallet-gui_qml_plugin_import.cpp
|
||||
*.qmlc
|
||||
*.jsc
|
||||
qml_qmlcache.qrc
|
||||
|
||||
### Vim ###
|
||||
# Swap
|
||||
@@ -28,6 +29,7 @@ Session.vim
|
||||
# Temporary
|
||||
.netrwhist
|
||||
*~
|
||||
*.autosave
|
||||
# Auto-generated tag files
|
||||
tags
|
||||
# Persistent undo
|
||||
|
||||
530
CMakeLists.txt
Normal file
@@ -0,0 +1,530 @@
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
project(monero-gui)
|
||||
|
||||
message(STATUS "Initiating compile using CMake ${CMAKE_VERSION}")
|
||||
|
||||
set(VERSION_MAJOR "17")
|
||||
set(VERSION_MINOR "1")
|
||||
set(VERSION_REVISION "0")
|
||||
set(VERSION "0.${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}")
|
||||
|
||||
option(STATIC "Link libraries statically, requires static Qt")
|
||||
|
||||
option(USE_DEVICE_TREZOR "Trezor support compilation" ON)
|
||||
option(ENABLE_PASS_STRENGTH_METER "Enable zxcvbn library for password strength" OFF)
|
||||
option(WITH_SCANNER "Enable webcam QR scanner" OFF)
|
||||
option(DEV_MODE "Checkout latest monero master on build" OFF)
|
||||
|
||||
list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_SOURCE_DIR}/cmake")
|
||||
include(CheckCCompilerFlag)
|
||||
include(CheckCXXCompilerFlag)
|
||||
include(CheckLinkerFlag)
|
||||
include(FindCcache)
|
||||
|
||||
if(DEBUG)
|
||||
set(CMAKE_VERBOSE_MAKEFILE ON)
|
||||
endif()
|
||||
|
||||
set(BUILD_GUI_DEPS ON)
|
||||
set(ARCH "x86-64" CACHE STRING "Target architecture")
|
||||
set(BUILD_64 ON CACHE BOOL "Build 64-bit binaries")
|
||||
|
||||
if(NOT MANUAL_SUBMODULES)
|
||||
find_package(Git)
|
||||
if(GIT_FOUND)
|
||||
if(NOT DEV_MODE)
|
||||
function (check_submodule relative_path)
|
||||
execute_process(COMMAND git rev-parse "HEAD" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${relative_path} OUTPUT_VARIABLE localHead)
|
||||
execute_process(COMMAND git rev-parse "HEAD:${relative_path}" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} OUTPUT_VARIABLE checkedHead)
|
||||
string(COMPARE EQUAL "${localHead}" "${checkedHead}" upToDate)
|
||||
if (upToDate)
|
||||
message(STATUS "Submodule '${relative_path}' is up-to-date")
|
||||
else()
|
||||
message(FATAL_ERROR "Submodule '${relative_path}' is not using the checked head. Please update all submodules with\ngit submodule update --init --force --recursive\nor run cmake with -DMANUAL_SUBMODULES=1,\n or if you want to build from latest master run cmake with -DDEV_MODE=ON,\n or run make devmode")
|
||||
endif()
|
||||
endfunction ()
|
||||
message(STATUS "Checking submodules")
|
||||
check_submodule(monero)
|
||||
else()
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} fetch WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/monero RESULT_VARIABLE GIT_FETCH_RESULT)
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} checkout -f origin/master WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/monero RESULT_VARIABLE GIT_CHECKOUT_MASTER_RESULT)
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --force --recursive WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/monero RESULT_VARIABLE GIT_SUBMODULE_UPDATE_RESULT)
|
||||
if(NOT GIT_FETCH_RESULT EQUAL "0" OR NOT GIT_CHECKOUT_MASTER_RESULT EQUAL "0" OR NOT GIT_SUBMODULE_UPDATE_RESULT EQUAL "0")
|
||||
message(FATAL_ERROR "Updating git submodule to master (-DDEV_MODE=ON) failed")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_subdirectory(monero)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
set_property(TARGET wallet_merged PROPERTY FOLDER "monero")
|
||||
get_directory_property(ARCH_WIDTH DIRECTORY "monero" DEFINITION ARCH_WIDTH)
|
||||
get_directory_property(UNBOUND_LIBRARY DIRECTORY "monero" DEFINITION UNBOUND_LIBRARY)
|
||||
get_directory_property(DEVICE_TREZOR_READY DIRECTORY "monero" DEFINITION DEVICE_TREZOR_READY)
|
||||
get_directory_property(TREZOR_DEP_LIBS DIRECTORY "monero" DEFINITION TREZOR_DEP_LIBS)
|
||||
|
||||
if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
add_definitions(-DQT_NO_DEBUG)
|
||||
endif()
|
||||
|
||||
if(STATIC)
|
||||
message(STATUS "Initiating static build")
|
||||
set(Boost_USE_STATIC_LIBS ON)
|
||||
set(Boost_USE_STATIC_RUNTIME ON)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
|
||||
add_definitions(-DMONERO_GUI_STATIC)
|
||||
endif()
|
||||
|
||||
# Include password strength library
|
||||
if(ENABLE_PASS_STRENGTH_METER)
|
||||
message(STATUS "Building with pass strength meter support.")
|
||||
else()
|
||||
add_definitions(-DDISABLE_PASS_STRENGTH_METER)
|
||||
endif()
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
|
||||
# force version update
|
||||
function (monero_gui_add_library_with_deps)
|
||||
cmake_parse_arguments(MONERO_ADD_LIBRARY "" "NAME" "DEPENDS;SOURCES" ${ARGN})
|
||||
source_group("${MONERO_ADD_LIBRARY_NAME}" FILES ${MONERO_ADD_LIBRARY_SOURCES})
|
||||
|
||||
# Define a ("virtual") object library and an actual library that links those
|
||||
# objects together. The virtual libraries can be arbitrarily combined to link
|
||||
# any subset of objects into one library archive. This is used for releasing
|
||||
# libwallet, which combines multiple components.
|
||||
set(objlib obj_${MONERO_ADD_LIBRARY_NAME})
|
||||
add_library(${objlib} OBJECT ${MONERO_ADD_LIBRARY_SOURCES})
|
||||
add_library("${MONERO_ADD_LIBRARY_NAME}" $<TARGET_OBJECTS:${objlib}>)
|
||||
if (MONERO_ADD_LIBRARY_DEPENDS)
|
||||
add_dependencies(${objlib} ${MONERO_ADD_LIBRARY_DEPENDS})
|
||||
endif()
|
||||
set_property(TARGET "${MONERO_ADD_LIBRARY_NAME}" PROPERTY FOLDER "libs")
|
||||
target_compile_definitions(${objlib}
|
||||
PRIVATE $<TARGET_PROPERTY:${MONERO_ADD_LIBRARY_NAME},INTERFACE_COMPILE_DEFINITIONS>)
|
||||
endfunction ()
|
||||
|
||||
function (monero_gui_add_library name)
|
||||
monero_gui_add_library_with_deps(NAME "${name}" SOURCES ${ARGN})
|
||||
endfunction()
|
||||
|
||||
include_directories(${EASYLOGGING_INCLUDE})
|
||||
link_directories(${EASYLOGGING_LIBRARY_DIRS})
|
||||
|
||||
|
||||
include(VersionGui)
|
||||
monero_gui_add_library(gui_version SOURCES version.js DEPENDS genversiongui)
|
||||
|
||||
message(STATUS "${CMAKE_MODULE_PATH}")
|
||||
|
||||
# OpenSSL
|
||||
if(APPLE AND NOT OPENSSL_ROOT_DIR)
|
||||
execute_process(COMMAND brew --prefix openssl OUTPUT_VARIABLE OPENSSL_ROOT_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
find_package(OpenSSL REQUIRED)
|
||||
message(STATUS "OpenSSL: Version ${OPENSSL_VERSION}")
|
||||
message(STATUS "OpenSSL: include dir at ${OPENSSL_INCLUDE_DIR}")
|
||||
message(STATUS "OpenSSL: libraries at ${OPENSSL_LIBRARIES} ${OPENSSL_SSL_LIBRARIES}")
|
||||
|
||||
# Zbar (for QR scanner)
|
||||
if(WITH_SCANNER)
|
||||
add_definitions(-DWITH_SCANNER)
|
||||
find_package(ZBar0)
|
||||
message(STATUS "libzbar: include dir at ${ZBAR_INCLUDE_DIR}")
|
||||
message(STATUS "libzbar: libraries at ${ZBAR_LIBRARIES}")
|
||||
endif()
|
||||
|
||||
# Sodium
|
||||
find_library(SODIUM_LIBRARY sodium)
|
||||
message(STATUS "libsodium: libraries at ${SODIUM_LIBRARY}")
|
||||
|
||||
# LibUSB
|
||||
find_package(LibUSB)
|
||||
message(STATUS "libusb: include dir at ${LibUSB_INCLUDE_DIRS}")
|
||||
message(STATUS "libusb: libraries at ${LibUSB_LIBRARIES}")
|
||||
|
||||
# HIDApi
|
||||
find_package(HIDAPI REQUIRED)
|
||||
message(STATUS "libhidapi: include dir at ${HIDAPI_INCLUDE_DIRS}")
|
||||
message(STATUS "libhidapi: libraries at ${HIDAPI_LIBRARIES}")
|
||||
|
||||
# Boost
|
||||
if(DEBUG)
|
||||
set(Boost_DEBUG ON)
|
||||
endif()
|
||||
if(APPLE AND NOT BOOST_ROOT)
|
||||
execute_process(COMMAND brew --prefix boost OUTPUT_VARIABLE BOOST_ROOT OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
if(MINGW)
|
||||
set(Boost_THREADAPI win32)
|
||||
endif()
|
||||
find_package(Boost 1.58 REQUIRED COMPONENTS
|
||||
system
|
||||
filesystem
|
||||
thread
|
||||
date_time
|
||||
chrono
|
||||
regex
|
||||
serialization
|
||||
program_options
|
||||
locale)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
set(CMAKE_SKIP_RPATH ON)
|
||||
find_package(X11 REQUIRED)
|
||||
message(STATUS "X11_FOUND = ${X11_FOUND}")
|
||||
message(STATUS "X11_INCLUDE_DIR = ${X11_INCLUDE_DIR}")
|
||||
message(STATUS "X11_LIBRARIES = ${X11_LIBRARIES}")
|
||||
include_directories(${X11_INCLUDE_DIR})
|
||||
link_directories(${X11_LIBRARIES})
|
||||
if(STATIC)
|
||||
find_library(XCB_LIBRARY xcb)
|
||||
message(STATUS "Found xcb library: ${XCB_LIBRARY}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(MINGW)
|
||||
string(REGEX MATCH "^[^/]:/[^/]*" msys2_install_path "${CMAKE_C_COMPILER}")
|
||||
message(STATUS "MSYS location: ${msys2_install_path}")
|
||||
set(CMAKE_INCLUDE_PATH "${msys2_install_path}/mingw${ARCH_WIDTH}/include")
|
||||
# This is necessary because otherwise CMake will make Boost libraries -lfoo
|
||||
# rather than a full path. Unfortunately, this makes the shared libraries get
|
||||
# linked due to a bug in CMake which misses putting -static flags around the
|
||||
# -lfoo arguments.
|
||||
set(DEFLIB ${msys2_install_path}/mingw${ARCH_WIDTH}/lib)
|
||||
list(REMOVE_ITEM CMAKE_C_IMPLICIT_LINK_DIRECTORIES ${DEFLIB})
|
||||
list(REMOVE_ITEM CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES ${DEFLIB})
|
||||
endif()
|
||||
|
||||
set(QT5_LIBRARIES
|
||||
Qt5Core
|
||||
Qt5Quick
|
||||
Qt5Widgets
|
||||
Qt5Gui
|
||||
Qt5Network
|
||||
Qt5Qml
|
||||
Qt5Svg
|
||||
Qt5Xml
|
||||
)
|
||||
|
||||
if(WITH_SCANNER)
|
||||
list(APPEND QT5_LIBRARIES Qt5Multimedia)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
list(APPEND QT5_LIBRARIES Qt5MacExtras)
|
||||
|
||||
if(NOT CMAKE_PREFIX_PATH AND DEFINED ENV{CMAKE_PREFIX_PATH})
|
||||
message(STATUS "Using CMAKE_PREFIX_PATH environment variable: '$ENV{CMAKE_PREFIX_PATH}'")
|
||||
set(CMAKE_PREFIX_PATH $ENV{CMAKE_PREFIX_PATH})
|
||||
endif()
|
||||
if(NOT CMAKE_PREFIX_PATH)
|
||||
execute_process(COMMAND brew --prefix qt5 OUTPUT_VARIABLE QT5_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
list(APPEND CMAKE_PREFIX_PATH ${QT5_DIR})
|
||||
endif()
|
||||
|
||||
if(CMAKE_PREFIX_PATH)
|
||||
include_directories(${CMAKE_PREFIX_PATH}/include)
|
||||
set(CMAKE_BUILD_RPATH "${CMAKE_PREFIX_PATH}/lib")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
|
||||
# TODO: drop this once we switch to Qt 5.14+
|
||||
pkg_check_modules(Qt5QmlModels_PKG_CONFIG QUIET Qt5QmlModels)
|
||||
if(Qt5QmlModels_PKG_CONFIG_FOUND)
|
||||
list(APPEND QT5_LIBRARIES Qt5QmlModels)
|
||||
endif()
|
||||
|
||||
# TODO: drop this once we switch to Qt 5.12+
|
||||
find_package(Qt5XmlPatterns QUIET)
|
||||
if(Qt5XmlPatterns_FOUND)
|
||||
list(APPEND QT5_LIBRARIES Qt5XmlPatterns)
|
||||
endif()
|
||||
|
||||
foreach(QT5_MODULE ${QT5_LIBRARIES})
|
||||
find_package(${QT5_MODULE} REQUIRED)
|
||||
include_directories(${${QT5_MODULE}_INCLUDE_DIRS})
|
||||
endforeach()
|
||||
|
||||
pkg_check_modules(QT5_PKG_CONFIG REQUIRED ${QT5_LIBRARIES})
|
||||
|
||||
if(QT5_PKG_CONFIG_FOUND)
|
||||
set(QT5_PKG_CONFIG "QT5_PKG_CONFIG")
|
||||
if(STATIC)
|
||||
set(QT5_PKG_CONFIG "${QT5_PKG_CONFIG}_STATIC")
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
list(JOIN ${QT5_PKG_CONFIG}_LDFLAGS_OTHER " " ${QT5_PKG_CONFIG}_LDFLAGS_OTHER)
|
||||
list(JOIN ${QT5_PKG_CONFIG}_LIBRARIES " " ${QT5_PKG_CONFIG}_LIBRARIES)
|
||||
list(JOIN ${QT5_PKG_CONFIG}_INCLUDE_DIRS " " ${QT5_PKG_CONFIG}_INCLUDE_DIRS)
|
||||
|
||||
# temporal workaround for https://bugreports.qt.io/browse/QTBUG-80922
|
||||
STRING(REPLACE "${QT5_PKG_CONFIG_Qt5Core_PREFIX}" "${CMAKE_PREFIX_PATH}" ${QT5_PKG_CONFIG}_LDFLAGS_OTHER "${${QT5_PKG_CONFIG}_LDFLAGS_OTHER}")
|
||||
STRING(REPLACE "${QT5_PKG_CONFIG_Qt5Core_PREFIX}" "${CMAKE_PREFIX_PATH}" ${QT5_PKG_CONFIG}_LIBRARIES "${${QT5_PKG_CONFIG}_LIBRARIES}")
|
||||
STRING(REPLACE "${QT5_PKG_CONFIG_Qt5Core_PREFIX}" "${CMAKE_PREFIX_PATH}" ${QT5_PKG_CONFIG}_INCLUDE_DIRS "${${QT5_PKG_CONFIG}_INCLUDE_DIRS}")
|
||||
endif()
|
||||
|
||||
set(QT5_LIBRARIES ${${QT5_PKG_CONFIG}_LIBRARIES} ${${QT5_PKG_CONFIG}_LDFLAGS_OTHER})
|
||||
include_directories(${${QT5_PKG_CONFIG}_INCLUDE_DIRS})
|
||||
link_directories(${${QT5_PKG_CONFIG}_LIBRARY_DIRS})
|
||||
endif()
|
||||
|
||||
list(APPEND QT5_LIBRARIES
|
||||
${Qt5Gui_PLUGINS}
|
||||
${Qt5Svg_PLUGINS}
|
||||
${Qt5Qml_PLUGINS}
|
||||
${Qt5Network_PLUGINS}
|
||||
)
|
||||
|
||||
if(STATIC)
|
||||
set(QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/Qt/labs/folderlistmodel)
|
||||
list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/Qt/labs/settings)
|
||||
list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/QtGraphicalEffects)
|
||||
list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/QtGraphicalEffects/private)
|
||||
list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/QtMultimedia)
|
||||
list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/QtQuick.2)
|
||||
list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/QtQuick/Controls)
|
||||
list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/QtQuick/Controls.2)
|
||||
list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/QtQuick/Dialogs)
|
||||
list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/QtQuick/Dialogs/Private)
|
||||
list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/QtQuick/Layouts)
|
||||
list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/QtQuick/PrivateWidgets)
|
||||
list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/QtQuick/Templates.2)
|
||||
list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/QtQuick/Window.2)
|
||||
list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/QtQuick/XmlListModel)
|
||||
|
||||
set(QT5_EXTRA_LIBRARIES_LIST
|
||||
qtquicktemplates2plugin
|
||||
Qt5QuickTemplates2
|
||||
qtquickcontrols2plugin
|
||||
Qt5QuickControls2
|
||||
dialogplugin
|
||||
dialogsprivateplugin
|
||||
qmlfolderlistmodelplugin
|
||||
qmlsettingsplugin
|
||||
qmlxmllistmodelplugin
|
||||
qquicklayoutsplugin
|
||||
)
|
||||
|
||||
if(WITH_SCANNER)
|
||||
list(APPEND QT5_EXTRA_LIBRARIES_LIST
|
||||
declarative_multimedia
|
||||
Qt5MultimediaQuick_p
|
||||
)
|
||||
endif()
|
||||
|
||||
list(APPEND QT5_EXTRA_LIBRARIES_LIST
|
||||
qtgraphicaleffectsplugin
|
||||
qtgraphicaleffectsprivate
|
||||
qtquick2plugin
|
||||
qtquickcontrolsplugin
|
||||
widgetsplugin
|
||||
windowplugin
|
||||
)
|
||||
|
||||
set(QT5_EXTRA_LIBRARIES)
|
||||
foreach(LIBRARY ${QT5_EXTRA_LIBRARIES_LIST})
|
||||
find_library(${LIBRARY}_LIBRARY ${LIBRARY} PATHS ${QT5_EXTRA_PATHS} REQUIRED)
|
||||
list(APPEND QT5_EXTRA_LIBRARIES ${${LIBRARY}_LIBRARY})
|
||||
endforeach()
|
||||
|
||||
if(MINGW)
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
list(APPEND QT5_EXTRA_LIBRARIES D3D11 Dwrite D2d1)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(QT5_LIBRARIES
|
||||
${QT5_EXTRA_LIBRARIES}
|
||||
${QT5_LIBRARIES}
|
||||
)
|
||||
|
||||
set(QT5_INTEGRATION_LIBRARIES_LIST
|
||||
Qt5EventDispatcherSupport
|
||||
Qt5PacketProtocol
|
||||
Qt5ThemeSupport
|
||||
Qt5FontDatabaseSupport
|
||||
)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
list(APPEND QT5_INTEGRATION_LIBRARIES_LIST
|
||||
Qt5XcbQpa
|
||||
xcb-static
|
||||
Qt5ServiceSupport
|
||||
Qt5GlxSupport
|
||||
)
|
||||
elseif(MINGW)
|
||||
list(APPEND QT5_INTEGRATION_LIBRARIES_LIST qtfreetype)
|
||||
endif()
|
||||
|
||||
foreach(LIBRARY ${QT5_INTEGRATION_LIBRARIES_LIST})
|
||||
find_library(${LIBRARY}_LIBRARY ${LIBRARY} PATHS ${QT5_EXTRA_PATHS} REQUIRED)
|
||||
list(APPEND QT5_LIBRARIES ${${LIBRARY}_LIBRARY})
|
||||
endforeach()
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
pkg_check_modules(X11XCB_XCBGLX_FONTCONFIG REQUIRED x11-xcb xcb-glx fontconfig)
|
||||
list(APPEND QT5_LIBRARIES ${X11XCB_XCBGLX_FONTCONFIG_STATIC_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
message(STATUS "Using Boost include dir at ${Boost_INCLUDE_DIRS}")
|
||||
message(STATUS "Using Boost libraries at ${Boost_LIBRARIES}")
|
||||
|
||||
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
|
||||
if(MINGW)
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wa,-mbig-obj")
|
||||
set(EXTRA_LIBRARIES mswsock;ws2_32;iphlpapi;crypt32;bcrypt)
|
||||
if(DEPENDS)
|
||||
set(ICU_LIBRARIES icuio icui18n icuuc icudata icutu iconv)
|
||||
else()
|
||||
set(ICU_LIBRARIES icuio icuin icuuc icudt icutu iconv)
|
||||
endif()
|
||||
elseif(APPLE)
|
||||
set(EXTRA_LIBRARIES "-framework AppKit")
|
||||
elseif(OPENBSD OR ANDROID)
|
||||
set(EXTRA_LIBRARIES "")
|
||||
elseif(FREEBSD)
|
||||
set(EXTRA_LIBRARIES execinfo)
|
||||
elseif(DRAGONFLY)
|
||||
find_library(COMPAT compat)
|
||||
set(EXTRA_LIBRARIES execinfo ${COMPAT})
|
||||
elseif(CMAKE_SYSTEM_NAME MATCHES "(SunOS|Solaris)")
|
||||
set(EXTRA_LIBRARIES socket nsl resolv)
|
||||
elseif(NOT MSVC AND NOT DEPENDS)
|
||||
find_library(RT rt)
|
||||
set(EXTRA_LIBRARIES ${RT})
|
||||
endif()
|
||||
|
||||
list(APPEND EXTRA_LIBRARIES ${CMAKE_DL_LIBS})
|
||||
|
||||
if(APPLE)
|
||||
include_directories(SYSTEM /usr/include/malloc)
|
||||
if(POLICY CMP0042)
|
||||
cmake_policy(SET CMP0042 NEW)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (APPLE AND NOT IOS)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=x86-64 -fvisibility=default -std=c++11")
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=default -DGTEST_HAS_TR1_TUPLE=0")
|
||||
endif()
|
||||
|
||||
# warnings
|
||||
add_c_flag_if_supported(-Werror C_SECURITY_FLAGS)
|
||||
add_cxx_flag_if_supported(-Werror CXX_SECURITY_FLAGS)
|
||||
add_c_flag_if_supported(-Wformat C_SECURITY_FLAGS)
|
||||
add_cxx_flag_if_supported(-Wformat CXX_SECURITY_FLAGS)
|
||||
add_c_flag_if_supported(-Wformat-security C_SECURITY_FLAGS)
|
||||
add_cxx_flag_if_supported(-Wformat-security CXX_SECURITY_FLAGS)
|
||||
|
||||
# -fstack-protector
|
||||
if (NOT OPENBSD AND NOT (WIN32 AND (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_LESS 9.1)))
|
||||
add_c_flag_if_supported(-fstack-protector C_SECURITY_FLAGS)
|
||||
add_cxx_flag_if_supported(-fstack-protector CXX_SECURITY_FLAGS)
|
||||
add_c_flag_if_supported(-fstack-protector-strong C_SECURITY_FLAGS)
|
||||
add_cxx_flag_if_supported(-fstack-protector-strong CXX_SECURITY_FLAGS)
|
||||
endif()
|
||||
|
||||
# New in GCC 8.2
|
||||
if (NOT OPENBSD AND NOT (WIN32 AND (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_LESS 9.1)))
|
||||
add_c_flag_if_supported(-fcf-protection=full C_SECURITY_FLAGS)
|
||||
add_cxx_flag_if_supported(-fcf-protection=full CXX_SECURITY_FLAGS)
|
||||
endif()
|
||||
if (NOT WIN32 AND NOT OPENBSD)
|
||||
add_c_flag_if_supported(-fstack-clash-protection C_SECURITY_FLAGS)
|
||||
add_cxx_flag_if_supported(-fstack-clash-protection CXX_SECURITY_FLAGS)
|
||||
endif()
|
||||
|
||||
# Removed in GCC 9.1 (or before ?), but still accepted, so spams the output
|
||||
if (NOT (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 9.1))
|
||||
add_c_flag_if_supported(-mmitigate-rop C_SECURITY_FLAGS)
|
||||
add_cxx_flag_if_supported(-mmitigate-rop CXX_SECURITY_FLAGS)
|
||||
endif()
|
||||
|
||||
# linker
|
||||
if (APPLE)
|
||||
add_linker_flag_if_supported(-Wl,-bind_at_load LD_SECURITY_FLAGS)
|
||||
add_linker_flag_if_supported(-Wl,-dead_strip LD_SECURITY_FLAGS)
|
||||
add_linker_flag_if_supported(-Wl,-dead_strip_dylibs LD_SECURITY_FLAGS)
|
||||
endif()
|
||||
if (NOT APPLE AND NOT (WIN32 AND CMAKE_C_COMPILER_ID STREQUAL "GNU"))
|
||||
# Windows binaries die on startup with PIE when compiled with GCC
|
||||
add_linker_flag_if_supported(-pie LD_SECURITY_FLAGS)
|
||||
endif()
|
||||
add_linker_flag_if_supported(-Wl,-z,relro LD_SECURITY_FLAGS)
|
||||
add_linker_flag_if_supported(-Wl,-z,now LD_SECURITY_FLAGS)
|
||||
add_linker_flag_if_supported(-Wl,-z,noexecstack noexecstack_SUPPORTED)
|
||||
if (noexecstack_SUPPORTED)
|
||||
set(LD_SECURITY_FLAGS "${LD_SECURITY_FLAGS} -Wl,-z,noexecstack")
|
||||
endif()
|
||||
add_linker_flag_if_supported(-Wl,-z,noexecheap noexecheap_SUPPORTED)
|
||||
if (noexecheap_SUPPORTED)
|
||||
set(LD_SECURITY_FLAGS "${LD_SECURITY_FLAGS} -Wl,-z,noexecheap")
|
||||
endif()
|
||||
|
||||
# some windows linker bits
|
||||
if (WIN32)
|
||||
add_linker_flag_if_supported(-Wl,--dynamicbase LD_SECURITY_FLAGS)
|
||||
add_linker_flag_if_supported(-Wl,--nxcompat LD_SECURITY_FLAGS)
|
||||
add_linker_flag_if_supported(-Wl,--high-entropy-va LD_SECURITY_FLAGS)
|
||||
endif()
|
||||
|
||||
if(STATIC)
|
||||
add_linker_flag_if_supported(-static-libgcc STATIC_FLAGS)
|
||||
add_linker_flag_if_supported(-static-libstdc++ STATIC_FLAGS)
|
||||
if(MINGW)
|
||||
add_linker_flag_if_supported(-static STATIC_FLAGS)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# With GCC 6.1.1 the compiled binary malfunctions due to aliasing. Until that
|
||||
# is fixed in the code (Issue #847), force compiler to be conservative.
|
||||
add_c_flag_if_supported(-fno-strict-aliasing C_SECURITY_FLAGS)
|
||||
add_cxx_flag_if_supported(-fno-strict-aliasing CXX_SECURITY_FLAGS)
|
||||
|
||||
add_c_flag_if_supported(-fPIC C_SECURITY_FLAGS)
|
||||
add_cxx_flag_if_supported(-fPIC CXX_SECURITY_FLAGS)
|
||||
|
||||
message(STATUS "Using C security hardening flags: ${C_SECURITY_FLAGS}")
|
||||
message(STATUS "Using C++ security hardening flags: ${CXX_SECURITY_FLAGS}")
|
||||
message(STATUS "Using linker security hardening flags: ${LD_SECURITY_FLAGS}")
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 ${C_SECURITY_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ${CXX_SECURITY_FLAGS}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${LD_SECURITY_FLAGS} ${STATIC_FLAGS}")
|
||||
|
||||
if (HIDAPI_FOUND OR LibUSB_COMPILE_TEST_PASSED)
|
||||
if (APPLE)
|
||||
if(DEPENDS)
|
||||
list(APPEND EXTRA_LIBRARIES "-framework Foundation -framework IOKit")
|
||||
else()
|
||||
find_library(COREFOUNDATION CoreFoundation)
|
||||
find_library(IOKIT IOKit)
|
||||
list(APPEND EXTRA_LIBRARIES ${IOKIT})
|
||||
list(APPEND EXTRA_LIBRARIES ${COREFOUNDATION})
|
||||
endif()
|
||||
endif()
|
||||
if (WIN32)
|
||||
find_library(VERSION_LIBRARY version PATHS /usr/x86_64-w64-mingw32/lib)
|
||||
if(VERSION_LIBRARY STREQUAL "VERSION_LIBRARY-NOTFOUND")
|
||||
set(VERSION_LIBRARY Version)
|
||||
endif()
|
||||
list(APPEND EXTRA_LIBRARIES setupapi ${VERSION_LIBRARY})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_subdirectory(translations)
|
||||
|
||||
add_subdirectory(src)
|
||||
44
DEPLOY.md
Normal file
@@ -0,0 +1,44 @@
|
||||
# macOS:
|
||||
|
||||
Use macOS 10.12 - 10.13 for better backwards compability.
|
||||
|
||||
1. `HOMEBREW_OPTFLAGS="-march=core2" HOMEBREW_OPTIMIZATION_LEVEL="O0" brew install boost zmq libpgm miniupnpc libsodium expat libunwind-headers protobuf libgcrypt`
|
||||
|
||||
2. `HOMEBREW_OPTFLAGS="-march=core2" HOMEBREW_OPTIMIZATION_LEVEL="O0" brew install --HEAD hidapi`
|
||||
|
||||
3. Get the latest LTS from here: https://www.qt.io/offline-installers and install
|
||||
|
||||
4. `git clone --recursive -b v0.X.Y.Z --depth 1 https://github.com/monero-project/monero-gui`
|
||||
|
||||
5. `CMAKE_PREFIX_PATH=~/Qt5.12.8/5.12.8/clang_64 make release`
|
||||
|
||||
6. `cd build/release && make deploy`
|
||||
|
||||
7. Replace the `monerod` binary inside `monero-wallet-gui.app/Contents/MacOS/` with one built using deterministic builds / gitian.
|
||||
|
||||
## Codesigning and notarizing
|
||||
|
||||
1. Save the following text as `entitlements.plist`
|
||||
|
||||
```xml
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.cs.disable-executable-page-protection</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
```
|
||||
|
||||
2. `codesign --deep --force --verify --verbose --options runtime --timestamp --entitlements entitlements.plist --sign 'XXXXXXXXXX' monero-wallet-gui.app`
|
||||
|
||||
You can check if this step worked by using `codesign -dvvv monero-wallet-gui.app`
|
||||
|
||||
3. `hdiutil create -fs HFS+ -srcfolder monero-gui-v0.X.Y.Z -volname monero-wallet-gui monero-gui-mac-x64-v0.X.Y.Z.dmg`
|
||||
|
||||
4. `xcrun altool -t osx --file monero-gui-mac-x64-v0.X.Y.Z.dmg --primary-bundle-id org.monero-project.monero-wallet-gui.dmg --notarize-app --username email@address.org`
|
||||
|
||||
5. `xcrun altool --notarization-info aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee -u email@address.org`
|
||||
|
||||
6. `xcrun stapler staple -v monero-gui-mac-x64-v0.X.Y.Z.dmg`
|
||||
207
Dockerfile.linux
Normal file
@@ -0,0 +1,207 @@
|
||||
FROM ubuntu:16.04
|
||||
|
||||
ARG THREADS=1
|
||||
|
||||
RUN apt update
|
||||
|
||||
RUN apt install -y automake git pkg-config python xutils-dev && \
|
||||
git clone -b xorgproto-2020.1 --depth 1 https://gitlab.freedesktop.org/xorg/proto/xorgproto && \
|
||||
cd xorgproto && \
|
||||
git reset --hard c62e8203402cafafa5ba0357b6d1c019156c9f36 && \
|
||||
CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./autogen.sh --disable-shared --enable-static && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b 1.12 --depth 1 https://gitlab.freedesktop.org/xorg/proto/xcbproto && \
|
||||
cd xcbproto && \
|
||||
git reset --hard 6398e42131eedddde0d98759067dde933191f049 && \
|
||||
CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./autogen.sh --disable-shared --enable-static && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN apt install -y libtool-bin && \
|
||||
git clone -b libXau-1.0.9 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxau && \
|
||||
cd libxau && \
|
||||
git reset --hard d9443b2c57b512cfb250b35707378654d86c7dea && \
|
||||
CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./autogen.sh --disable-shared --enable-static && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN apt install -y libpthread-stubs0-dev && \
|
||||
git clone -b 1.12 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxcb && \
|
||||
cd libxcb && \
|
||||
git reset --hard d34785a34f28fa6a00f8ce00d87e3132ff0f6467 && \
|
||||
CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./autogen.sh --disable-shared --enable-static && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b v1.2.11 --depth 1 https://github.com/madler/zlib && \
|
||||
cd zlib && \
|
||||
git reset --hard cacf7f1d4e3d44d871b605da3b647f07d718623f && \
|
||||
CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./configure --static && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b VER-2-10-2 --depth 1 https://git.savannah.gnu.org/git/freetype/freetype2.git && \
|
||||
cd freetype2 && \
|
||||
git reset --hard 132f19b779828b194b3fede187cee719785db4d8 && \
|
||||
./autogen.sh && \
|
||||
CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./configure --disable-shared --enable-static --with-zlib=no && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b R_2_2_9 --depth 1 https://github.com/libexpat/libexpat && \
|
||||
cd libexpat/expat && \
|
||||
git reset --hard a7bc26b69768f7fb24f0c7976fae24b157b85b13 && \
|
||||
./buildconf.sh && \
|
||||
CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./configure --disable-shared --enable-static && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN apt install -y autopoint gettext gperf libpng12-dev && \
|
||||
git clone -b 2.13.92 --depth 1 https://gitlab.freedesktop.org/fontconfig/fontconfig && \
|
||||
cd fontconfig && \
|
||||
git reset --hard b1df1101a643ae16cdfa1d83b939de2497b1bf27 && \
|
||||
CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./autogen.sh --disable-shared --enable-static --sysconfdir=/etc --localstatedir=/var && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b release-64-2 --depth 1 https://github.com/unicode-org/icu && \
|
||||
cd icu/icu4c/source && \
|
||||
git reset --hard e2d85306162d3a0691b070b4f0a73e4012433444 && \
|
||||
CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./configure --disable-shared --enable-static --disable-tests --disable-samples && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN apt install -y wget && \
|
||||
wget https://dl.bintray.com/boostorg/release/1.73.0/source/boost_1_73_0.tar.gz && \
|
||||
echo "9995e192e68528793755692917f9eb6422f3052a53c5e13ba278a228af6c7acf boost_1_73_0.tar.gz" > hashsum.txt && \
|
||||
sha256sum -c hashsum.txt && \
|
||||
tar -xzf boost_1_73_0.tar.gz && \
|
||||
rm boost_1_73_0.tar.gz && \
|
||||
cd boost_1_73_0 && \
|
||||
./bootstrap.sh && \
|
||||
./b2 --with-atomic --with-system --with-filesystem --with-thread --with-date_time --with-chrono --with-regex --with-serialization --with-program_options --with-locale variant=release link=static runtime-link=static cflags='-fPIC' cxxflags='-fPIC' install -a --prefix=/usr && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN wget https://www.openssl.org/source/openssl-1.1.1g.tar.gz && \
|
||||
echo "ddb04774f1e32f0c49751e21b67216ac87852ceb056b75209af2443400636d46 openssl-1.1.1g.tar.gz" > hashsum.txt && \
|
||||
sha256sum -c hashsum.txt && \
|
||||
tar -xzf openssl-1.1.1g.tar.gz && \
|
||||
rm openssl-1.1.1g.tar.gz && \
|
||||
cd openssl-1.1.1g && \
|
||||
CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./config no-asm no-shared no-zlib-dynamic --openssldir=/usr && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN apt install -y libgl1-mesa-dev libglib2.0-dev libxkbcommon-dev && \
|
||||
wget https://download.qt.io/archive/qt/5.9/5.9.9/single/qt-everywhere-opensource-src-5.9.9.tar.xz && \
|
||||
echo "5ce285209290a157d7f42ec8eb22bf3f1d76f2e03a95fc0b99b553391be01642 qt-everywhere-opensource-src-5.9.9.tar.xz" > hashsum.txt && \
|
||||
sha256sum -c hashsum.txt && \
|
||||
tar -xf qt-everywhere-opensource-src-5.9.9.tar.xz && \
|
||||
rm qt-everywhere-opensource-src-5.9.9.tar.xz && \
|
||||
cd qt-everywhere-opensource-src-5.9.9 && \
|
||||
sed -ri s/\(Libs:.*\)/\\1\ -lexpat/ /usr/local/lib/pkgconfig/fontconfig.pc && \
|
||||
sed -ri s/\(Libs:.*\)/\\1\ -lz/ /usr/local/lib/pkgconfig/freetype2.pc && \
|
||||
sed -ri s/\(Libs:.*\)/\\1\ -lXau/ /usr/local/lib/pkgconfig/xcb.pc && \
|
||||
./configure --prefix=/usr -platform linux-g++-64 -opensource -confirm-license -release -static -no-avx \
|
||||
-opengl desktop -qpa xcb -system-freetype -fontconfig -glib \
|
||||
-no-dbus -no-openssl -no-sql-sqlite -no-use-gold-linker \
|
||||
-qt-harfbuzz -qt-libjpeg -qt-libpng -qt-pcre -qt-zlib \
|
||||
-skip qt3d -skip qtandroidextras -skip qtcanvas3d -skip qtcharts -skip qtconnectivity -skip qtdatavis3d \
|
||||
-skip qtdoc -skip qtgamepad -skip qtlocation -skip qtmacextras -skip qtnetworkauth -skip qtpurchasing \
|
||||
-skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qttools \
|
||||
-skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview \
|
||||
-skip qtwinextras -skip qtx11extras -skip gamepad -skip serialbus -skip location -skip webengine \
|
||||
-nomake examples -nomake tests -nomake tools && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
cd qttools/src/linguist/lrelease && \
|
||||
../../../../qtbase/bin/qmake && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
cd ../../../.. && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN apt install -y libudev-dev && \
|
||||
git clone -b v1.0.23 --depth 1 https://github.com/libusb/libusb && \
|
||||
cd libusb && \
|
||||
git reset --hard e782eeb2514266f6738e242cdcb18e3ae1ed06fa && \
|
||||
CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./autogen.sh --disable-shared --enable-static && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b hidapi-0.9.0 --depth 1 https://github.com/libusb/hidapi && \
|
||||
cd hidapi && \
|
||||
git reset --hard 7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f && \
|
||||
./bootstrap && \
|
||||
CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./configure --disable-shared --enable-static && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b libX11-1.6.9 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libx11 && \
|
||||
cd libx11 && \
|
||||
git reset --hard db7cca17ad7807e92a928da9d4c68a00f4836da2 && \
|
||||
CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./autogen.sh --disable-shared --enable-static && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b libXext-1.3.4 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxext && \
|
||||
cd libxext && \
|
||||
git reset --hard ebb167f34a3514783966775fb12573c4ed209625 && \
|
||||
CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./autogen.sh --disable-shared --enable-static && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN apt install -y libsodium-dev && \
|
||||
git clone -b v4.3.2 --depth 1 https://github.com/zeromq/libzmq && \
|
||||
cd libzmq && \
|
||||
git reset --hard a84ffa12b2eb3569ced199660bac5ad128bff1f0 && \
|
||||
./autogen.sh && \
|
||||
CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./configure --disable-shared --enable-static --disable-libunwind --with-libsodium && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b libgpg-error-1.38 --depth 1 git://git.gnupg.org/libgpg-error.git && \
|
||||
cd libgpg-error && \
|
||||
git reset --hard 71d278824c5fe61865f7927a2ed1aa3115f9e439 && \
|
||||
./autogen.sh && \
|
||||
CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./configure --disable-shared --enable-static --disable-doc --disable-tests && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b libgcrypt-1.8.5 --depth 1 git://git.gnupg.org/libgcrypt.git && \
|
||||
cd libgcrypt && \
|
||||
git reset --hard 56606331bc2a80536db9fc11ad53695126007298 && \
|
||||
./autogen.sh && \
|
||||
CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./configure --disable-shared --enable-static --disable-doc && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b v3.10.0 --depth 1 https://github.com/protocolbuffers/protobuf && \
|
||||
cd protobuf && \
|
||||
git reset --hard 6d4e7fd7966c989e38024a8ea693db83758944f1 && \
|
||||
./autogen.sh && \
|
||||
CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./configure --enable-static --disable-shared && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN apt install -y cmake libusb-1.0-0-dev
|
||||
71
Dockerfile.windows
Normal file
@@ -0,0 +1,71 @@
|
||||
FROM ubuntu:20.04
|
||||
|
||||
ARG THREADS=1
|
||||
|
||||
RUN apt update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt install -y build-essential cmake g++-mingw-w64 gettext git libtool pkg-config \
|
||||
python && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN update-alternatives --set x86_64-w64-mingw32-g++ $(which x86_64-w64-mingw32-g++-posix) && \
|
||||
update-alternatives --set x86_64-w64-mingw32-gcc $(which x86_64-w64-mingw32-gcc-posix)
|
||||
|
||||
RUN git clone -b v0.17.0.0 --depth 1 https://github.com/monero-project/monero && \
|
||||
cd monero && \
|
||||
git reset --hard d27d4526fe89b7cdeb4b296280c4a6cf7efe21f8 && \
|
||||
cp -a contrib/depends / && \
|
||||
cd .. && \
|
||||
rm -rf monero
|
||||
|
||||
RUN make -j$THREADS -C /depends HOST=x86_64-w64-mingw32 NO_QT=1
|
||||
|
||||
RUN curl -LO https://download.qt.io/archive/qt/5.9/5.9.9/single/qt-everywhere-opensource-src-5.9.9.tar.xz && \
|
||||
echo "5ce285209290a157d7f42ec8eb22bf3f1d76f2e03a95fc0b99b553391be01642 qt-everywhere-opensource-src-5.9.9.tar.xz" > hashsum.txt && \
|
||||
sha256sum -c hashsum.txt && \
|
||||
tar -xf qt-everywhere-opensource-src-5.9.9.tar.xz && \
|
||||
rm qt-everywhere-opensource-src-5.9.9.tar.xz && \
|
||||
cd qt-everywhere-opensource-src-5.9.9 && \
|
||||
./configure --prefix=/depends/x86_64-w64-mingw32 -xplatform win32-g++ \
|
||||
-device-option CROSS_COMPILE=/usr/bin/x86_64-w64-mingw32- \
|
||||
-I $(pwd)/qtbase/src/3rdparty/angle/include \
|
||||
-opensource -confirm-license -release -static -static-runtime -opengl dynamic -no-angle \
|
||||
-no-avx -no-openssl -no-sql-sqlite \
|
||||
-qt-freetype -qt-harfbuzz -qt-libjpeg -qt-libpng -qt-pcre -qt-zlib \
|
||||
-skip gamepad -skip location -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcanvas3d -skip qtcharts \
|
||||
-skip qtconnectivity -skip qtdatavis3d -skip qtdoc -skip qtgamepad -skip qtlocation -skip qtmacextras \
|
||||
-skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtscript -skip qtscxml -skip qtsensors \
|
||||
-skip qtserialbus -skip qtserialport -skip qtspeech -skip qttools -skip qtvirtualkeyboard -skip qtwayland \
|
||||
-skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtwinextras -skip qtx11extras \
|
||||
-skip serialbus -skip webengine \
|
||||
-nomake examples -nomake tests -nomake tools && \
|
||||
make QMAKE="$(pwd)/qtbase/bin/qmake CONFIG-='debug debug_and_release'" -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
cd qttools/src/linguist/lrelease && \
|
||||
../../../../qtbase/bin/qmake && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
cd ../../../.. && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b libgpg-error-1.38 --depth 1 git://git.gnupg.org/libgpg-error.git && \
|
||||
cd libgpg-error && \
|
||||
git reset --hard 71d278824c5fe61865f7927a2ed1aa3115f9e439 && \
|
||||
./autogen.sh && \
|
||||
./configure --disable-shared --enable-static --disable-doc --disable-tests \
|
||||
--host=x86_64-w64-mingw32 --prefix=/depends/x86_64-w64-mingw32 && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
cd .. && \
|
||||
rm -rf libgpg-error
|
||||
|
||||
RUN git clone -b libgcrypt-1.8.5 --depth 1 git://git.gnupg.org/libgcrypt.git && \
|
||||
cd libgcrypt && \
|
||||
git reset --hard 56606331bc2a80536db9fc11ad53695126007298 && \
|
||||
./autogen.sh && \
|
||||
./configure --disable-shared --enable-static --disable-doc \
|
||||
--host=x86_64-w64-mingw32 --prefix=/depends/x86_64-w64-mingw32 \
|
||||
--with-gpg-error-prefix=/depends/x86_64-w64-mingw32 && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
cd .. && \
|
||||
rm -rf libgcrypt
|
||||
454
LeftPanel.qml
@@ -40,17 +40,17 @@ import "components/effects/" as MoneroEffects
|
||||
Rectangle {
|
||||
id: panel
|
||||
|
||||
property alias unlockedBalanceText: unlockedBalanceText.text
|
||||
property alias unlockedBalanceVisible: unlockedBalanceText.visible
|
||||
property alias unlockedBalanceLabelVisible: unlockedBalanceLabel.visible
|
||||
property alias balanceLabelText: balanceLabel.text
|
||||
property alias balanceText: balanceText.text
|
||||
property alias balanceTextFiat: balanceTextFiat.text
|
||||
property alias unlockedBalanceTextFiat: unlockedBalanceTextFiat.text
|
||||
property int currentAccountIndex
|
||||
property alias currentAccountLabel: accountLabel.text
|
||||
property string balanceString: "?.??"
|
||||
property string balanceUnlockedString: "?.??"
|
||||
property string balanceFiatString: "?.??"
|
||||
property string minutesToUnlock: ""
|
||||
property bool isSyncing: false
|
||||
property alias networkStatus : networkStatus
|
||||
property alias progressBar : progressBar
|
||||
property alias daemonProgressBar : daemonProgressBar
|
||||
property alias minutesToUnlockTxt: unlockedBalanceLabel.text
|
||||
|
||||
property int titleBarHeight: 50
|
||||
property string copyValue: ""
|
||||
Clipboard { id: clipboard }
|
||||
@@ -64,7 +64,6 @@ Rectangle {
|
||||
signal addressBookClicked()
|
||||
signal miningClicked()
|
||||
signal signClicked()
|
||||
signal merchantClicked()
|
||||
signal accountClicked()
|
||||
|
||||
function selectItem(pos) {
|
||||
@@ -72,7 +71,6 @@ Rectangle {
|
||||
if(pos === "History") menuColumn.previousButton = historyButton
|
||||
else if(pos === "Transfer") menuColumn.previousButton = transferButton
|
||||
else if(pos === "Receive") menuColumn.previousButton = receiveButton
|
||||
else if(pos === "Merchant") menuColumn.previousButton = merchantButton
|
||||
else if(pos === "AddressBook") menuColumn.previousButton = addressBookButton
|
||||
else if(pos === "Mining") menuColumn.previousButton = miningButton
|
||||
else if(pos === "TxKey") menuColumn.previousButton = txkeyButton
|
||||
@@ -84,7 +82,7 @@ Rectangle {
|
||||
menuColumn.previousButton.checked = true
|
||||
}
|
||||
|
||||
width: (isMobile)? appWindow.width : 300
|
||||
width: 300
|
||||
color: "transparent"
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.top: parent.top
|
||||
@@ -108,19 +106,18 @@ Rectangle {
|
||||
visible: true
|
||||
z: 2
|
||||
id: column1
|
||||
height: 210
|
||||
height: 175
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: (persistentSettings.customDecorations)? 50 : 0
|
||||
|
||||
RowLayout {
|
||||
Item {
|
||||
Item {
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 20
|
||||
anchors.leftMargin: 20
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
height: 490
|
||||
width: 260
|
||||
|
||||
@@ -128,9 +125,9 @@ Rectangle {
|
||||
id: card
|
||||
visible: !isOpenGL || MoneroComponents.Style.blackTheme
|
||||
width: 260
|
||||
height: 170
|
||||
height: 135
|
||||
fillMode: Image.PreserveAspectFit
|
||||
source: "qrc:///images/card-background.png"
|
||||
source: MoneroComponents.Style.blackTheme ? "qrc:///images/card-background-black.png" : "qrc:///images/card-background-white.png"
|
||||
}
|
||||
|
||||
DropShadow {
|
||||
@@ -172,57 +169,6 @@ Rectangle {
|
||||
color: "#ff9323"
|
||||
themeTransition: false
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
height: (logoutImage.height + 8)
|
||||
width: (logoutImage.width + 8)
|
||||
color: "transparent"
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 8
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 25
|
||||
|
||||
Image {
|
||||
id: logoutImage
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
height: 16
|
||||
width: 13
|
||||
source: "qrc:///images/logout.png"
|
||||
}
|
||||
|
||||
MouseArea{
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
middlePanel.addressBookView.clearFields();
|
||||
middlePanel.transferView.clearFields();
|
||||
middlePanel.receiveView.clearFields();
|
||||
appWindow.showWizard();
|
||||
}
|
||||
}
|
||||
}
|
||||
MoneroComponents.Label {
|
||||
fontSize: 20
|
||||
text: "¥"
|
||||
color: "white"
|
||||
visible: persistentSettings.fiatPriceEnabled
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 45
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 28
|
||||
themeTransition: false
|
||||
|
||||
MouseArea{
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
persistentSettings.fiatPriceToggle = !persistentSettings.fiatPriceToggle
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
@@ -230,181 +176,149 @@ Rectangle {
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 20
|
||||
anchors.leftMargin: 20
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
height: 490
|
||||
width: 50
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
visible: !(persistentSettings.fiatPriceToggle && persistentSettings.fiatPriceEnabled)
|
||||
id: balanceText
|
||||
themeTransition: false
|
||||
MoneroComponents.Label {
|
||||
fontSize: 12
|
||||
id: accountIndex
|
||||
text: qsTr("Account") + translationManager.emptyString + " #" + currentAccountIndex
|
||||
color: MoneroComponents.Style.blackTheme ? "white" : "black"
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 20
|
||||
anchors.leftMargin: 60
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 76
|
||||
font.family: "Arial"
|
||||
color: "#FFFFFF"
|
||||
text: "N/A"
|
||||
// dynamically adjust text size
|
||||
font.pixelSize: {
|
||||
if (persistentSettings.hideBalance) {
|
||||
return 20;
|
||||
}
|
||||
var digits = text.split('.')[0].length
|
||||
var defaultSize = 22;
|
||||
if(digits > 2) {
|
||||
return defaultSize - 1.1*digits
|
||||
}
|
||||
return defaultSize;
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
hoverEnabled: true
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onEntered: {
|
||||
parent.color = MoneroComponents.Style.orange
|
||||
}
|
||||
onExited: {
|
||||
parent.color = MoneroComponents.Style.white
|
||||
}
|
||||
onClicked: {
|
||||
console.log("Copied to clipboard");
|
||||
clipboard.setText(parent.text);
|
||||
appWindow.showStatusMessage(qsTr("Copied to clipboard"),3)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
visible: !balanceText.visible
|
||||
id: balanceTextFiat
|
||||
anchors.topMargin: 23
|
||||
themeTransition: false
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 20
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 76
|
||||
font.family: "Arial"
|
||||
color: "#FFFFFF"
|
||||
text: "N/A"
|
||||
font.pixelSize: balanceText.font.pixelSize
|
||||
MouseArea {
|
||||
hoverEnabled: true
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onEntered: {
|
||||
parent.color = MoneroComponents.Style.orange
|
||||
}
|
||||
onExited: {
|
||||
parent.color = MoneroComponents.Style.white
|
||||
}
|
||||
onClicked: {
|
||||
console.log("Copied to clipboard");
|
||||
clipboard.setText(parent.text);
|
||||
appWindow.showStatusMessage(qsTr("Copied to clipboard"),3)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
id: unlockedBalanceText
|
||||
visible: !(persistentSettings.fiatPriceToggle && persistentSettings.fiatPriceEnabled)
|
||||
themeTransition: false
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 20
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 126
|
||||
font.family: "Arial"
|
||||
color: "#FFFFFF"
|
||||
text: "N/A"
|
||||
// dynamically adjust text size
|
||||
font.pixelSize: {
|
||||
if (persistentSettings.hideBalance) {
|
||||
return 20;
|
||||
}
|
||||
var digits = text.split('.')[0].length
|
||||
var defaultSize = 20;
|
||||
if(digits > 3) {
|
||||
return defaultSize - 0.6*digits
|
||||
}
|
||||
return defaultSize;
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
hoverEnabled: true
|
||||
MouseArea{
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onEntered: {
|
||||
parent.color = MoneroComponents.Style.orange
|
||||
}
|
||||
onExited: {
|
||||
parent.color = MoneroComponents.Style.white
|
||||
}
|
||||
onClicked: {
|
||||
console.log("Copied to clipboard");
|
||||
clipboard.setText(parent.text);
|
||||
appWindow.showStatusMessage(qsTr("Copied to clipboard"),3)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
id: unlockedBalanceTextFiat
|
||||
themeTransition: false
|
||||
visible: !unlockedBalanceText.visible
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 20
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 126
|
||||
font.family: "Arial"
|
||||
color: "#FFFFFF"
|
||||
text: "N/A"
|
||||
font.pixelSize: unlockedBalanceText.font.pixelSize
|
||||
MouseArea {
|
||||
hoverEnabled: true
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onEntered: {
|
||||
parent.color = MoneroComponents.Style.orange
|
||||
}
|
||||
onExited: {
|
||||
parent.color = MoneroComponents.Style.white
|
||||
}
|
||||
onClicked: {
|
||||
console.log("Copied to clipboard");
|
||||
clipboard.setText(parent.text);
|
||||
appWindow.showStatusMessage(qsTr("Copied to clipboard"),3)
|
||||
}
|
||||
onClicked: appWindow.showPageRequest("Account")
|
||||
}
|
||||
}
|
||||
|
||||
MoneroComponents.Label {
|
||||
id: unlockedBalanceLabel
|
||||
visible: true
|
||||
text: qsTr("Unlocked balance") + translationManager.emptyString
|
||||
color: "white"
|
||||
fontSize: 14
|
||||
fontSize: 16
|
||||
id: accountLabel
|
||||
textWidth: 170
|
||||
color: MoneroComponents.Style.blackTheme ? "white" : "black"
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 20
|
||||
anchors.leftMargin: 60
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 110
|
||||
anchors.topMargin: 36
|
||||
themeTransition: false
|
||||
}
|
||||
|
||||
MoneroComponents.Label {
|
||||
visible: !isMobile
|
||||
id: balanceLabel
|
||||
text: qsTr("Balance") + translationManager.emptyString
|
||||
color: "white"
|
||||
fontSize: 14
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 20
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 60
|
||||
elide: Text.ElideRight
|
||||
textWidth: 238
|
||||
|
||||
MouseArea {
|
||||
hoverEnabled: true
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: appWindow.showPageRequest("Account")
|
||||
}
|
||||
}
|
||||
|
||||
MoneroComponents.Label {
|
||||
fontSize: 16
|
||||
visible: isSyncing
|
||||
text: qsTr("Syncing...") + translationManager.emptyString
|
||||
color: MoneroComponents.Style.blackTheme ? "white" : "black"
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 20
|
||||
anchors.bottom: currencyLabel.top
|
||||
anchors.bottomMargin: 15
|
||||
themeTransition: false
|
||||
}
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
id: currencyLabel
|
||||
font.pixelSize: 16
|
||||
text: {
|
||||
if (persistentSettings.fiatPriceEnabled && persistentSettings.fiatPriceToggle) {
|
||||
return appWindow.fiatApiCurrencySymbol();
|
||||
} else {
|
||||
return "XMR"
|
||||
}
|
||||
}
|
||||
color: MoneroComponents.Style.blackTheme ? "white" : "black"
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 20
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 100
|
||||
themeTransition: false
|
||||
|
||||
MouseArea {
|
||||
hoverEnabled: true
|
||||
anchors.fill: parent
|
||||
visible: persistentSettings.fiatPriceEnabled
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: persistentSettings.fiatPriceToggle = !persistentSettings.fiatPriceToggle
|
||||
}
|
||||
}
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
id: balancePart1
|
||||
themeTransition: false
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 58
|
||||
anchors.baseline: currencyLabel.baseline
|
||||
color: MoneroComponents.Style.blackTheme ? "white" : "black"
|
||||
Binding on color {
|
||||
when: balancePart1MouseArea.containsMouse || balancePart2MouseArea.containsMouse
|
||||
value: MoneroComponents.Style.orange
|
||||
}
|
||||
text: {
|
||||
if (persistentSettings.fiatPriceEnabled && persistentSettings.fiatPriceToggle) {
|
||||
return balanceFiatString.split('.')[0] + "."
|
||||
} else {
|
||||
return balanceString.split('.')[0] + "."
|
||||
}
|
||||
}
|
||||
font.pixelSize: {
|
||||
var defaultSize = 29;
|
||||
var digits = (balancePart1.text.length - 1)
|
||||
if (digits > 2 && !(persistentSettings.fiatPriceEnabled && persistentSettings.fiatPriceToggle)) {
|
||||
return defaultSize - 1.1 * digits
|
||||
} else {
|
||||
return defaultSize
|
||||
}
|
||||
}
|
||||
MouseArea {
|
||||
id: balancePart1MouseArea
|
||||
hoverEnabled: true
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
console.log("Copied to clipboard");
|
||||
clipboard.setText(balancePart1.text + balancePart2.text);
|
||||
appWindow.showStatusMessage(qsTr("Copied to clipboard"),3)
|
||||
}
|
||||
}
|
||||
}
|
||||
MoneroComponents.TextPlain {
|
||||
id: balancePart2
|
||||
themeTransition: false
|
||||
anchors.left: balancePart1.right
|
||||
anchors.leftMargin: 2
|
||||
anchors.baseline: currencyLabel.baseline
|
||||
color: balancePart1.color
|
||||
text: {
|
||||
if (persistentSettings.fiatPriceEnabled && persistentSettings.fiatPriceToggle) {
|
||||
return balanceFiatString.split('.')[1]
|
||||
} else {
|
||||
return balanceString.split('.')[1]
|
||||
}
|
||||
}
|
||||
font.pixelSize: 16
|
||||
MouseArea {
|
||||
id: balancePart2MouseArea
|
||||
hoverEnabled: true
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: balancePart1MouseArea.clicked(mouse)
|
||||
}
|
||||
}
|
||||
|
||||
Item { //separator
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
@@ -420,15 +334,16 @@ Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.top: (isMobile)? parent.top : column1.bottom
|
||||
anchors.top: column1.bottom
|
||||
color: "transparent"
|
||||
|
||||
Flickable {
|
||||
id:flicker
|
||||
contentHeight: menuColumn.height
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: networkStatus.top
|
||||
anchors.bottom: progressBar.visible ? progressBar.top : networkStatus.top
|
||||
width: parent.width
|
||||
boundsBehavior: isMac ? Flickable.DragAndOvershootBounds : Flickable.StopAtBounds
|
||||
clip: true
|
||||
|
||||
Column {
|
||||
@@ -443,7 +358,7 @@ Rectangle {
|
||||
MoneroComponents.MenuButtonDivider {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 16
|
||||
anchors.leftMargin: 20
|
||||
}
|
||||
|
||||
// ------------- Account tab ---------------
|
||||
@@ -453,7 +368,6 @@ Rectangle {
|
||||
anchors.right: parent.right
|
||||
text: qsTr("Account") + translationManager.emptyString
|
||||
symbol: qsTr("T") + translationManager.emptyString
|
||||
dotColor: "#44AAFF"
|
||||
onClicked: {
|
||||
parent.previousButton.checked = false
|
||||
parent.previousButton = accountButton
|
||||
@@ -465,7 +379,7 @@ Rectangle {
|
||||
visible: accountButton.present
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 16
|
||||
anchors.leftMargin: 20
|
||||
}
|
||||
|
||||
// ------------- Transfer tab ---------------
|
||||
@@ -475,7 +389,6 @@ Rectangle {
|
||||
anchors.right: parent.right
|
||||
text: qsTr("Send") + translationManager.emptyString
|
||||
symbol: qsTr("S") + translationManager.emptyString
|
||||
dotColor: "#FF6C3C"
|
||||
onClicked: {
|
||||
parent.previousButton.checked = false
|
||||
parent.previousButton = transferButton
|
||||
@@ -487,7 +400,7 @@ Rectangle {
|
||||
visible: transferButton.present
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 16
|
||||
anchors.leftMargin: 20
|
||||
}
|
||||
|
||||
// ------------- AddressBook tab ---------------
|
||||
@@ -498,7 +411,6 @@ Rectangle {
|
||||
anchors.right: parent.right
|
||||
text: qsTr("Address book") + translationManager.emptyString
|
||||
symbol: qsTr("B") + translationManager.emptyString
|
||||
dotColor: "#FF4F41"
|
||||
under: transferButton
|
||||
onClicked: {
|
||||
parent.previousButton.checked = false
|
||||
@@ -511,7 +423,7 @@ Rectangle {
|
||||
visible: addressBookButton.present
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 16
|
||||
anchors.leftMargin: 20
|
||||
}
|
||||
|
||||
// ------------- Receive tab ---------------
|
||||
@@ -521,7 +433,6 @@ Rectangle {
|
||||
anchors.right: parent.right
|
||||
text: qsTr("Receive") + translationManager.emptyString
|
||||
symbol: qsTr("R") + translationManager.emptyString
|
||||
dotColor: "#AAFFBB"
|
||||
onClicked: {
|
||||
parent.previousButton.checked = false
|
||||
parent.previousButton = receiveButton
|
||||
@@ -533,32 +444,7 @@ Rectangle {
|
||||
visible: receiveButton.present
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 16
|
||||
}
|
||||
|
||||
// ------------- Merchant tab ---------------
|
||||
|
||||
MoneroComponents.MenuButton {
|
||||
id: merchantButton
|
||||
visible: appWindow.walletMode >= 2
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
text: qsTr("Merchant") + translationManager.emptyString
|
||||
symbol: qsTr("U") + translationManager.emptyString
|
||||
dotColor: "#FF4F41"
|
||||
under: receiveButton
|
||||
onClicked: {
|
||||
parent.previousButton.checked = false
|
||||
parent.previousButton = merchantButton
|
||||
panel.merchantClicked()
|
||||
}
|
||||
}
|
||||
|
||||
MoneroComponents.MenuButtonDivider {
|
||||
visible: merchantButton.present && appWindow.walletMode >= 2
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 16
|
||||
anchors.leftMargin: 20
|
||||
}
|
||||
|
||||
// ------------- History tab ---------------
|
||||
@@ -569,7 +455,6 @@ Rectangle {
|
||||
anchors.right: parent.right
|
||||
text: qsTr("Transactions") + translationManager.emptyString
|
||||
symbol: qsTr("H") + translationManager.emptyString
|
||||
dotColor: "#6B0072"
|
||||
onClicked: {
|
||||
parent.previousButton.checked = false
|
||||
parent.previousButton = historyButton
|
||||
@@ -581,7 +466,7 @@ Rectangle {
|
||||
visible: historyButton.present
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 16
|
||||
anchors.leftMargin: 20
|
||||
}
|
||||
|
||||
// ------------- Advanced tab ---------------
|
||||
@@ -592,7 +477,6 @@ Rectangle {
|
||||
anchors.right: parent.right
|
||||
text: qsTr("Advanced") + translationManager.emptyString
|
||||
symbol: qsTr("D") + translationManager.emptyString
|
||||
dotColor: "#FFD781"
|
||||
onClicked: {
|
||||
parent.previousButton.checked = false
|
||||
parent.previousButton = advancedButton
|
||||
@@ -603,7 +487,7 @@ Rectangle {
|
||||
visible: advancedButton.present && appWindow.walletMode >= 2
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 16
|
||||
anchors.leftMargin: 20
|
||||
}
|
||||
|
||||
// ------------- Mining tab ---------------
|
||||
@@ -614,7 +498,6 @@ Rectangle {
|
||||
anchors.right: parent.right
|
||||
text: qsTr("Mining") + translationManager.emptyString
|
||||
symbol: qsTr("M") + translationManager.emptyString
|
||||
dotColor: "#FFD781"
|
||||
under: advancedButton
|
||||
onClicked: {
|
||||
parent.previousButton.checked = false
|
||||
@@ -627,7 +510,7 @@ Rectangle {
|
||||
visible: miningButton.present && appWindow.walletMode >= 2
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 16
|
||||
anchors.leftMargin: 20
|
||||
}
|
||||
|
||||
// ------------- TxKey tab ---------------
|
||||
@@ -638,7 +521,6 @@ Rectangle {
|
||||
anchors.right: parent.right
|
||||
text: qsTr("Prove/check") + translationManager.emptyString
|
||||
symbol: qsTr("K") + translationManager.emptyString
|
||||
dotColor: "#FFD781"
|
||||
under: advancedButton
|
||||
onClicked: {
|
||||
parent.previousButton.checked = false
|
||||
@@ -651,7 +533,7 @@ Rectangle {
|
||||
visible: txkeyButton.present && appWindow.walletMode >= 2
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 16
|
||||
anchors.leftMargin: 20
|
||||
}
|
||||
|
||||
// ------------- Shared RingDB tab ---------------
|
||||
@@ -662,7 +544,6 @@ Rectangle {
|
||||
anchors.right: parent.right
|
||||
text: qsTr("Shared RingDB") + translationManager.emptyString
|
||||
symbol: qsTr("G") + translationManager.emptyString
|
||||
dotColor: "#FFD781"
|
||||
under: advancedButton
|
||||
onClicked: {
|
||||
parent.previousButton.checked = false
|
||||
@@ -675,7 +556,7 @@ Rectangle {
|
||||
visible: sharedringdbButton.present && appWindow.walletMode >= 2
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 16
|
||||
anchors.leftMargin: 20
|
||||
}
|
||||
|
||||
// ------------- Sign/verify tab ---------------
|
||||
@@ -686,7 +567,6 @@ Rectangle {
|
||||
anchors.right: parent.right
|
||||
text: qsTr("Sign/verify") + translationManager.emptyString
|
||||
symbol: qsTr("I") + translationManager.emptyString
|
||||
dotColor: "#FFD781"
|
||||
under: advancedButton
|
||||
onClicked: {
|
||||
parent.previousButton.checked = false
|
||||
@@ -699,7 +579,7 @@ Rectangle {
|
||||
visible: signButton.present && appWindow.walletMode >= 2
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 16
|
||||
anchors.leftMargin: 20
|
||||
}
|
||||
|
||||
// ------------- Settings tab ---------------
|
||||
@@ -709,7 +589,6 @@ Rectangle {
|
||||
anchors.right: parent.right
|
||||
text: qsTr("Settings") + translationManager.emptyString
|
||||
symbol: qsTr("E") + translationManager.emptyString
|
||||
dotColor: "#36B25C"
|
||||
onClicked: {
|
||||
parent.previousButton.checked = false
|
||||
parent.previousButton = settingsButton
|
||||
@@ -721,7 +600,7 @@ Rectangle {
|
||||
visible: settingsButton.present
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 16
|
||||
anchors.leftMargin: 20
|
||||
}
|
||||
|
||||
} // Column
|
||||
@@ -734,22 +613,11 @@ Rectangle {
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 0
|
||||
anchors.rightMargin: 0
|
||||
anchors.bottom: networkStatus.top;
|
||||
anchors.bottom: progressBar.visible ? progressBar.top : networkStatus.top
|
||||
height: 10
|
||||
color: "transparent"
|
||||
}
|
||||
|
||||
MoneroComponents.NetworkStatusItem {
|
||||
id: networkStatus
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 5
|
||||
anchors.rightMargin: 0
|
||||
anchors.bottom: (progressBar.visible)? progressBar.top : parent.bottom;
|
||||
connected: Wallet.ConnectionStatus_Disconnected
|
||||
height: 48
|
||||
}
|
||||
|
||||
MoneroComponents.ProgressBar {
|
||||
id: progressBar
|
||||
anchors.left: parent.left
|
||||
@@ -757,17 +625,29 @@ Rectangle {
|
||||
anchors.bottom: daemonProgressBar.top
|
||||
height: 48
|
||||
syncType: qsTr("Wallet") + translationManager.emptyString
|
||||
visible: networkStatus.connected
|
||||
visible: !appWindow.disconnected
|
||||
}
|
||||
|
||||
MoneroComponents.ProgressBar {
|
||||
id: daemonProgressBar
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottom: networkStatus.top
|
||||
syncType: qsTr("Daemon") + translationManager.emptyString
|
||||
visible: networkStatus.connected
|
||||
visible: !appWindow.disconnected
|
||||
height: 62
|
||||
}
|
||||
|
||||
MoneroComponents.NetworkStatusItem {
|
||||
id: networkStatus
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 5
|
||||
anchors.rightMargin: 0
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: 5
|
||||
connected: Wallet.ConnectionStatus_Disconnected
|
||||
height: 48
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
53
Makefile
Normal file
@@ -0,0 +1,53 @@
|
||||
ANDROID_STANDALONE_TOOLCHAIN_PATH ?= /usr/local/toolchain
|
||||
|
||||
dotgit=$(shell ls -d .git/config)
|
||||
ifneq ($(dotgit), .git/config)
|
||||
USE_SINGLE_BUILDDIR=1
|
||||
endif
|
||||
|
||||
subbuilddir:=$(shell echo `uname | sed -e 's|[:/\\ \(\)]|_|g'`/`git branch | grep '\* ' | cut -f2- -d' '| sed -e 's|[:/\\ \(\)]|_|g'`)
|
||||
ifeq ($(USE_SINGLE_BUILDDIR), OFF)
|
||||
builddir := build/"$(subbuilddir)"
|
||||
topdir := ../../../..
|
||||
deldirs := $(builddir)
|
||||
else
|
||||
builddir := build
|
||||
topdir := ../..
|
||||
deldirs := $(builddir)/debug $(builddir)/release $(builddir)/fuzz
|
||||
endif
|
||||
|
||||
|
||||
default:
|
||||
mkdir -p build && cd build && cmake -D ARCH="x86-64" -D DEV_MODE=$(or ${DEV_MODE},OFF) -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release .. && $(MAKE)
|
||||
debug:
|
||||
mkdir -p build && cd build && cmake -D DEV_MODE=$(or ${DEV_MODE},ON) .. && $(MAKE) VERBOSE=1
|
||||
|
||||
depends:
|
||||
mkdir -p build/$(target)/release
|
||||
cd build/$(target)/release && cmake -D STATIC=ON -D DEV_MODE=$(or ${DEV_MODE},OFF) -D BUILD_TAG=$(tag) -D CMAKE_BUILD_TYPE=Release -D CMAKE_TOOLCHAIN_FILE=$(root)/$(target)/share/toolchain.cmake ../../.. && $(MAKE)
|
||||
|
||||
devmode:
|
||||
mkdir -p build && cd build && cmake -D ARCH="x86-64" -D DEV_MODE=$(or ${DEV_MODE},ON) -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release .. && $(MAKE)
|
||||
clean:
|
||||
mkdir -p build && cd build && rm -rf *
|
||||
scanner:
|
||||
mkdir -p build && cd build && cmake -D ARCH="x86-64" -D DEV_MODE=$(or ${DEV_MODE},ON) -D WITH_SCANNER=ON -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release .. && $(MAKE)
|
||||
|
||||
release:
|
||||
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D DEV_MODE=$(or ${DEV_MODE},OFF) -D ARCH="x86-64" -D CMAKE_BUILD_TYPE=Release $(topdir) && $(MAKE)
|
||||
|
||||
release-static:
|
||||
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D STATIC=ON -D DEV_MODE=$(or ${DEV_MODE},OFF) -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release $(topdir) && $(MAKE)
|
||||
|
||||
debug-static-win64:
|
||||
mkdir -p $(builddir)/debug && cd $(builddir)/debug && cmake -D STATIC=ON -G "MSYS Makefiles" -D DEV_MODE=$(or ${DEV_MODE},ON) -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Debug -D BUILD_TAG="win-x64" -D CMAKE_TOOLCHAIN_FILE=$(topdir)/cmake/64-bit-toolchain.cmake -D MSYS2_FOLDER=$(shell cd ${MINGW_PREFIX}/.. && pwd -W) -D MINGW=ON $(topdir) && $(MAKE)
|
||||
|
||||
debug-static-mac64:
|
||||
mkdir -p $(builddir)/debug
|
||||
cd $(builddir)/debug && cmake -D STATIC=ON -D DEV_MODE=$(or ${DEV_MODE},ON) -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=release -D BUILD_TAG="mac-x64" $(topdir) && $(MAKE)
|
||||
|
||||
release-static-win64:
|
||||
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D STATIC=ON -G "MSYS Makefiles" -D DEV_MODE=$(or ${DEV_MODE},OFF) -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="win-x64" -D CMAKE_TOOLCHAIN_FILE=$(topdir)/cmake/64-bit-toolchain.cmake -D MSYS2_FOLDER=$(shell cd ${MINGW_PREFIX}/.. && pwd -W) -D MINGW=ON $(topdir) && $(MAKE)
|
||||
|
||||
release-win64:
|
||||
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D STATIC=OFF -G "MSYS Makefiles" -D DEV_MODE=$(or ${DEV_MODE},OFF) -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="win-x64" -D CMAKE_TOOLCHAIN_FILE=$(topdir)/cmake/64-bit-toolchain.cmake -D MSYS2_FOLDER=$(shell cd ${MINGW_PREFIX}/.. && pwd -W) -D MINGW=ON $(topdir) && $(MAKE)
|
||||
@@ -46,16 +46,14 @@ Rectangle {
|
||||
|
||||
property Item currentView
|
||||
property Item previousView
|
||||
property bool basicMode : isMobile
|
||||
property string balanceLabelText: qsTr("Balance") + translationManager.emptyString
|
||||
property string balanceText
|
||||
property string unlockedBalanceLabelText: qsTr("Unlocked Balance") + translationManager.emptyString
|
||||
property string unlockedBalanceText
|
||||
property int minHeight: (appWindow.height > 800) ? appWindow.height : 800
|
||||
property alias contentHeight: mainFlickable.contentHeight
|
||||
property alias flickable: mainFlickable
|
||||
|
||||
property Transfer transferView: Transfer { }
|
||||
property Transfer transferView: Transfer {
|
||||
onPaymentClicked: root.paymentClicked(address, paymentId, amount, mixinCount, priority, description)
|
||||
onSweepUnmixableClicked: root.sweepUnmixableClicked()
|
||||
}
|
||||
property Receive receiveView: Receive { }
|
||||
property Merchant merchantView: Merchant { }
|
||||
property TxKey txkeyView: TxKey { }
|
||||
@@ -173,23 +171,6 @@ Rectangle {
|
||||
}
|
||||
]
|
||||
|
||||
// color stripe at the top
|
||||
Row {
|
||||
id: styledRow
|
||||
visible: currentView !== merchantView
|
||||
height: 4
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
z: parent.z + 1
|
||||
|
||||
Rectangle { height: 4; width: parent.width / 5; color: "#FFE00A" }
|
||||
Rectangle { height: 4; width: parent.width / 5; color: "#6B0072" }
|
||||
Rectangle { height: 4; width: parent.width / 5; color: "#FF6C3C" }
|
||||
Rectangle { height: 4; width: parent.width / 5; color: "#FFD781" }
|
||||
Rectangle { height: 4; width: parent.width / 5; color: "#FF4F41" }
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
anchors.margins: {
|
||||
@@ -200,6 +181,7 @@ Rectangle {
|
||||
}
|
||||
|
||||
anchors.topMargin: appWindow.persistentSettings.customDecorations ? 50 : 0
|
||||
anchors.bottomMargin: 0
|
||||
spacing: 0
|
||||
|
||||
Flickable {
|
||||
@@ -207,15 +189,17 @@ Rectangle {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
clip: true
|
||||
boundsBehavior: isMac ? Flickable.DragAndOvershootBounds : Flickable.StopAtBounds
|
||||
|
||||
ScrollBar.vertical: ScrollBar {
|
||||
parent: mainFlickable.parent
|
||||
parent: root
|
||||
anchors.left: parent.right
|
||||
anchors.leftMargin: 3
|
||||
anchors.leftMargin: -14 // 10 margin + 4 scrollbar width
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 4
|
||||
anchors.topMargin: persistentSettings.customDecorations ? 60 : 10
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: persistentSettings.customDecorations ? 4 : 0
|
||||
anchors.bottomMargin: persistentSettings.customDecorations ? 15 : 10
|
||||
onActiveChanged: if (!active && !isMac) active = true
|
||||
}
|
||||
|
||||
onFlickingChanged: {
|
||||
@@ -258,7 +242,7 @@ Rectangle {
|
||||
Rectangle {
|
||||
id: borderLeft
|
||||
visible: middlePanel.state !== "Merchant"
|
||||
anchors.top: styledRow.bottom
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
width: 1
|
||||
@@ -279,18 +263,4 @@ Rectangle {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: borderLeft.right
|
||||
}
|
||||
|
||||
/* connect "payment" click */
|
||||
Connections {
|
||||
ignoreUnknownSignals: false
|
||||
target: transferView
|
||||
onPaymentClicked : {
|
||||
console.log("MiddlePanel: paymentClicked")
|
||||
paymentClicked(address, paymentId, amount, mixinCount, priority, description)
|
||||
}
|
||||
onSweepUnmixableClicked : {
|
||||
console.log("MiddlePanel: sweepUnmixableClicked")
|
||||
sweepUnmixableClicked()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
170
README.md
@@ -5,11 +5,11 @@ Copyright (c) 2014-2019, The Monero Project
|
||||
## Development resources
|
||||
|
||||
- Web: [getmonero.org](https://getmonero.org)
|
||||
- Forum: [forum.getmonero.org](https://forum.getmonero.org)
|
||||
- Mail: [dev@getmonero.org](mailto:dev@getmonero.org)
|
||||
- Github: [https://github.com/monero-project/monero-gui](https://github.com/monero-project/monero-gui)
|
||||
- IRC: [#monero-dev on Freenode](irc://chat.freenode.net/#monero-dev)
|
||||
- Translation platform (Pootle): [translate.getmonero.org](https://translate.getmonero.org)
|
||||
- Translation platform (Weblate): [translate.getmonero.org](https://translate.getmonero.org)
|
||||
- UI Design: [Monero-GUI on Figma](https://www.figma.com/file/DplJ2DDQfIKiuRvolHX2hN/Monero-GUI)
|
||||
|
||||
## Vulnerability response
|
||||
|
||||
@@ -36,19 +36,17 @@ As with many development projects, the repository on Github is considered to be
|
||||
|
||||
Monero is a 100% community-sponsored endeavor. If you want to join our efforts, the easiest thing you can do is support the project financially. Both Monero and Bitcoin donations can be made to **donate.getmonero.org** if using a client that supports the [OpenAlias](https://openalias.org) standard.
|
||||
|
||||
The Monero donation address is: `44AFFq5kSiGBoZ4NMDwYtN18obc8AemS33DBLWs3H7otXft3XjrpDtQGv7SqSsaBYBb98uNbr2VBBEt7f2wfn3RVGQBEP3A` (viewkey: `f359631075708155cc3d92a32b75a7d02a5dcf27756707b47a2b31b21c389501`)
|
||||
The Monero donation address is: `888tNkZrPN6JsEgekjMnABU4TBzc2Dt29EPAvkRxbANsAnjyPbb3iQ1YBRk1UXcdRsiKc9dhwMVgN5S9cQUiyoogDavup3H` (viewkey: `f359631075708155cc3d92a32b75a7d02a5dcf27756707b47a2b31b21c389501`)
|
||||
|
||||
The Bitcoin donation address is: `1KTexdemPdxSBcG55heUuTjDRYqbC5ZL8H`
|
||||
|
||||
GUI development funding and/or some supporting services are also graciously provided by sponsors:
|
||||
GUI development funding and/or some supporting services are also graciously provided by [sponsors](https://www.getmonero.org/community/sponsorships/):
|
||||
|
||||
[<img width="80" src="https://static.getmonero.org/images/sponsors/mymonero.png"/>](https://mymonero.com)
|
||||
[<img width="150" src="https://static.getmonero.org/images/sponsors/kitware.png?1"/>](http://kitware.com)
|
||||
[<img width="100" src="https://static.getmonero.org/images/sponsors/dome9.png"/>](http://dome9.com)
|
||||
[<img width="150" src="https://static.getmonero.org/images/sponsors/araxis.png"/>](http://araxis.com)
|
||||
[<img width="150" src="https://static.getmonero.org/images/sponsors/jetbrains.png"/>](http://www.jetbrains.com/)
|
||||
[<img width="150" src="https://static.getmonero.org/images/sponsors/navicat.png"/>](http://www.navicat.com/)
|
||||
[<img width="150" src="https://static.getmonero.org/images/sponsors/symas.png"/>](http://www.symas.com/)
|
||||
[<img width="150" src="https://www.getmonero.org/img/sponsors/tarilabs.png"/>](https://tarilabs.com/)
|
||||
[<img width="150" src="https://www.getmonero.org/img/sponsors/globee.png"/>](https://globee.com/)
|
||||
[<img width="150" src="https://www.getmonero.org/img/sponsors/symas.png"/>](https://symas.com/)
|
||||
[<img width="150" src="https://www.getmonero.org/img/sponsors/forked_logo.png"/>](http://www.forked.net/)
|
||||
[<img width="150" src="https://www.getmonero.org/img/sponsors/macstadium.png"/>](https://www.macstadium.com/)
|
||||
|
||||
There are also several mining pools that kindly donate a portion of their fees, [a list of them can be found on our Bitcointalk post](https://bitcointalk.org/index.php?topic=583449.0).
|
||||
|
||||
@@ -58,23 +56,74 @@ See [LICENSE](LICENSE).
|
||||
|
||||
## Translations
|
||||
|
||||
Do you speak a second language and would like to help translate the Monero GUI? Check out Pootle, our localization platform, at [translate.getmonero.org](https://translate.getmonero.org/projects/monero-gui/). Choose the language and suggest a translation for a string or review an existing one. The Localization Workgroup made [a guide with step-by-step instructions](https://github.com/monero-ecosystem/monero-translations/blob/master/pootle.md) for Pootle.
|
||||
|
||||
Do you speak a second language and would like to help translate the Monero GUI? Check out Weblate, our localization platform, at [translate.getmonero.org](https://translate.getmonero.org/). Choose the language and suggest a translation for a string or review an existing one. The Localization Workgroup made [a guide with step-by-step instructions](https://github.com/monero-ecosystem/monero-translations/blob/master/weblate.md) for Weblate.
|
||||
|
||||
If you need help/support or any info you can contact the localization workgroup on the IRC channel #monero-translations (relayed on matrix/riot and MatterMost) or by email at translate[at]getmonero[dot]org. For more info about the Localization workgroup: [github.com/monero-ecosystem/monero-translations](https://github.com/monero-ecosystem/monero-translations)
|
||||
|
||||
Status of the translations:
|
||||
<a href="https://translate.getmonero.org/engage/monero/?utm_source=widget">
|
||||
<img src="https://translate.getmonero.org/widgets/monero/-/gui-wallet/horizontal-auto.svg" alt="Translation status" />
|
||||
</a>
|
||||
|
||||
## Installing the Monero GUI from a package
|
||||
|
||||
Packages are available for
|
||||
|
||||
* Arch Linux via AUR: [monero-wallet-qt](https://aur.archlinux.org/packages/monero-wallet-qt/)
|
||||
* Void Linux: xbps-install -S monero-core
|
||||
* GuixSD: guix package -i monero-core
|
||||
* Arch Linux: [monero-gui](https://www.archlinux.org/packages/community/x86_64/monero-gui/)
|
||||
* Debian: See the [whonix/monero-gui repository](https://gitlab.com/whonix/monero-gui#how-to-install-monero-using-apt-get)
|
||||
* Void Linux: `xbps-install -S monero-gui`
|
||||
* GuixSD: `guix package -i monero-gui`
|
||||
* macOS (homebrew): `brew cask install monero-wallet`
|
||||
|
||||
Packaging for your favorite distribution would be a welcome contribution!
|
||||
|
||||
## Compiling the Monero GUI from source
|
||||
|
||||
*Note*: Qt 5.9.7 is the minimum version required to build the GUI.
|
||||
|
||||
### Building Windows static binaries with Docker (any OS)
|
||||
|
||||
1. Install Docker [https://docs.docker.com/engine/install/](https://docs.docker.com/engine/install/)
|
||||
2. Clone the repository
|
||||
```
|
||||
git clone --recursive https://github.com/monero-project/monero-gui.git
|
||||
```
|
||||
3. Prepare build environment
|
||||
```
|
||||
cd monero-gui
|
||||
docker build --tag monero:build-env-windows --build-arg THREADS=4 --file Dockerfile.windows .
|
||||
```
|
||||
\* `4` - number of CPU threads to use
|
||||
|
||||
4. Build
|
||||
```
|
||||
docker run --rm -it -v <MONERO_GUI_DIR_FULL_PATH>:/monero-gui -w /monero-gui monero:build-env-windows sh -c 'make depends root=/depends target=x86_64-w64-mingw32 tag=win-x64 -j4'
|
||||
```
|
||||
\* `<MONERO_GUI_DIR_FULL_PATH>` - absolute path to `monero-gui` directory
|
||||
\* `4` - number of CPU threads to use
|
||||
5. Monero GUI Windows static binaries will be placed in `monero-gui/build/x86_64-w64-mingw32/release/bin` directory
|
||||
|
||||
### Building Linux static binaries with Docker (any OS)
|
||||
|
||||
1. Install Docker [https://docs.docker.com/engine/install/](https://docs.docker.com/engine/install/)
|
||||
2. Clone the repository
|
||||
```
|
||||
git clone --recursive https://github.com/monero-project/monero-gui.git
|
||||
```
|
||||
3. Prepare build environment
|
||||
```
|
||||
cd monero-gui
|
||||
docker build --tag monero:build-env-linux --build-arg THREADS=4 --file Dockerfile.linux .
|
||||
```
|
||||
\* `4` - number of CPU threads to use
|
||||
|
||||
4. Build
|
||||
```
|
||||
docker run --rm -it -v <MONERO_GUI_DIR_FULL_PATH>:/monero-gui -w /monero-gui monero:build-env-linux sh -c 'make release-static -j4'
|
||||
```
|
||||
\* `<MONERO_GUI_DIR_FULL_PATH>` - absolute path to `monero-gui` directory
|
||||
\* `4` - number of CPU threads to use
|
||||
5. Monero GUI Linux static binaries will be placed in `monero-gui/build/release/bin` directory
|
||||
|
||||
### On Linux:
|
||||
|
||||
(Tested on Ubuntu 17.10 x64, Ubuntu 18.04 x64 and Gentoo x64)
|
||||
@@ -83,19 +132,19 @@ Packaging for your favorite distribution would be a welcome contribution!
|
||||
|
||||
- For Debian distributions (Debian, Ubuntu, Mint, Tails...)
|
||||
|
||||
`sudo apt install build-essential cmake libboost-all-dev miniupnpc libunbound-dev graphviz doxygen libunwind8-dev pkg-config libssl-dev libzmq3-dev libsodium-dev libhidapi-dev`
|
||||
`sudo apt install build-essential cmake libboost-all-dev miniupnpc libunbound-dev graphviz doxygen libunwind8-dev pkg-config libssl-dev libzmq3-dev libsodium-dev libhidapi-dev libnorm-dev libusb-1.0-0-dev libpgm-dev libprotobuf-dev protobuf-compiler libgcrypt20-dev`
|
||||
|
||||
- For Gentoo
|
||||
|
||||
`sudo emerge app-arch/xz-utils app-doc/doxygen dev-cpp/gtest dev-libs/boost dev-libs/expat dev-libs/openssl dev-util/cmake media-gfx/graphviz net-dns/unbound net-libs/ldns net-libs/miniupnpc net-libs/zeromq sys-libs/libunwind dev-libs/libsodium dev-libs/hidapi`
|
||||
`sudo emerge app-arch/xz-utils app-doc/doxygen dev-cpp/gtest dev-libs/boost dev-libs/expat dev-libs/openssl dev-util/cmake media-gfx/graphviz net-dns/unbound net-libs/ldns net-libs/miniupnpc net-libs/zeromq sys-libs/libunwind dev-libs/libsodium dev-libs/hidapi dev-libs/libgcrypt`
|
||||
|
||||
- For Fedora
|
||||
|
||||
`sudo dnf install make automake cmake gcc-c++ boost-devel miniupnpc-devel graphviz doxygen unbound-devel libunwind-devel pkgconfig openssl-devel libcurl-devel hidapi-devel libusb-devel`
|
||||
`sudo dnf install make automake cmake gcc-c++ boost-devel miniupnpc-devel graphviz doxygen unbound-devel libunwind-devel pkgconfig openssl-devel libcurl-devel hidapi-devel libusb-devel zeromq-devel libgcrypt-devel`
|
||||
|
||||
2. Install Qt:
|
||||
|
||||
*Note*: Qt 5.9.7 is the minimum version required to build the GUI. This makes **some** distributions (mostly based on debian, like Ubuntu 16.x or Linux Mint 18.x) obsolete due to their repositories containing an older Qt version.
|
||||
*Note*: The Qt 5.9.7 or newer requirement makes **some** distributions (mostly based on debian, like Ubuntu 16.x or Linux Mint 18.x) obsolete due to their repositories containing an older Qt version.
|
||||
|
||||
The recommended way is to install 5.9.7 from the [official Qt installer](https://www.qt.io/download-qt-installer) or [compiling it yourself](https://wiki.qt.io/Install_Qt_5_on_Ubuntu). This ensures you have the correct version. Higher versions *can* work but as it differs from our production build target, slight differences may occur.
|
||||
|
||||
@@ -124,14 +173,18 @@ The following instructions will fetch Qt from your distribution's repositories i
|
||||
|
||||
3. Clone repository
|
||||
|
||||
`git clone https://github.com/monero-project/monero-gui.git`
|
||||
```
|
||||
git clone --recursive https://github.com/monero-project/monero-gui.git
|
||||
cd monero-gui
|
||||
```
|
||||
|
||||
4. Build
|
||||
|
||||
```
|
||||
cd monero-gui
|
||||
QT_SELECT=5 ./build.sh
|
||||
make release -j4
|
||||
```
|
||||
\* `4` - number of CPU threads to use
|
||||
\* Add `CMAKE_PREFIX_PATH` enviroment variable to set a custom Qt install directory, e.g. `CMAKE_PREFIX_PATH=$HOME/Qt/5.9.7/gcc_64 make release -j4`
|
||||
|
||||
The executable can be found in the build/release/bin folder.
|
||||
|
||||
@@ -143,58 +196,30 @@ The executable can be found in the build/release/bin folder.
|
||||
|
||||
3. Install [monero](https://github.com/monero-project/monero) dependencies:
|
||||
|
||||
`brew install boost`
|
||||
|
||||
`brew install openssl` - to install openssl headers
|
||||
|
||||
`brew install pkgconfig`
|
||||
|
||||
`brew install cmake`
|
||||
|
||||
`brew install zeromq`
|
||||
|
||||
*Note*: If cmake can not find zmq.hpp file on OS X, installing `zmq.hpp` from https://github.com/zeromq/cppzmq to `/usr/local/include` should fix that error.
|
||||
`brew install boost hidapi zmq libpgm miniupnpc ldns expat libunwind-headers protobuf libgcrypt`
|
||||
|
||||
4. Install Qt:
|
||||
|
||||
`brew install qt5` (or download QT 5.9.7+ from [qt.io](https://www.qt.io/download-open-source/))
|
||||
|
||||
If you have an older version of Qt installed via homebrew, you can force it to use 5.x like so:
|
||||
|
||||
`brew link --force --overwrite qt5`
|
||||
5. Grab an up-to-date copy of the monero-gui repository
|
||||
|
||||
5. Add the Qt bin directory to your path
|
||||
```
|
||||
git clone --recursive https://github.com/monero-project/monero-gui.git
|
||||
cd monero-gui
|
||||
```
|
||||
|
||||
Example: `export PATH=$PATH:$HOME/Qt/5.9.7/clang_64/bin`
|
||||
6. Start the build
|
||||
|
||||
This is the directory where Qt 5.x is installed on **your** system
|
||||
|
||||
6. Grab an up-to-date copy of the monero-gui repository
|
||||
|
||||
`git clone https://github.com/monero-project/monero-gui.git`
|
||||
|
||||
7. Go into the repository
|
||||
|
||||
`cd monero-gui`
|
||||
|
||||
8. Start the build
|
||||
|
||||
`./build.sh`
|
||||
```
|
||||
make release -j4
|
||||
```
|
||||
\* `4` - number of CPU threads to use
|
||||
\* Add `CMAKE_PREFIX_PATH` enviroment variable to set a custom Qt install directory, e.g. `CMAKE_PREFIX_PATH=$HOME/Qt/5.9.7/clang_64 make release -j4`
|
||||
|
||||
The executable can be found in the `build/release/bin` folder.
|
||||
|
||||
**Note:** Workaround for "ERROR: Xcode not set up properly"
|
||||
|
||||
Edit `$HOME/Qt/5.9.7/clang_64/mkspecs/features/mac/default_pre.prf`
|
||||
|
||||
replace
|
||||
`isEmpty($$list($$system("/usr/bin/xcrun -find xcrun 2>/dev/null")))`
|
||||
|
||||
with
|
||||
`isEmpty($$list($$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null")))`
|
||||
|
||||
More info: http://stackoverflow.com/a/35098040/1683164
|
||||
|
||||
For building an application bundle see `DEPLOY.md`.
|
||||
|
||||
### On Windows:
|
||||
|
||||
@@ -207,7 +232,7 @@ The Monero GUI on Windows is 64 bits only; 32-bit Windows GUI builds are not off
|
||||
3. Install MSYS2 packages for Monero dependencies; the needed 64-bit packages have `x86_64` in their names
|
||||
|
||||
```
|
||||
pacman -S mingw-w64-x86_64-toolchain make mingw-w64-x86_64-cmake mingw-w64-x86_64-boost mingw-w64-x86_64-openssl mingw-w64-x86_64-zeromq mingw-w64-x86_64-libsodium mingw-w64-x86_64-hidapi mingw-w64-x86_64-protobuf-c mingw-w64-x86_64-libusb
|
||||
pacman -S mingw-w64-x86_64-toolchain make mingw-w64-x86_64-cmake mingw-w64-x86_64-boost mingw-w64-x86_64-openssl mingw-w64-x86_64-zeromq mingw-w64-x86_64-libsodium mingw-w64-x86_64-hidapi mingw-w64-x86_64-protobuf-c mingw-w64-x86_64-libusb mingw-w64-x86_64-libgcrypt
|
||||
```
|
||||
|
||||
Optional : To build the flag `WITH_SCANNER`
|
||||
@@ -235,18 +260,17 @@ The Monero GUI on Windows is 64 bits only; 32-bit Windows GUI builds are not off
|
||||
6. Clone repository
|
||||
|
||||
```
|
||||
git clone https://github.com/monero-project/monero-gui.git
|
||||
git clone --recursive https://github.com/monero-project/monero-gui.git
|
||||
cd monero-gui
|
||||
```
|
||||
|
||||
7. Build
|
||||
|
||||
```
|
||||
cd monero-gui
|
||||
source ./build.sh release-static
|
||||
cd build
|
||||
make release-win64 -j4
|
||||
cd build/release
|
||||
make deploy
|
||||
```
|
||||
\* `4` - number of CPU threads to use
|
||||
|
||||
**Note:** The use of `source` above is a dirty workaround for a suspected bug in the current QT version 5.11.2-3 available in the MSYS2 packaging system, see https://github.com/monero-project/monero-gui/issues/1559 for more info.
|
||||
|
||||
The executable can be found in the `.\release\bin` directory.
|
||||
The executable can be found in the `.\bin` directory.
|
||||
|
||||
7
build.sh
@@ -100,11 +100,8 @@ fi
|
||||
|
||||
# force version update
|
||||
get_tag
|
||||
echo "var GUI_VERSION = \"$TAGNAME\"" > version.js
|
||||
pushd "$MONERO_DIR"
|
||||
get_tag
|
||||
popd
|
||||
echo "var GUI_MONERO_VERSION = \"$TAGNAME\"" >> version.js
|
||||
GUI_VERSION=$(echo "$TAGNAME" | sed 's/^v\([[:digit:]]\)/\1/')
|
||||
echo "var GUI_VERSION = \"$GUI_VERSION\"" > version.js
|
||||
|
||||
cd build
|
||||
if ! QMAKE=$(find_command qmake qmake-qt5); then
|
||||
|
||||
50
cmake/32-bit-toolchain.cmake
Normal file
@@ -0,0 +1,50 @@
|
||||
# Copyright (c) 2014-2019, The Monero Project
|
||||
#
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without modification, are
|
||||
# permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
# conditions and the following disclaimer.
|
||||
#
|
||||
# 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
# of conditions and the following disclaimer in the documentation and/or other
|
||||
# materials provided with the distribution.
|
||||
#
|
||||
# 3. Neither the name of the copyright holder nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software without specific
|
||||
# prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
# THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
if (NOT CMAKE_HOST_WIN32)
|
||||
set (CMAKE_SYSTEM_NAME Windows)
|
||||
endif()
|
||||
|
||||
set (GCC_PREFIX i686-w64-mingw32)
|
||||
set (CMAKE_C_COMPILER ${GCC_PREFIX}-gcc)
|
||||
set (CMAKE_CXX_COMPILER ${GCC_PREFIX}-g++)
|
||||
set (CMAKE_AR ar CACHE FILEPATH "" FORCE)
|
||||
set (CMAKE_NM nm CACHE FILEPATH "" FORCE)
|
||||
set (CMAKE_LINKER ld CACHE FILEPATH "" FORCE)
|
||||
#set (CMAKE_RANLIB ${GCC_PREFIX}-gcc-ranlib CACHE FILEPATH "" FORCE)
|
||||
set (CMAKE_RC_COMPILER windres)
|
||||
|
||||
set (CMAKE_FIND_ROOT_PATH "${MSYS2_FOLDER}/mingw32")
|
||||
|
||||
# Ensure cmake doesn't find things in the wrong places
|
||||
set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) # Find programs on host
|
||||
set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) # Find libs in target
|
||||
set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) # Find includes in target
|
||||
|
||||
set (MINGW_FLAG "-m32")
|
||||
set (USE_LTO_DEFAULT false)
|
||||
50
cmake/64-bit-toolchain.cmake
Normal file
@@ -0,0 +1,50 @@
|
||||
# Copyright (c) 2014-2019, The Monero Project
|
||||
#
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without modification, are
|
||||
# permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
# conditions and the following disclaimer.
|
||||
#
|
||||
# 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
# of conditions and the following disclaimer in the documentation and/or other
|
||||
# materials provided with the distribution.
|
||||
#
|
||||
# 3. Neither the name of the copyright holder nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software without specific
|
||||
# prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
# THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
if (NOT CMAKE_HOST_WIN32)
|
||||
set (CMAKE_SYSTEM_NAME Windows)
|
||||
endif()
|
||||
|
||||
set (GCC_PREFIX x86_64-w64-mingw32)
|
||||
set (CMAKE_C_COMPILER ${GCC_PREFIX}-gcc)
|
||||
set (CMAKE_CXX_COMPILER ${GCC_PREFIX}-g++)
|
||||
set (CMAKE_AR ar CACHE FILEPATH "" FORCE)
|
||||
set (CMAKE_NM nm CACHE FILEPATH "" FORCE)
|
||||
set (CMAKE_LINKER ld CACHE FILEPATH "" FORCE)
|
||||
#set (CMAKE_RANLIB ${GCC_PREFIX}-gcc-ranlib CACHE FILEPATH "" FORCE)
|
||||
set (CMAKE_RC_COMPILER windres)
|
||||
|
||||
set (CMAKE_FIND_ROOT_PATH "${MSYS2_FOLDER}/mingw64")
|
||||
|
||||
# Ensure cmake doesn't find things in the wrong places
|
||||
set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) # Find programs on host
|
||||
set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) # Find libs in target
|
||||
set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) # Find includes in target
|
||||
|
||||
set (MINGW_FLAG "-m64")
|
||||
set (USE_LTO_DEFAULT false)
|
||||
14
cmake/CheckLinkerFlag.c
Normal file
@@ -0,0 +1,14 @@
|
||||
#ifdef __CLASSIC_C__
|
||||
int main()
|
||||
{
|
||||
int ac;
|
||||
char* av[];
|
||||
#else
|
||||
int main(int ac, char* av[])
|
||||
{
|
||||
#endif
|
||||
if (ac > 1000) {
|
||||
return *av[0];
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
47
cmake/CheckLinkerFlag.cmake
Normal file
@@ -0,0 +1,47 @@
|
||||
include(CheckCCompilerFlag)
|
||||
|
||||
macro(CHECK_LINKER_FLAG flag VARIABLE)
|
||||
if(NOT DEFINED "${VARIABLE}")
|
||||
if(NOT CMAKE_REQUIRED_QUIET)
|
||||
message(STATUS "Looking for ${flag} linker flag")
|
||||
endif()
|
||||
|
||||
set(_cle_source ${CMAKE_SOURCE_DIR}/cmake/CheckLinkerFlag.c)
|
||||
|
||||
set(saved_CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
|
||||
set(CMAKE_C_FLAGS "${flag}")
|
||||
try_compile(${VARIABLE}
|
||||
${CMAKE_BINARY_DIR}
|
||||
${_cle_source}
|
||||
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} ${flag}
|
||||
CMAKE_FLAGS
|
||||
OUTPUT_VARIABLE OUTPUT)
|
||||
unset(_cle_source)
|
||||
set(CMAKE_C_FLAGS ${saved_CMAKE_C_FLAGS})
|
||||
unset(saved_CMAKE_C_FLAGS)
|
||||
|
||||
if ("${OUTPUT}" MATCHES "warning.*ignored")
|
||||
set(${VARIABLE} 0)
|
||||
endif()
|
||||
|
||||
if(${VARIABLE})
|
||||
if(NOT CMAKE_REQUIRED_QUIET)
|
||||
message(STATUS "Looking for ${flag} linker flag - found")
|
||||
endif()
|
||||
set(${VARIABLE} 1 CACHE INTERNAL "Have linker flag ${flag}")
|
||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||
"Determining if the ${flag} linker flag is supported "
|
||||
"passed with the following output:\n"
|
||||
"${OUTPUT}\n\n")
|
||||
else()
|
||||
if(NOT CMAKE_REQUIRED_QUIET)
|
||||
message(STATUS "Looking for ${flag} linker flag - not found")
|
||||
endif()
|
||||
set(${VARIABLE} "" CACHE INTERNAL "Have linker flag ${flag}")
|
||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||
"Determining if the ${flag} linker flag is supported "
|
||||
"failed with the following output:\n"
|
||||
"${OUTPUT}\n\n")
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
103
cmake/Deploy.cmake
Normal file
@@ -0,0 +1,103 @@
|
||||
if(APPLE OR (WIN32 AND NOT STATIC))
|
||||
add_custom_target(deploy)
|
||||
get_target_property(_qmake_executable Qt5::qmake IMPORTED_LOCATION)
|
||||
get_filename_component(_qt_bin_dir "${_qmake_executable}" DIRECTORY)
|
||||
|
||||
if(APPLE AND NOT IOS)
|
||||
find_program(MACDEPLOYQT_EXECUTABLE macdeployqt HINTS "${_qt_bin_dir}")
|
||||
add_custom_command(TARGET deploy
|
||||
POST_BUILD
|
||||
COMMAND "${MACDEPLOYQT_EXECUTABLE}" "$<TARGET_FILE_DIR:monero-wallet-gui>/../.." -always-overwrite -qmldir="${CMAKE_SOURCE_DIR}"
|
||||
COMMENT "Running macdeployqt..."
|
||||
)
|
||||
|
||||
# workaround for a Qt bug that requires manually adding libqsvg.dylib to bundle
|
||||
find_file(_qt_svg_dylib "libqsvg.dylib" PATHS "${CMAKE_PREFIX_PATH}/plugins/imageformats" NO_DEFAULT_PATH)
|
||||
if(_qt_svg_dylib)
|
||||
add_custom_command(TARGET deploy
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${_qt_svg_dylib} $<TARGET_FILE_DIR:monero-wallet-gui>/../PlugIns/imageformats/
|
||||
COMMAND ${CMAKE_INSTALL_NAME_TOOL} -change "${CMAKE_PREFIX_PATH}/lib/QtGui.framework/Versions/5/QtGui" "@executable_path/../Frameworks/QtGui.fr amework/Versions/5/QtGui" $<TARGET_FILE_DIR:monero-wallet-gui>/../PlugIns/imageformats/libqsvg.dylib
|
||||
COMMAND ${CMAKE_INSTALL_NAME_TOOL} -change "${CMAKE_PREFIX_PATH}/lib/QtWidgets.framework/Versions/5/QtWidgets" "@executable_path/../Frameworks/ QtGui.framework/Versions/5/QtGui" $<TARGET_FILE_DIR:monero-wallet-gui>/../PlugIns/imageformats/libqsvg.dylib
|
||||
COMMAND ${CMAKE_INSTALL_NAME_TOOL} -change "${CMAKE_PREFIX_PATH}/lib/QtSvg.framework/Versions/5/QtSvg" "@executable_path/../Frameworks/QtGui.fr amework/Versions/5/QtGui" $<TARGET_FILE_DIR:monero-wallet-gui>/../PlugIns/imageformats/libqsvg.dylib
|
||||
COMMAND ${CMAKE_INSTALL_NAME_TOOL} -change "${CMAKE_PREFIX_PATH}/lib/QtCore.framework/Versions/5/QtCore" "@executable_path/../Frameworks/QtGui. framework/Versions/5/QtGui" $<TARGET_FILE_DIR:monero-wallet-gui>/../PlugIns/imageformats/libqsvg.dylib
|
||||
COMMENT "Copying libqsvg.dylib, running install_name_tool"
|
||||
)
|
||||
endif()
|
||||
|
||||
elseif(WIN32)
|
||||
find_program(WINDEPLOYQT_EXECUTABLE windeployqt HINTS "${_qt_bin_dir}")
|
||||
add_custom_command(TARGET monero-wallet-gui POST_BUILD
|
||||
COMMAND "${CMAKE_COMMAND}" -E env PATH="${_qt_bin_dir}" "${WINDEPLOYQT_EXECUTABLE}" "$<TARGET_FILE:monero-wallet-gui>" -no-translations -qmldir="${CMAKE_SOURCE_DIR}"
|
||||
COMMENT "Running windeployqt..."
|
||||
)
|
||||
set(WIN_DEPLOY_DLLS
|
||||
libboost_chrono-mt.dll
|
||||
libboost_filesystem-mt.dll
|
||||
libboost_locale-mt.dll
|
||||
libboost_program_options-mt.dll
|
||||
libboost_regex-mt.dll
|
||||
libboost_serialization-mt.dll
|
||||
libboost_thread-mt.dll
|
||||
libprotobuf.dll
|
||||
libbrotlicommon.dll
|
||||
libbrotlidec.dll
|
||||
libusb-1.0.dll
|
||||
zlib1.dll
|
||||
libzstd.dll
|
||||
libwinpthread-1.dll
|
||||
libtiff-5.dll
|
||||
libstdc++-6.dll
|
||||
libpng16-16.dll
|
||||
libpcre16-0.dll
|
||||
libpcre-1.dll
|
||||
libmng-2.dll
|
||||
liblzma-5.dll
|
||||
liblcms2-2.dll
|
||||
libjpeg-8.dll
|
||||
libintl-8.dll
|
||||
libiconv-2.dll
|
||||
libharfbuzz-0.dll
|
||||
libgraphite2.dll
|
||||
libglib-2.0-0.dll
|
||||
libfreetype-6.dll
|
||||
libbz2-1.dll
|
||||
libssp-0.dll
|
||||
libpcre2-16-0.dll
|
||||
libhidapi-0.dll
|
||||
libdouble-conversion.dll
|
||||
libgcrypt-20.dll
|
||||
libgpg-error-0.dll
|
||||
libsodium-23.dll
|
||||
libzmq.dll
|
||||
#platform files
|
||||
libgcc_s_seh-1.dll
|
||||
#openssl files
|
||||
libssl-1_1-x64.dll
|
||||
libcrypto-1_1-x64.dll
|
||||
)
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
list(APPEND WIN_DEPLOY_DLLS
|
||||
libicudtd67.dll
|
||||
libicuind67.dll
|
||||
libicuiod67.dll
|
||||
libicutud67.dll
|
||||
libicuucd67.dll
|
||||
)
|
||||
else() # assume release
|
||||
list(APPEND WIN_DEPLOY_DLLS
|
||||
libicudt67.dll
|
||||
libicuin67.dll
|
||||
libicuio67.dll
|
||||
libicutu67.dll
|
||||
libicuuc67.dll
|
||||
)
|
||||
endif()
|
||||
list(TRANSFORM WIN_DEPLOY_DLLS PREPEND "$ENV{MSYSTEM_PREFIX}/bin/")
|
||||
add_custom_command(TARGET deploy
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${WIN_DEPLOY_DLLS} "$<TARGET_FILE_DIR:monero-wallet-gui>"
|
||||
COMMENT "Copying DLLs to target folder"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
56
cmake/FindCcache.cmake
Normal file
@@ -0,0 +1,56 @@
|
||||
# Copyright (c) 2014-2020, The Monero Project
|
||||
#
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without modification, are
|
||||
# permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
# conditions and the following disclaimer.
|
||||
#
|
||||
# 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
# of conditions and the following disclaimer in the documentation and/or other
|
||||
# materials provided with the distribution.
|
||||
#
|
||||
# 3. Neither the name of the copyright holder nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software without specific
|
||||
# prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
# THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# - Try to find readline include dirs and libraries
|
||||
#
|
||||
# Automatically finds ccache build accelerator, if it's found in PATH.
|
||||
#
|
||||
# Usage of this module as follows:
|
||||
#
|
||||
# project(monero)
|
||||
# include(FindCcache) # Include AFTER the project() macro to be able to reach the CMAKE_CXX_COMPILER variable
|
||||
#
|
||||
# Properties modified by this module:
|
||||
#
|
||||
# GLOBAL PROPERTY RULE_LAUNCH_COMPILE set to ccache, when ccache found
|
||||
# GLOBAL PROPERTY RULE_LAUNCH_LINK set to ccache, when ccache found
|
||||
|
||||
find_program(CCACHE_FOUND ccache)
|
||||
if (CCACHE_FOUND)
|
||||
set(TEMP_CPP_FILE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/test-program.cpp")
|
||||
file(WRITE "${TEMP_CPP_FILE}" "int main() { return 0; }")
|
||||
execute_process(COMMAND "${CCACHE_FOUND}" "${CMAKE_CXX_COMPILER}" "${TEMP_CPP_FILE}" RESULT_VARIABLE RET)
|
||||
if (${RET} EQUAL 0)
|
||||
message("found usable ccache: ${CCACHE_FOUND}")
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_FOUND}")
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK "${CCACHE_FOUND}")
|
||||
else()
|
||||
message("found ccache ${CCACHE_FOUND}, but is UNUSABLE! Return code: ${RET}")
|
||||
endif()
|
||||
else()
|
||||
message("ccache NOT found!")
|
||||
endif()
|
||||
60
cmake/FindHIDAPI.cmake
Normal file
@@ -0,0 +1,60 @@
|
||||
# - try to find HIDAPI library
|
||||
# from http://www.signal11.us/oss/hidapi/
|
||||
#
|
||||
# Cache Variables: (probably not for direct use in your scripts)
|
||||
# HIDAPI_INCLUDE_DIR
|
||||
# HIDAPI_LIBRARY
|
||||
#
|
||||
# Non-cache variables you might use in your CMakeLists.txt:
|
||||
# HIDAPI_FOUND
|
||||
# HIDAPI_INCLUDE_DIRS
|
||||
# HIDAPI_LIBRARIES
|
||||
#
|
||||
# Requires these CMake modules:
|
||||
# FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
|
||||
#
|
||||
# Original Author:
|
||||
# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
|
||||
# http://academic.cleardefinition.com
|
||||
# Iowa State University HCI Graduate Program/VRAC
|
||||
#
|
||||
# Copyright Iowa State University 2009-2010.
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or copy at
|
||||
# http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
find_library(HIDAPI_LIBRARY
|
||||
NAMES hidapi hidapi-libusb)
|
||||
|
||||
find_path(HIDAPI_INCLUDE_DIR
|
||||
NAMES hidapi.h
|
||||
PATH_SUFFIXES
|
||||
hidapi)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(HIDAPI
|
||||
DEFAULT_MSG
|
||||
HIDAPI_LIBRARY
|
||||
HIDAPI_INCLUDE_DIR)
|
||||
|
||||
if(HIDAPI_FOUND)
|
||||
set(HIDAPI_LIBRARIES "${HIDAPI_LIBRARY}")
|
||||
if((STATIC AND UNIX AND NOT APPLE) OR (DEPENDS AND CMAKE_SYSTEM_NAME STREQUAL "Linux"))
|
||||
find_library(LIBUSB-1.0_LIBRARY usb-1.0)
|
||||
find_library(LIBUDEV_LIBRARY udev)
|
||||
if(LIBUSB-1.0_LIBRARY)
|
||||
set(HIDAPI_LIBRARIES "${HIDAPI_LIBRARIES};${LIBUSB-1.0_LIBRARY}")
|
||||
if(LIBUDEV_LIBRARY)
|
||||
set(HIDAPI_LIBRARIES "${HIDAPI_LIBRARIES};${LIBUDEV_LIBRARY}")
|
||||
else()
|
||||
message(WARNING "libudev library not found, binaries may fail to link.")
|
||||
endif()
|
||||
else()
|
||||
message(WARNING "libusb-1.0 library not found, binaries may fail to link.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(HIDAPI_INCLUDE_DIRS "${HIDAPI_INCLUDE_DIR}")
|
||||
endif()
|
||||
|
||||
mark_as_advanced(HIDAPI_INCLUDE_DIR HIDAPI_LIBRARY)
|
||||
149
cmake/FindLibUSB.cmake
Normal file
@@ -0,0 +1,149 @@
|
||||
# - Find libusb for portable USB support
|
||||
# This module will find libusb as published by
|
||||
# http://libusb.sf.net and
|
||||
# http://libusb-win32.sf.net
|
||||
#
|
||||
# It will use PkgConfig if present and supported, else search
|
||||
# it on its own. If the LibUSB_ROOT_DIR environment variable
|
||||
# is defined, it will be used as base path.
|
||||
# The following standard variables get defined:
|
||||
# LibUSB_FOUND: true if LibUSB was found
|
||||
# LibUSB_HEADER_FILE: the location of the C header file
|
||||
# LibUSB_INCLUDE_DIRS: the directory that contains the include file
|
||||
# LibUSB_LIBRARIES: the library
|
||||
# source: https://github.com/IntelRealSense/librealsense
|
||||
|
||||
include ( CheckLibraryExists )
|
||||
include ( CheckIncludeFile )
|
||||
|
||||
find_package ( PkgConfig )
|
||||
if ( PKG_CONFIG_FOUND )
|
||||
pkg_check_modules ( PKGCONFIG_LIBUSB libusb-1.0 )
|
||||
if ( NOT PKGCONFIG_LIBUSB_FOUND )
|
||||
pkg_check_modules ( PKGCONFIG_LIBUSB libusb )
|
||||
endif ( NOT PKGCONFIG_LIBUSB_FOUND )
|
||||
endif ( PKG_CONFIG_FOUND )
|
||||
|
||||
if ( PKGCONFIG_LIBUSB_FOUND )
|
||||
set ( LibUSB_INCLUDE_DIRS ${PKGCONFIG_LIBUSB_INCLUDE_DIRS} )
|
||||
foreach ( i ${PKGCONFIG_LIBUSB_LIBRARIES} )
|
||||
string ( REGEX MATCH "[^-]*" ibase "${i}" )
|
||||
find_library ( ${ibase}_LIBRARY
|
||||
NAMES ${i}
|
||||
PATHS ${PKGCONFIG_LIBUSB_LIBRARY_DIRS}
|
||||
)
|
||||
if ( ${ibase}_LIBRARY )
|
||||
list ( APPEND LibUSB_LIBRARIES ${${ibase}_LIBRARY} )
|
||||
endif ( ${ibase}_LIBRARY )
|
||||
mark_as_advanced ( ${ibase}_LIBRARY )
|
||||
endforeach ( i )
|
||||
|
||||
else ( PKGCONFIG_LIBUSB_FOUND )
|
||||
find_file ( LibUSB_HEADER_FILE
|
||||
NAMES
|
||||
libusb.h usb.h
|
||||
PATHS
|
||||
$ENV{ProgramFiles}/LibUSB-Win32
|
||||
$ENV{LibUSB_ROOT_DIR}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
libusb-1.0
|
||||
include/libusb-1.0
|
||||
)
|
||||
mark_as_advanced ( LibUSB_HEADER_FILE )
|
||||
get_filename_component ( LibUSB_INCLUDE_DIRS "${LibUSB_HEADER_FILE}" PATH )
|
||||
|
||||
if ( ${CMAKE_SYSTEM_NAME} STREQUAL "Windows" )
|
||||
# LibUSB-Win32 binary distribution contains several libs.
|
||||
# Use the lib that got compiled with the same compiler.
|
||||
if ( MSVC )
|
||||
if ( WIN32 )
|
||||
set ( LibUSB_LIBRARY_PATH_SUFFIX lib/msvc )
|
||||
else ( WIN32 )
|
||||
set ( LibUSB_LIBRARY_PATH_SUFFIX lib/msvc_x64 )
|
||||
endif ( WIN32 )
|
||||
elseif ( BORLAND )
|
||||
set ( LibUSB_LIBRARY_PATH_SUFFIX lib/bcc )
|
||||
elseif ( CMAKE_COMPILER_IS_GNUCC )
|
||||
set ( LibUSB_LIBRARY_PATH_SUFFIX lib/gcc )
|
||||
endif ( MSVC )
|
||||
endif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Windows" )
|
||||
|
||||
find_library ( usb_LIBRARY
|
||||
NAMES
|
||||
usb-1.0 libusb usb
|
||||
PATHS
|
||||
$ENV{ProgramFiles}/LibUSB-Win32
|
||||
$ENV{LibUSB_ROOT_DIR}
|
||||
PATH_SUFFIXES
|
||||
${LibUSB_LIBRARY_PATH_SUFFIX}
|
||||
)
|
||||
mark_as_advanced ( usb_LIBRARY )
|
||||
if ( usb_LIBRARY )
|
||||
set ( LibUSB_LIBRARIES ${usb_LIBRARY} )
|
||||
endif ( usb_LIBRARY )
|
||||
|
||||
endif ( PKGCONFIG_LIBUSB_FOUND )
|
||||
|
||||
if ( LibUSB_INCLUDE_DIRS AND LibUSB_LIBRARIES )
|
||||
set ( LibUSB_FOUND true )
|
||||
endif ( LibUSB_INCLUDE_DIRS AND LibUSB_LIBRARIES )
|
||||
|
||||
if ( LibUSB_FOUND )
|
||||
set ( CMAKE_REQUIRED_INCLUDES "${LibUSB_INCLUDE_DIRS}" )
|
||||
check_include_file ( "${LibUSB_HEADER_FILE}" LibUSB_FOUND )
|
||||
endif ( LibUSB_FOUND )
|
||||
|
||||
if ( LibUSB_FOUND )
|
||||
check_library_exists ( "${LibUSB_LIBRARIES}" usb_open "" LibUSB_FOUND )
|
||||
check_library_exists ( "${LibUSB_LIBRARIES}" libusb_get_device_list "" LibUSB_VERSION_1.0 )
|
||||
check_library_exists ( "${LibUSB_LIBRARIES}" libusb_get_port_numbers "" LibUSB_VERSION_1.0.16 )
|
||||
|
||||
if((STATIC AND UNIX AND NOT APPLE) OR (DEPENDS AND CMAKE_SYSTEM_NAME STREQUAL "Linux"))
|
||||
find_library(LIBUDEV_LIBRARY udev)
|
||||
if(LIBUDEV_LIBRARY)
|
||||
set(LibUSB_LIBRARIES "${LibUSB_LIBRARIES};${LIBUDEV_LIBRARY}")
|
||||
else()
|
||||
message(WARNING "libudev library not found, binaries may fail to link.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Library 1.0.16+ compilation test.
|
||||
# The check_library_exists does not work well on Apple with shared libs.
|
||||
if (APPLE OR LibUSB_VERSION_1.0.16 OR STATIC)
|
||||
if (APPLE)
|
||||
if(DEPENDS)
|
||||
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES "-framework Foundation -framework IOKit")
|
||||
else()
|
||||
find_library(COREFOUNDATION CoreFoundation)
|
||||
find_library(IOKIT IOKit)
|
||||
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES ${IOKIT})
|
||||
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES ${COREFOUNDATION})
|
||||
endif()
|
||||
endif()
|
||||
if (WIN32)
|
||||
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES setupapi)
|
||||
endif()
|
||||
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES ${LibUSB_LIBRARIES})
|
||||
|
||||
try_compile(LibUSB_COMPILE_TEST_PASSED
|
||||
${CMAKE_BINARY_DIR}
|
||||
"${CMAKE_SOURCE_DIR}/cmake/test-libusb-version.c"
|
||||
CMAKE_FLAGS
|
||||
"-DINCLUDE_DIRECTORIES=${LibUSB_INCLUDE_DIRS}"
|
||||
"-DLINK_DIRECTORIES=${LibUSB_LIBRARIES}"
|
||||
LINK_LIBRARIES ${TEST_COMPILE_EXTRA_LIBRARIES}
|
||||
OUTPUT_VARIABLE OUTPUT)
|
||||
unset(TEST_COMPILE_EXTRA_LIBRARIES)
|
||||
message(STATUS "LibUSB Compilation test: ${LibUSB_COMPILE_TEST_PASSED}")
|
||||
endif()
|
||||
endif ( LibUSB_FOUND )
|
||||
|
||||
if ( NOT LibUSB_FOUND )
|
||||
if ( NOT LibUSB_FIND_QUIETLY )
|
||||
message ( STATUS "LibUSB not found, try setting LibUSB_ROOT_DIR environment variable." )
|
||||
endif ( NOT LibUSB_FIND_QUIETLY )
|
||||
if ( LibUSB_FIND_REQUIRED )
|
||||
message ( FATAL_ERROR "" )
|
||||
endif ( LibUSB_FIND_REQUIRED )
|
||||
endif ( NOT LibUSB_FOUND )
|
||||
22
cmake/FindZBar0.cmake
Normal file
@@ -0,0 +1,22 @@
|
||||
# from http://code.google.com/p/low-cost-vision-2012/source/browse/CMakeModules/FindZBar0.cmake?name=2-helium-1&r=d61f248bd5565b3c086bf4769a04bfd98f7079df
|
||||
# - Try to find ZBar
|
||||
# This will define
|
||||
#
|
||||
# ZBAR_FOUND -
|
||||
# ZBAR_LIBRARY_DIR -
|
||||
# ZBAR_INCLUDE_DIR -
|
||||
# ZBAR_LIBRARIES -
|
||||
#
|
||||
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(PC_ZBAR QUIET zbar)
|
||||
set(ZBAR_DEFINITIONS ${PC_ZBAR_CFLAGS_OTHER})
|
||||
find_library(ZBAR_LIBRARIES NAMES zbar
|
||||
HINTS ${PC_ZBAR_LIBDIR} ${PC_ZBAR_LIBRARY_DIRS} )
|
||||
find_path(ZBAR_INCLUDE_DIR Decoder.h
|
||||
HINTS ${PC_ZBAR_INCLUDEDIR} ${PC_ZBAR_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES zbar )
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(ZBAR DEFAULT_MSG ZBAR_LIBRARIES ZBAR_INCLUDE_DIR)
|
||||
message(STATUS "Found zbar libraries ${ZBAR_LIBRARIES}")
|
||||
|
||||
67
cmake/GitGetVersionTag.cmake
Normal file
@@ -0,0 +1,67 @@
|
||||
# Copyright (c) 2014-2019, The Monero Project
|
||||
#
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without modification, are
|
||||
# permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
# conditions and the following disclaimer.
|
||||
#
|
||||
# 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
# of conditions and the following disclaimer in the documentation and/or other
|
||||
# materials provided with the distribution.
|
||||
#
|
||||
# 3. Neither the name of the copyright holder nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software without specific
|
||||
# prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
# THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
|
||||
|
||||
function (git_get_version_tag git directory result_var)
|
||||
execute_process(COMMAND "${git}" rev-parse --short HEAD
|
||||
WORKING_DIRECTORY ${directory}
|
||||
OUTPUT_VARIABLE COMMIT
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
if(NOT COMMIT)
|
||||
message(WARNING "${directory}: cannot determine current commit. Make sure that you are building from a Git working tree")
|
||||
set(${result_var} "unknown" PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
|
||||
execute_process(COMMAND "${git}" describe --tags --exact-match
|
||||
WORKING_DIRECTORY ${directory}
|
||||
OUTPUT_VARIABLE TAG
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
if(TAG)
|
||||
message(STATUS "${directory}: building tagged release ${TAG}-${COMMIT}")
|
||||
set(${result_var} "${TAG}-${COMMIT}" PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
|
||||
execute_process(COMMAND "${git}" describe --tags --long
|
||||
WORKING_DIRECTORY ${directory}
|
||||
OUTPUT_VARIABLE MOST_RECENT_TAG
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
if(MOST_RECENT_TAG)
|
||||
message(STATUS "${directory}: ahead of or behind a tagged release, building ${MOST_RECENT_TAG}")
|
||||
set(${result_var} "${MOST_RECENT_TAG}" PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
|
||||
message(STATUS "${directory}: building ${COMMIT} commit")
|
||||
set(${result_var} "${COMMIT}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
49
cmake/VersionGui.cmake
Normal file
@@ -0,0 +1,49 @@
|
||||
# Copyright (c) 2014-2019, The Monero Project
|
||||
#
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without modification, are
|
||||
# permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
# conditions and the following disclaimer.
|
||||
#
|
||||
# 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
# of conditions and the following disclaimer in the documentation and/or other
|
||||
# materials provided with the distribution.
|
||||
#
|
||||
# 3. Neither the name of the copyright holder nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software without specific
|
||||
# prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
# THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
function (write_static_version_header VERSION_TAG_GUI)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/version.js.in" "${CMAKE_CURRENT_SOURCE_DIR}/version.js")
|
||||
endfunction ()
|
||||
|
||||
find_package(Git QUIET)
|
||||
if ("$Format:$" STREQUAL "")
|
||||
# We're in a tarball; use hard-coded variables.
|
||||
write_static_version_header("release")
|
||||
elseif (GIT_FOUND OR Git_FOUND)
|
||||
message(STATUS "Found Git: ${GIT_EXECUTABLE}")
|
||||
|
||||
include(GitGetVersionTag)
|
||||
git_get_version_tag(${GIT_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR} VERSION_TAG_GUI)
|
||||
STRING(REGEX REPLACE "^v([0-9])" "\\1" VERSION_TAG_GUI ${VERSION_TAG_GUI})
|
||||
write_static_version_header(${VERSION_TAG_GUI})
|
||||
else()
|
||||
message(STATUS "WARNING: Git was not found!")
|
||||
write_static_version_header("unknown")
|
||||
endif ()
|
||||
add_custom_target(genversiongui ALL
|
||||
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/version.js")
|
||||
@@ -26,26 +26,27 @@
|
||||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Layouts 1.2
|
||||
import QtQuick.Controls 2.0
|
||||
#include <libusb.h>
|
||||
|
||||
import "../components" as MoneroComponents
|
||||
#define UNUSED(expr) (void)(expr)
|
||||
|
||||
Rectangle {
|
||||
property bool active: false
|
||||
Layout.preferredWidth: 30
|
||||
Layout.fillHeight: true
|
||||
property string activeColor: MoneroComponents.Style.defaultFontColor
|
||||
property string inactiveColor: MoneroComponents.Style.progressBarBackgroundColor
|
||||
color: "transparent"
|
||||
int main(int argc, char *argv[]) {
|
||||
libusb_device **devs;
|
||||
libusb_context *ctx = NULL;
|
||||
|
||||
Rectangle {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
width: 10
|
||||
height: 10
|
||||
radius: 10
|
||||
color: parent.active ? parent.activeColor : parent.inactiveColor
|
||||
}
|
||||
int r = libusb_init(&ctx); UNUSED(r);
|
||||
ssize_t cnt = libusb_get_device_list(ctx, &devs); UNUSED(cnt);
|
||||
|
||||
struct libusb_device_descriptor desc;
|
||||
r = libusb_get_device_descriptor(devs[0], &desc); UNUSED(r);
|
||||
uint8_t bus_id = libusb_get_bus_number(devs[0]); UNUSED(bus_id);
|
||||
uint8_t addr = libusb_get_device_address(devs[0]); UNUSED(addr);
|
||||
|
||||
uint8_t tmp_path[16];
|
||||
r = libusb_get_port_numbers(devs[0], tmp_path, sizeof(tmp_path));
|
||||
UNUSED(r);
|
||||
UNUSED(tmp_path);
|
||||
|
||||
libusb_free_device_list(devs, 1);
|
||||
libusb_exit(ctx);
|
||||
}
|
||||
106
components/AdvancedOptionsItem.qml
Normal file
@@ -0,0 +1,106 @@
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Layouts 1.1
|
||||
import FontAwesome 1.0
|
||||
|
||||
import "../components" as MoneroComponents
|
||||
|
||||
RowLayout {
|
||||
id: advancedOptionsItem
|
||||
|
||||
property alias title: title.text
|
||||
property alias button1: button1
|
||||
property alias button2: button2
|
||||
property alias button3: button3
|
||||
property alias helpTextLarge: helpTextLarge
|
||||
property alias helpTextSmall: helpTextSmall
|
||||
|
||||
RowLayout {
|
||||
id: titlecolumn
|
||||
Layout.alignment: Qt.AlignTop | Qt.AlignLeft
|
||||
Layout.preferredWidth: 195
|
||||
Layout.maximumWidth: 195
|
||||
Layout.leftMargin: 10
|
||||
|
||||
MoneroComponents.Label {
|
||||
id: title
|
||||
fontSize: 14
|
||||
}
|
||||
|
||||
MoneroComponents.Label {
|
||||
id: iconLabel
|
||||
fontSize: 12
|
||||
text: FontAwesome.questionCircle
|
||||
fontFamily: FontAwesome.fontFamily
|
||||
opacity: 0.3
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: helpText.visible = !helpText.visible
|
||||
onEntered: parent.opacity = 0.4
|
||||
onExited: parent.opacity = 0.3
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: separator
|
||||
Layout.fillWidth: true
|
||||
height: 10
|
||||
color: "transparent"
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
Layout.fillWidth: false
|
||||
Layout.alignment: Qt.AlignTop | Qt.AlignLeft
|
||||
spacing: 4
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: false
|
||||
spacing: 12
|
||||
Layout.alignment: Qt.AlignTop | Qt.AlignLeft
|
||||
|
||||
StandardButton {
|
||||
id: button1
|
||||
small: true
|
||||
visible: button1.text
|
||||
}
|
||||
|
||||
StandardButton {
|
||||
id: button2
|
||||
small: true
|
||||
visible: button2.text
|
||||
}
|
||||
|
||||
StandardButton {
|
||||
id: button3
|
||||
small: true
|
||||
visible: button3.text
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
id: helpText
|
||||
visible: false
|
||||
Layout.alignment: Qt.AlignTop | Qt.AlignLeft
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
id: helpTextLarge
|
||||
visible: helpTextLarge.text
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: 13
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
}
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
id: helpTextSmall
|
||||
visible: helpTextSmall.text
|
||||
Layout.leftMargin: 5
|
||||
textFormat: Text.RichText
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: 12
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
47
components/CMakeLists.txt
Normal file
@@ -0,0 +1,47 @@
|
||||
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
###
|
||||
|
||||
#configure_file(${CMAKE_CURRENT_SOURCE_DIR}/defines.h.cmake
|
||||
# ${CMAKE_CURRENT_BINARY_DIR}/defines.h)
|
||||
|
||||
file(GLOB_RECURSE UI_FILES *.ui)
|
||||
file(GLOB_RECURSE CODE_FILES *.cpp)
|
||||
|
||||
qt5_wrap_ui(UI_HEADERS ${UI_FILES})
|
||||
#qt5_add_resources(RESOURCE_FILES ../resources/resources.qrc)
|
||||
|
||||
# Windows application icon
|
||||
if (WIN32)
|
||||
set(WINDOWS_RES_FILE ${CMAKE_CURRENT_BINARY_DIR}/resources.obj)
|
||||
if (MSVC)
|
||||
add_custom_command(OUTPUT ${WINDOWS_RES_FILE}
|
||||
COMMAND rc.exe /fo ${WINDOWS_RES_FILE} resources.rc
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/win
|
||||
)
|
||||
else()
|
||||
add_custom_command(OUTPUT ${WINDOWS_RES_FILE}
|
||||
COMMAND windres.exe resources.rc ${WINDOWS_RES_FILE}
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/win
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_executable(${CMAKE_PROJECT_NAME} WIN32
|
||||
${UI_HEADERS}
|
||||
${CODE_FILES}
|
||||
${RESOURCE_FILES}
|
||||
${WINDOWS_RES_FILE}
|
||||
)
|
||||
target_link_libraries(${CMAKE_PROJECT_NAME}
|
||||
Qt5::Widgets
|
||||
)
|
||||
|
||||
if (UNIX)
|
||||
install(TARGETS ${CMAKE_PROJECT_NAME}
|
||||
RUNTIME DESTINATION bin)
|
||||
elseif (WIN32)
|
||||
install(TARGETS ${CMAKE_PROJECT_NAME}
|
||||
DESTINATION .)
|
||||
endif()
|
||||
@@ -38,8 +38,10 @@ Item {
|
||||
property alias text: label.text
|
||||
property string checkedIcon: "qrc:///images/check-white.svg"
|
||||
property string uncheckedIcon
|
||||
property bool fontAwesomeIcons: false
|
||||
property int imgWidth: 13
|
||||
property int imgHeight: 13
|
||||
property bool toggleOnClick: true
|
||||
property bool checked: false
|
||||
property alias background: backgroundRect.color
|
||||
property bool border: true
|
||||
@@ -51,14 +53,16 @@ Item {
|
||||
width: checkBoxLayout.width
|
||||
|
||||
function toggle(){
|
||||
checkBox.checked = !checkBox.checked
|
||||
if (checkBox.toggleOnClick) {
|
||||
checkBox.checked = !checkBox.checked
|
||||
}
|
||||
checkBox.clicked()
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: checkBoxLayout
|
||||
layoutDirection: iconOnTheLeft ? Qt.LeftToRight : Qt.RightToLeft
|
||||
spacing: (!isMobile ? 10 : 8)
|
||||
spacing: 10
|
||||
|
||||
Item {
|
||||
id: checkMark
|
||||
@@ -70,7 +74,7 @@ Item {
|
||||
visible: checkBox.border
|
||||
anchors.fill: parent
|
||||
radius: 3
|
||||
color: "transparent"
|
||||
color: checkBox.enabled ? "transparent" : MoneroComponents.Style.inputBoxBackgroundDisabled
|
||||
border.color:
|
||||
if(checkBox.checked){
|
||||
return MoneroComponents.Style.inputBorderColorActive;
|
||||
@@ -86,9 +90,11 @@ Item {
|
||||
width: checkBox.imgWidth
|
||||
height: checkBox.imgHeight
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
fontAwesomeFallbackIcon: FontAwesome.plus
|
||||
fontAwesomeFallbackIcon: checkBox.fontAwesomeIcons ? getIcon() : FontAwesome.plus
|
||||
fontAwesomeFallbackSize: 14
|
||||
image: {
|
||||
image: checkBox.fontAwesomeIcons ? "" : getIcon()
|
||||
|
||||
function getIcon() {
|
||||
if (checkBox.checked || checkBox.uncheckedIcon == "")
|
||||
return checkBox.checkedIcon;
|
||||
return checkBox.uncheckedIcon;
|
||||
@@ -102,7 +108,8 @@ Item {
|
||||
font.pixelSize: checkBox.fontSize
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
textFormat: Text.RichText
|
||||
wrapMode: Text.Wrap
|
||||
wrapMode: Text.NoWrap
|
||||
visible: text != ""
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
40
components/ContextMenu.qml
Normal file
@@ -0,0 +1,40 @@
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.2
|
||||
|
||||
import FontAwesome 1.0
|
||||
import "../components" as MoneroComponents
|
||||
|
||||
MouseArea {
|
||||
signal paste()
|
||||
|
||||
id: root
|
||||
acceptedButtons: Qt.RightButton
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
if (mouse.button === Qt.RightButton)
|
||||
contextMenu.open()
|
||||
}
|
||||
|
||||
Menu {
|
||||
id: contextMenu
|
||||
|
||||
background: Rectangle {
|
||||
border.color: MoneroComponents.Style.buttonBackgroundColorDisabledHover
|
||||
border.width: 1
|
||||
radius: 2
|
||||
color: MoneroComponents.Style.buttonBackgroundColorDisabled
|
||||
}
|
||||
|
||||
padding: 1
|
||||
width: 100
|
||||
x: root.mouseX
|
||||
y: root.mouseY
|
||||
|
||||
MoneroComponents.ContextMenuItem {
|
||||
enabled: root.parent.canPaste === true
|
||||
glyphIcon: FontAwesome.paste
|
||||
onTriggered: root.paste()
|
||||
text: qsTr("Paste") + translationManager.emptyString
|
||||
}
|
||||
}
|
||||
}
|
||||
52
components/ContextMenuItem.qml
Normal file
@@ -0,0 +1,52 @@
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.2
|
||||
import QtQuick.Layouts 1.1
|
||||
|
||||
import FontAwesome 1.0
|
||||
import "../components" as MoneroComponents
|
||||
|
||||
MenuItem {
|
||||
id: menuItem
|
||||
|
||||
property bool glyphIconSolid: true
|
||||
property alias glyphIcon: glyphIcon.text
|
||||
|
||||
background: Rectangle {
|
||||
color: MoneroComponents.Style.buttonBackgroundColorDisabledHover
|
||||
opacity: mouse.containsMouse ? 1 : 0
|
||||
|
||||
MouseArea {
|
||||
id: mouse
|
||||
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onClicked: menuItem.triggered()
|
||||
visible: menuItem.enabled
|
||||
}
|
||||
}
|
||||
|
||||
contentItem: RowLayout {
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: 10
|
||||
anchors.rightMargin: 10
|
||||
opacity: menuItem.enabled ? 1 : 0.4
|
||||
spacing: 8
|
||||
|
||||
Text {
|
||||
id: glyphIcon
|
||||
|
||||
color: MoneroComponents.Style.buttonTextColor
|
||||
font.family: glyphIconSolid ? FontAwesome.fontFamilySolid : FontAwesome.fontFamily
|
||||
font.pixelSize: 14
|
||||
font.styleName: glyphIconSolid ? "Solid" : "Regular"
|
||||
}
|
||||
|
||||
Text {
|
||||
color: MoneroComponents.Style.buttonTextColor
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: 14
|
||||
Layout.fillWidth: true
|
||||
text: menuItem.text
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,216 +0,0 @@
|
||||
// Copyright (c) 2014-2018, The Monero Project
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification, are
|
||||
// permitted provided that the following conditions are met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
// conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
// of conditions and the following disclaimer in the documentation and/or other
|
||||
// materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the copyright holder nor the names of its contributors may be
|
||||
// used to endorse or promote products derived from this software without specific
|
||||
// prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Dialogs 1.2
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtQuick.Window 2.2
|
||||
|
||||
import "." as MoneroComponents
|
||||
import "effects/" as MoneroEffects
|
||||
import "../js/Windows.js" as Windows
|
||||
import "../js/Utils.js" as Utils
|
||||
|
||||
Window {
|
||||
id: root
|
||||
modality: Qt.ApplicationModal
|
||||
color: "black"
|
||||
flags: Windows.flags
|
||||
property alias text: dialogContent.text
|
||||
property alias content: root.text
|
||||
property alias textArea: dialogContent
|
||||
property var icon
|
||||
|
||||
// same signals as Dialog has
|
||||
signal accepted()
|
||||
signal rejected()
|
||||
|
||||
onClosing: {
|
||||
inactiveOverlay.visible = false;
|
||||
}
|
||||
|
||||
function open() {
|
||||
inactiveOverlay.visible = true;
|
||||
show();
|
||||
}
|
||||
|
||||
// TODO: implement without hardcoding sizes
|
||||
width: 480
|
||||
height: 280
|
||||
|
||||
// background
|
||||
MoneroEffects.GradientBackground {
|
||||
anchors.fill: parent
|
||||
fallBackColor: MoneroComponents.Style.middlePanelBackgroundColor
|
||||
initialStartColor: MoneroComponents.Style.middlePanelBackgroundGradientStart
|
||||
initialStopColor: MoneroComponents.Style.middlePanelBackgroundGradientStop
|
||||
blackColorStart: MoneroComponents.Style._b_middlePanelBackgroundGradientStart
|
||||
blackColorStop: MoneroComponents.Style._b_middlePanelBackgroundGradientStop
|
||||
whiteColorStart: MoneroComponents.Style._w_middlePanelBackgroundGradientStart
|
||||
whiteColorStop: MoneroComponents.Style._w_middlePanelBackgroundGradientStop
|
||||
start: Qt.point(0, 0)
|
||||
end: Qt.point(height, width)
|
||||
}
|
||||
|
||||
// Make window draggable
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
property point lastMousePos: Qt.point(0, 0)
|
||||
onPressed: { lastMousePos = Qt.point(mouseX, mouseY); }
|
||||
onMouseXChanged: root.x += (mouseX - lastMousePos.x)
|
||||
onMouseYChanged: root.y += (mouseY - lastMousePos.y)
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
id: mainLayout
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: 20
|
||||
anchors.margins: 35
|
||||
spacing: 20
|
||||
|
||||
Item {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: "transparent"
|
||||
border.color: MoneroComponents.Style.inputBorderColorActive
|
||||
border.width: 1
|
||||
radius: 4
|
||||
}
|
||||
|
||||
Flickable {
|
||||
id: flickable
|
||||
anchors.fill: parent
|
||||
|
||||
TextArea.flickable: TextArea {
|
||||
id : dialogContent
|
||||
textFormat: TextEdit.RichText
|
||||
selectByMouse: true
|
||||
selectByKeyboard: true
|
||||
font.family: MoneroComponents.Style.defaultFontColor
|
||||
font.pixelSize: 14
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
selectionColor: MoneroComponents.Style.textSelectionColor
|
||||
wrapMode: TextEdit.Wrap
|
||||
readOnly: true
|
||||
function logCommand(msg){
|
||||
msg = log_color(msg, MoneroComponents.Style.blackTheme ? "lime" : "#009100");
|
||||
textArea.append(msg);
|
||||
}
|
||||
function logMessage(msg){
|
||||
msg = msg.trim();
|
||||
var color = MoneroComponents.Style.defaultFontColor;
|
||||
if(msg.toLowerCase().indexOf('error') >= 0){
|
||||
color = MoneroComponents.Style.errorColor;
|
||||
} else if (msg.toLowerCase().indexOf('warning') >= 0){
|
||||
color = MoneroComponents.Style.warningColor;
|
||||
}
|
||||
|
||||
// format multi-lines
|
||||
if(msg.split("\n").length >= 2){
|
||||
msg = msg.split("\n").join('<br>');
|
||||
}
|
||||
|
||||
log(msg, color);
|
||||
}
|
||||
function log_color(msg, color){
|
||||
return "<span style='color: " + color + ";' >" + msg + "</span>";
|
||||
}
|
||||
function log(msg, color){
|
||||
var timestamp = Utils.formatDate(new Date(), {
|
||||
weekday: undefined,
|
||||
month: "numeric",
|
||||
timeZoneName: undefined
|
||||
});
|
||||
|
||||
var _timestamp = log_color("[" + timestamp + "]", "#FFFFFF");
|
||||
var _msg = log_color(msg, color);
|
||||
textArea.append(_timestamp + " " + _msg);
|
||||
|
||||
// scroll to bottom
|
||||
//if(flickable.contentHeight > content.height){
|
||||
// flickable.contentY = flickable.contentHeight + 20;
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
ScrollBar.vertical: ScrollBar {}
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
|
||||
MoneroComponents.LineEdit {
|
||||
id: sendCommandText
|
||||
Layout.fillWidth: true
|
||||
placeholderText: qsTr("command + enter (e.g help)") + translationManager.emptyString
|
||||
onAccepted: {
|
||||
if(text.length > 0) {
|
||||
textArea.logCommand(">>> " + text)
|
||||
daemonManager.sendCommand(text, currentWallet.nettype);
|
||||
}
|
||||
text = ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// window borders
|
||||
Rectangle {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
width:1
|
||||
color: "#2F2F2F"
|
||||
z: 2
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.top: parent.top
|
||||
anchors.right: parent.right
|
||||
width:1
|
||||
color: "#2F2F2F"
|
||||
z: 2
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.right: parent.right
|
||||
anchors.left: parent.left
|
||||
height:1
|
||||
color: "#2F2F2F"
|
||||
z: 2
|
||||
}
|
||||
}
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 1.2
|
||||
import QtQuick.Controls 2.2 as QtQuickControls2
|
||||
import QtQuick.Layouts 1.2
|
||||
import QtGraphicalEffects 1.0
|
||||
import QtQuick.Controls.Styles 1.2
|
||||
@@ -37,8 +38,7 @@ import "effects/" as MoneroEffects
|
||||
|
||||
Item {
|
||||
id: datePicker
|
||||
z: parent.z + 1
|
||||
property bool expanded: false
|
||||
readonly property alias expanded: popup.visible
|
||||
property date currentDate
|
||||
property bool showCurrentDate: true
|
||||
property color backgroundColor : MoneroComponents.Style.appWindowBorderColor
|
||||
@@ -52,19 +52,6 @@ Item {
|
||||
|
||||
onExpandedChanged: if(expanded) appWindow.currentItem = datePicker
|
||||
|
||||
function hide() { datePicker.expanded = false }
|
||||
function containsPoint(px, py) {
|
||||
if(px < 0)
|
||||
return false
|
||||
if(px > width)
|
||||
return false
|
||||
if(py < 0)
|
||||
return false
|
||||
if(py > height + calendarRect.height)
|
||||
return false
|
||||
return true
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: inputLabelRect
|
||||
color: "transparent"
|
||||
@@ -130,7 +117,7 @@ Item {
|
||||
|
||||
Connections {
|
||||
target: datePicker
|
||||
onCurrentDateChanged: {
|
||||
function onCurrentDateChanged() {
|
||||
dateInput.setDate(datePicker.currentDate)
|
||||
}
|
||||
}
|
||||
@@ -253,7 +240,7 @@ Item {
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: datePicker.expanded = !datePicker.expanded
|
||||
onClicked: datePicker.expanded ? popup.close() : popup.open()
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
}
|
||||
@@ -261,195 +248,205 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: calendarRect
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: head.bottom
|
||||
anchors.topMargin: 10
|
||||
color: MoneroComponents.Style.middlePanelBackgroundColor
|
||||
border.width: 1
|
||||
border.color: MoneroComponents.Style.appWindowBorderColor
|
||||
height: datePicker.expanded ? calendar.height + 2 : 0
|
||||
clip: true
|
||||
|
||||
Behavior on height {
|
||||
NumberAnimation { duration: 100; easing.type: Easing.InQuad }
|
||||
}
|
||||
QtQuickControls2.Popup {
|
||||
id: popup
|
||||
padding: 0
|
||||
closePolicy: QtQuickControls2.Popup.CloseOnEscape | QtQuickControls2.Popup.CloseOnPressOutsideParent
|
||||
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 1
|
||||
anchors.rightMargin: 1
|
||||
anchors.top: parent.top
|
||||
color: MoneroComponents.Style.appWindowBorderColor
|
||||
height: 1
|
||||
}
|
||||
id: calendarRect
|
||||
width: head.width
|
||||
x: head.x
|
||||
y: head.y + head.height + 10
|
||||
|
||||
Calendar {
|
||||
id: calendar
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
anchors.margins: 1
|
||||
anchors.bottomMargin: 10
|
||||
height: 220
|
||||
frameVisible: false
|
||||
color: MoneroComponents.Style.middlePanelBackgroundColor
|
||||
border.width: 1
|
||||
border.color: MoneroComponents.Style.appWindowBorderColor
|
||||
height: datePicker.expanded ? calendar.height + 2 : 0
|
||||
clip: true
|
||||
|
||||
style: CalendarStyle {
|
||||
gridVisible: false
|
||||
background: Rectangle { color: MoneroComponents.Style.middlePanelBackgroundColor }
|
||||
dayDelegate: Item {
|
||||
z: parent.z + 1
|
||||
implicitHeight: implicitWidth
|
||||
implicitWidth: calendar.width / 7
|
||||
Behavior on height {
|
||||
NumberAnimation { duration: 100; easing.type: Easing.InQuad }
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: dayRect
|
||||
anchors.fill: parent
|
||||
radius: parent.implicitHeight / 2
|
||||
color: {
|
||||
if(dayArea.pressed && styleData.visibleMonth)
|
||||
return MoneroComponents.Style.blackTheme ? "#20FFFFFF" : "#10000000"
|
||||
return "transparent";
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 1
|
||||
anchors.rightMargin: 1
|
||||
anchors.top: parent.top
|
||||
color: MoneroComponents.Style.appWindowBorderColor
|
||||
height: 1
|
||||
}
|
||||
|
||||
Calendar {
|
||||
id: calendar
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
anchors.margins: 1
|
||||
anchors.bottomMargin: 10
|
||||
height: 220
|
||||
frameVisible: false
|
||||
|
||||
style: CalendarStyle {
|
||||
gridVisible: false
|
||||
background: Rectangle { color: MoneroComponents.Style.middlePanelBackgroundColor }
|
||||
dayDelegate: Item {
|
||||
z: parent.z + 1
|
||||
implicitHeight: implicitWidth
|
||||
implicitWidth: calendar.width / 7
|
||||
|
||||
Rectangle {
|
||||
id: dayRect
|
||||
anchors.fill: parent
|
||||
radius: parent.implicitHeight / 2
|
||||
color: {
|
||||
if(dayArea.pressed && styleData.visibleMonth)
|
||||
return MoneroComponents.Style.blackTheme ? "#20FFFFFF" : "#10000000"
|
||||
return "transparent";
|
||||
}
|
||||
}
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
id: dayText
|
||||
anchors.centerIn: parent
|
||||
font.family: MoneroComponents.Style.fontMonoRegular.name
|
||||
font.pixelSize: {
|
||||
if(!styleData.visibleMonth) return 12
|
||||
return 14
|
||||
}
|
||||
font.bold: {
|
||||
if(dayArea.pressed || styleData.visibleMonth) return true;
|
||||
return false;
|
||||
}
|
||||
text: styleData.date.getDate()
|
||||
themeTransition: false
|
||||
color: {
|
||||
if(!styleData.visibleMonth) return MoneroComponents.Style.lightGreyFontColor
|
||||
if(dayArea.pressed) return MoneroComponents.Style.defaultFontColor
|
||||
if(styleData.today) return MoneroComponents.Style.orange
|
||||
return MoneroComponents.Style.defaultFontColor
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: dayArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onEntered: dayRect.color = MoneroComponents.Style.blackTheme ? "#20FFFFFF" : "#10000000"
|
||||
onExited: dayRect.color = "transparent"
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
if(styleData.visibleMonth) {
|
||||
currentDate = styleData.date
|
||||
popup.close()
|
||||
} else {
|
||||
var date = styleData.date
|
||||
if(date.getMonth() > calendar.visibleMonth)
|
||||
calendar.showNextMonth()
|
||||
else calendar.showPreviousMonth()
|
||||
}
|
||||
|
||||
datePicker.dateChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
id: dayText
|
||||
anchors.centerIn: parent
|
||||
font.family: MoneroComponents.Style.fontMonoRegular.name
|
||||
font.pixelSize: {
|
||||
if(!styleData.visibleMonth) return 12
|
||||
return 14
|
||||
}
|
||||
font.bold: {
|
||||
if(dayArea.pressed || styleData.visibleMonth) return true;
|
||||
return false;
|
||||
}
|
||||
text: styleData.date.getDate()
|
||||
themeTransition: false
|
||||
color: {
|
||||
if(!styleData.visibleMonth) return MoneroComponents.Style.lightGreyFontColor
|
||||
if(dayArea.pressed) return MoneroComponents.Style.defaultFontColor
|
||||
if(styleData.today) return MoneroComponents.Style.orange
|
||||
return MoneroComponents.Style.defaultFontColor
|
||||
dayOfWeekDelegate: Item {
|
||||
implicitHeight: 20
|
||||
implicitWidth: calendar.width / 7
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
anchors.centerIn: parent
|
||||
elide: Text.ElideRight
|
||||
font.family: MoneroComponents.Style.fontMonoRegular.name
|
||||
font.pixelSize: 12
|
||||
color: MoneroComponents.Style.lightGreyFontColor
|
||||
themeTransition: false
|
||||
text: {
|
||||
var locale = Qt.locale()
|
||||
return locale.dayName(styleData.dayOfWeek, Locale.ShortFormat)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: dayArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onEntered: dayRect.color = MoneroComponents.Style.blackTheme ? "#20FFFFFF" : "#10000000"
|
||||
onExited: dayRect.color = "transparent"
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
if(styleData.visibleMonth) {
|
||||
currentDate = styleData.date
|
||||
datePicker.expanded = false
|
||||
} else {
|
||||
var date = styleData.date
|
||||
if(date.getMonth() > calendar.visibleMonth)
|
||||
calendar.showNextMonth()
|
||||
else calendar.showPreviousMonth()
|
||||
navigationBar: Rectangle {
|
||||
color: MoneroComponents.Style.middlePanelBackgroundColor
|
||||
implicitWidth: calendar.width
|
||||
implicitHeight: 30
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
anchors.centerIn: parent
|
||||
font.family: MoneroComponents.Style.fontMonoRegular.name
|
||||
font.pixelSize: 14
|
||||
color: MoneroComponents.Style.dimmedFontColor
|
||||
themeTransition: false
|
||||
text: styleData.title
|
||||
}
|
||||
|
||||
|
||||
Item {
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 4
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
width: height
|
||||
|
||||
Image {
|
||||
id: prevMonthIcon
|
||||
anchors.centerIn: parent
|
||||
source: "qrc:///images/prevMonth.png"
|
||||
visible: false
|
||||
}
|
||||
|
||||
datePicker.dateChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
ColorOverlay {
|
||||
source: prevMonthIcon
|
||||
anchors.fill: prevMonthIcon
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
opacity: 0.5
|
||||
}
|
||||
|
||||
dayOfWeekDelegate: Item {
|
||||
implicitHeight: 20
|
||||
implicitWidth: calendar.width / 7
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
anchors.centerIn: parent
|
||||
elide: Text.ElideRight
|
||||
font.family: MoneroComponents.Style.fontMonoRegular.name
|
||||
font.pixelSize: 12
|
||||
color: MoneroComponents.Style.lightGreyFontColor
|
||||
themeTransition: false
|
||||
text: {
|
||||
var locale = Qt.locale()
|
||||
return locale.dayName(styleData.dayOfWeek, Locale.ShortFormat)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
navigationBar: Rectangle {
|
||||
color: MoneroComponents.Style.middlePanelBackgroundColor
|
||||
implicitWidth: calendar.width
|
||||
implicitHeight: 30
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
anchors.centerIn: parent
|
||||
font.family: MoneroComponents.Style.fontMonoRegular.name
|
||||
font.pixelSize: 14
|
||||
color: MoneroComponents.Style.dimmedFontColor
|
||||
themeTransition: false
|
||||
text: styleData.title
|
||||
}
|
||||
|
||||
|
||||
Item {
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 4
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
width: height
|
||||
|
||||
Image {
|
||||
id: prevMonthIcon
|
||||
anchors.centerIn: parent
|
||||
source: "qrc:///images/prevMonth.png"
|
||||
visible: false
|
||||
MouseArea {
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
anchors.fill: parent
|
||||
onClicked: calendar.showPreviousMonth()
|
||||
}
|
||||
}
|
||||
|
||||
ColorOverlay {
|
||||
source: prevMonthIcon
|
||||
anchors.fill: prevMonthIcon
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
opacity: 0.5
|
||||
}
|
||||
Item {
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 4
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
width: height
|
||||
|
||||
MouseArea {
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
anchors.fill: parent
|
||||
onClicked: calendar.showPreviousMonth()
|
||||
}
|
||||
}
|
||||
Image {
|
||||
id: nextMonthIcon
|
||||
anchors.centerIn: parent
|
||||
source: "qrc:///images/prevMonth.png"
|
||||
visible: false
|
||||
}
|
||||
|
||||
Item {
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 4
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
width: height
|
||||
ColorOverlay {
|
||||
source: nextMonthIcon
|
||||
anchors.fill: nextMonthIcon
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
opacity: 0.5
|
||||
rotation: 180
|
||||
}
|
||||
|
||||
Image {
|
||||
id: nextMonthIcon
|
||||
anchors.centerIn: parent
|
||||
source: "qrc:///images/prevMonth.png"
|
||||
visible: false
|
||||
}
|
||||
|
||||
ColorOverlay {
|
||||
source: nextMonthIcon
|
||||
anchors.fill: nextMonthIcon
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
opacity: 0.5
|
||||
rotation: 180
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
anchors.fill: parent
|
||||
onClicked: calendar.showNextMonth()
|
||||
MouseArea {
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
anchors.fill: parent
|
||||
onClicked: calendar.showNextMonth()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
104
components/DevicePassphraseDialog.qml
Normal file
@@ -0,0 +1,104 @@
|
||||
// Copyright (c) 2014-2020, The Monero Project
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification, are
|
||||
// permitted provided that the following conditions are met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
// conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
// of conditions and the following disclaimer in the documentation and/or other
|
||||
// materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the copyright holder nor the names of its contributors may be
|
||||
// used to endorse or promote products derived from this software without specific
|
||||
// prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import QtQuick 2.9
|
||||
import "." as MoneroComponents
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property var onAcceptedCallback
|
||||
property var onWalletEntryCallback
|
||||
property var onRejectedCallback
|
||||
|
||||
function open(canEnterOnDevice_) {
|
||||
var canEnterOnDevice = canEnterOnDevice_ !== null ? canEnterOnDevice_ : canEnterOnDevice
|
||||
root.visible = true;
|
||||
|
||||
if (canEnterOnDevice) {
|
||||
entryChooserDialog.okText = qsTr("Hardware wallet")
|
||||
entryChooserDialog.cancelText = qsTr("Computer")
|
||||
entryChooserDialog.open()
|
||||
} else {
|
||||
openPassphraseDialog()
|
||||
}
|
||||
}
|
||||
|
||||
function openPassphraseDialog() {
|
||||
root.visible = true
|
||||
passphraseDialog.openPassphraseDialog()
|
||||
}
|
||||
|
||||
function close() {
|
||||
root.visible = false;
|
||||
if (entryChooserDialog.visible)
|
||||
entryChooserDialog.close()
|
||||
if (passphraseDialog.visible)
|
||||
passphraseDialog.close()
|
||||
}
|
||||
|
||||
StandardDialog {
|
||||
id: entryChooserDialog
|
||||
title: qsTr("Hardware wallet passphrase") + translationManager.emptyString
|
||||
text: qsTr("Please select where you want to enter passphrase.\nIt is recommended to enter passphrase on the hardware wallet for better security.") + translationManager.emptyString
|
||||
|
||||
onAccepted: {
|
||||
if (onWalletEntryCallback){
|
||||
onWalletEntryCallback()
|
||||
}
|
||||
}
|
||||
|
||||
onRejected: {
|
||||
openPassphraseDialog()
|
||||
}
|
||||
|
||||
onCloseCallback: {
|
||||
root.close()
|
||||
}
|
||||
}
|
||||
|
||||
PasswordDialog {
|
||||
id: passphraseDialog
|
||||
anchors.fill: parent
|
||||
passphraseDialogMode: true
|
||||
|
||||
onAcceptedPassphrase: {
|
||||
if (onAcceptedCallback)
|
||||
onAcceptedCallback(passphraseDialog.password);
|
||||
}
|
||||
|
||||
onRejectedPassphrase: {
|
||||
if (onRejectedCallback)
|
||||
onRejectedCallback();
|
||||
}
|
||||
|
||||
onCloseCallback: {
|
||||
root.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -53,6 +53,7 @@ Item {
|
||||
property alias fontPixelSize: inlineText.font.pixelSize
|
||||
property alias fontFamily: inlineText.font.family
|
||||
property alias buttonColor: rect.color
|
||||
property alias buttonHeight: rect.height
|
||||
signal clicked()
|
||||
|
||||
function doClick() {
|
||||
@@ -125,6 +126,8 @@ Item {
|
||||
source: rect
|
||||
}
|
||||
|
||||
Keys.enabled: inlineButton.visible
|
||||
Keys.onSpacePressed: doClick()
|
||||
Keys.onEnterPressed: Keys.onReturnPressed(event)
|
||||
Keys.onReturnPressed: doClick()
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@ import QtQuick 2.9
|
||||
import "../components" as MoneroComponents
|
||||
|
||||
TextField {
|
||||
id: textField
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: 18
|
||||
font.bold: true
|
||||
@@ -44,4 +45,12 @@ TextField {
|
||||
background: Rectangle {
|
||||
color: "transparent"
|
||||
}
|
||||
|
||||
MoneroComponents.ContextMenu {
|
||||
cursorShape: Qt.IBeamCursor
|
||||
onPaste: {
|
||||
textField.clear();
|
||||
textField.paste();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,18 +45,16 @@ Item {
|
||||
signal accepted()
|
||||
signal rejected()
|
||||
|
||||
function open() {
|
||||
inactiveOverlay.visible = true
|
||||
function open(prepopulate) {
|
||||
leftPanel.enabled = false
|
||||
middlePanel.enabled = false
|
||||
titleBar.state = "essentials"
|
||||
root.visible = true;
|
||||
input.focus = true;
|
||||
input.text = "";
|
||||
input.text = prepopulate ? prepopulate : "";
|
||||
}
|
||||
|
||||
function close() {
|
||||
inactiveOverlay.visible = false
|
||||
leftPanel.enabled = true
|
||||
middlePanel.enabled = true
|
||||
titleBar.state = "default"
|
||||
@@ -86,7 +84,7 @@ Item {
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
}
|
||||
|
||||
TextField {
|
||||
MoneroComponents.Input {
|
||||
id : input
|
||||
focus: true
|
||||
Layout.topMargin: 6
|
||||
@@ -110,6 +108,8 @@ Item {
|
||||
color: MoneroComponents.Style.blackTheme ? "black" : "#A9FFFFFF"
|
||||
}
|
||||
|
||||
Keys.enabled: root.visible
|
||||
Keys.onEnterPressed: Keys.onReturnPressed(event)
|
||||
Keys.onReturnPressed: {
|
||||
root.close()
|
||||
root.accepted()
|
||||
|
||||
@@ -57,6 +57,10 @@ TextArea {
|
||||
onTextChanged: {
|
||||
if(addressValidation){
|
||||
// js replacement for `RegExpValidator { regExp: /[0-9A-Fa-f]{95}/g }`
|
||||
if (textArea.text.startsWith("monero:")) {
|
||||
error = false;
|
||||
return;
|
||||
}
|
||||
textArea.text = textArea.text.replace(/[^a-z0-9.@\-]/gi,'');
|
||||
var address_ok = TxUtils.checkAddress(textArea.text, appWindow.persistentSettings.nettype) || TxUtils.isValidOpenAliasAddress(textArea.text);
|
||||
if(!address_ok) error = true;
|
||||
@@ -64,4 +68,12 @@ TextArea {
|
||||
TextArea.cursorPosition = textArea.text.length;
|
||||
}
|
||||
}
|
||||
|
||||
MoneroComponents.ContextMenu {
|
||||
cursorShape: Qt.IBeamCursor
|
||||
onPaste: {
|
||||
textArea.clear();
|
||||
textArea.paste();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,6 +45,7 @@ Item {
|
||||
property alias horizontalAlignment: label.horizontalAlignment
|
||||
property alias elide: label.elide
|
||||
property alias textWidth: label.width
|
||||
property alias styleName: label.font.styleName
|
||||
property alias themeTransition: label.themeTransition
|
||||
signal linkActivated()
|
||||
height: label.height
|
||||
@@ -68,5 +69,10 @@ Item {
|
||||
color: fontColor
|
||||
onLinkActivated: item.linkActivated()
|
||||
textFormat: parent.textFormat
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.NoButton
|
||||
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,8 +34,6 @@ import "../components/effects/" as MoneroEffects
|
||||
Label {
|
||||
id: item
|
||||
fontSize: 18
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
Rectangle {
|
||||
anchors.top: item.bottom
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2014-2019, The Monero Project
|
||||
// Copyright (c) 2014-2020, The Monero Project
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
@@ -53,7 +53,7 @@ Drawer {
|
||||
y: titleBar.height
|
||||
|
||||
background: Rectangle {
|
||||
color: "#0d0d0d"
|
||||
color: MoneroComponents.Style.blackTheme ? "#0d0d0d" : "white"
|
||||
width: parent.width
|
||||
}
|
||||
|
||||
@@ -79,9 +79,24 @@ Drawer {
|
||||
width: sideBar.width
|
||||
height: 32
|
||||
|
||||
Rectangle {
|
||||
id: flagRect
|
||||
height: 24
|
||||
width: 24
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 4
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
color: "transparent"
|
||||
|
||||
Image {
|
||||
anchors.fill: parent
|
||||
source: flag
|
||||
}
|
||||
}
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 16
|
||||
anchors.leftMargin: 30
|
||||
font.bold: true
|
||||
font.pixelSize: 14
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
@@ -118,8 +133,10 @@ Drawer {
|
||||
// set wizard language settings
|
||||
wizard.language_locale = locale;
|
||||
wizard.language_wallet = wallet_language;
|
||||
wizard.language_language = display_name + " (" + locale_spl[1] + ") ";
|
||||
sideBar.close()
|
||||
wizard.language_language = display_name;
|
||||
|
||||
appWindow.showStatusMessage(qsTr("Language changed."), 3);
|
||||
appWindow.toggleLanguageView();
|
||||
}
|
||||
hoverEnabled: true
|
||||
onEntered: {
|
||||
@@ -134,15 +151,8 @@ Drawer {
|
||||
}
|
||||
}
|
||||
|
||||
ScrollIndicator.vertical: ScrollIndicator {
|
||||
// @TODO: QT 5.9 introduces `policy: ScrollBar.AlwaysOn`
|
||||
active: true
|
||||
contentItem.opacity: 0.7
|
||||
onActiveChanged: {
|
||||
if (!active) {
|
||||
active = true;
|
||||
}
|
||||
}
|
||||
ScrollBar.vertical: ScrollBar {
|
||||
onActiveChanged: if (!active && !isMac) active = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import FontAwesome 1.0
|
||||
import QtQuick 2.9
|
||||
import QtGraphicalEffects 1.0
|
||||
|
||||
@@ -36,6 +37,10 @@ Item {
|
||||
property alias input: input
|
||||
property alias text: input.text
|
||||
|
||||
property bool password: false
|
||||
property bool passwordHidden: true
|
||||
property var passwordLinked: null
|
||||
|
||||
property alias placeholderText: placeholderLabel.text
|
||||
property bool placeholderCenter: false
|
||||
property string placeholderFontFamily: MoneroComponents.Style.fontRegular.name
|
||||
@@ -48,11 +53,12 @@ Item {
|
||||
property alias validator: input.validator
|
||||
property alias readOnly : input.readOnly
|
||||
property alias cursorPosition: input.cursorPosition
|
||||
property alias echoMode: input.echoMode
|
||||
property alias inlineButton: inlineButtonId
|
||||
property alias inlineButtonText: inlineButtonId.text
|
||||
property alias inlineIcon: inlineIcon.visible
|
||||
property bool copyButton: false
|
||||
property alias copyButtonText: copyButtonId.text
|
||||
property alias copyButtonEnabled: copyButtonId.enabled
|
||||
|
||||
property bool borderDisabled: false
|
||||
property string borderColor: {
|
||||
@@ -107,6 +113,31 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
function isPasswordHidden() {
|
||||
if (password) {
|
||||
return passwordHidden;
|
||||
}
|
||||
if (passwordLinked) {
|
||||
return passwordLinked.passwordHidden;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function reset() {
|
||||
text = "";
|
||||
if (!passwordLinked) {
|
||||
passwordHidden = true;
|
||||
}
|
||||
}
|
||||
|
||||
function passwordToggle() {
|
||||
if (passwordLinked) {
|
||||
passwordLinked.passwordHidden = !passwordLinked.passwordHidden;
|
||||
} else {
|
||||
passwordHidden = !passwordHidden;
|
||||
}
|
||||
}
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
id: inputLabel
|
||||
anchors.top: parent.top
|
||||
@@ -173,7 +204,7 @@ Item {
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: 1
|
||||
color: "transparent"
|
||||
color: item.enabled ? "transparent" : MoneroComponents.Style.inputBoxBackgroundDisabled
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
@@ -208,6 +239,27 @@ Item {
|
||||
onTextChanged: item.textUpdated()
|
||||
topPadding: 10
|
||||
bottomPadding: 10
|
||||
echoMode: isPasswordHidden() ? TextInput.Password : TextInput.Normal
|
||||
|
||||
MoneroComponents.Label {
|
||||
visible: password || passwordLinked
|
||||
fontSize: 20
|
||||
text: isPasswordHidden() ? FontAwesome.eye : FontAwesome.eyeSlash
|
||||
opacity: eyeMouseArea.containsMouse ? 0.9 : 0.7
|
||||
fontFamily: FontAwesome.fontFamily
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 15
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.verticalCenterOffset: 1
|
||||
|
||||
MouseArea {
|
||||
id: eyeMouseArea
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
hoverEnabled: true
|
||||
onClicked: passwordToggle()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MoneroComponents.InlineButton {
|
||||
|
||||
@@ -80,9 +80,6 @@ ColumnLayout {
|
||||
property alias readOnly: input.readOnly
|
||||
property bool copyButton: false
|
||||
property bool pasteButton: false
|
||||
property var onPaste: function(clipboardText) {
|
||||
item.text = clipboardText;
|
||||
}
|
||||
property bool showingHeader: labelText != "" || copyButton || pasteButton
|
||||
property var wrapMode: Text.NoWrap
|
||||
property alias addressValidation: input.addressValidation
|
||||
@@ -90,6 +87,8 @@ ColumnLayout {
|
||||
|
||||
property alias inlineButton: inlineButtonId
|
||||
property bool inlineButtonVisible: false
|
||||
property alias inlineButton2: inlineButton2Id
|
||||
property bool inlineButton2Visible: false
|
||||
|
||||
signal labelButtonClicked();
|
||||
signal inputLabelLinkActivated();
|
||||
@@ -146,7 +145,10 @@ ColumnLayout {
|
||||
|
||||
MoneroComponents.LabelButton {
|
||||
id: pasteButtonId
|
||||
onClicked: item.onPaste(clipboard.text())
|
||||
onClicked: {
|
||||
input.clear();
|
||||
input.paste();
|
||||
}
|
||||
text: qsTr("Paste") + translationManager.emptyString
|
||||
visible: pasteButton
|
||||
}
|
||||
@@ -202,5 +204,12 @@ ColumnLayout {
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 8
|
||||
}
|
||||
|
||||
MoneroComponents.InlineButton {
|
||||
id: inlineButton2Id
|
||||
visible: (inlineButton2Id.text || inlineButton2Id.icon) && inlineButton2Visible ? true : false
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: inlineButtonVisible ? 48 : 8
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,6 @@ Rectangle {
|
||||
id: button
|
||||
property alias text: label.text
|
||||
property bool checked: false
|
||||
property alias dotColor: dot.color
|
||||
property alias symbol: symbolText.text
|
||||
property int numSelectedChildren: 0
|
||||
property var under: null
|
||||
@@ -63,7 +62,7 @@ Rectangle {
|
||||
height: present ? ((appWindow.height >= 800) ? 44 : 38 ) : 0
|
||||
|
||||
LinearGradient {
|
||||
visible: isOpenGL && button.checked
|
||||
visible: isOpenGL && (button.checked || buttonArea.containsMouse)
|
||||
height: parent.height
|
||||
width: 260
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
@@ -76,39 +75,24 @@ Rectangle {
|
||||
GradientStop { position: 0.0; color: MoneroComponents.Style.menuButtonGradientStart }
|
||||
GradientStop { position: 1.0; color: MoneroComponents.Style.menuButtonGradientStop }
|
||||
}
|
||||
opacity: button.checked ? 1 : 0.3
|
||||
}
|
||||
|
||||
// fallback hover effect when opengl is not available
|
||||
Rectangle {
|
||||
visible: !isOpenGL && button.checked
|
||||
visible: !isOpenGL && (button.checked || buttonArea.containsMouse)
|
||||
anchors.fill: parent
|
||||
color: MoneroComponents.Style.menuButtonFallbackBackgroundColor
|
||||
opacity: button.checked ? 1 : 0.3
|
||||
}
|
||||
|
||||
// button decorations that are subject to leftMargin offsets
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: parent.getOffset() + 20
|
||||
anchors.leftMargin: 20
|
||||
height: parent.height
|
||||
width: button.checked ? 20: 10
|
||||
color: "transparent"
|
||||
|
||||
// dot if unchecked
|
||||
Rectangle {
|
||||
id: dot
|
||||
anchors.centerIn: parent
|
||||
width: button.checked ? 20 : 8
|
||||
height: button.checked ? 20 : 8
|
||||
radius: button.checked ? 20 : 4
|
||||
color: button.dotColor
|
||||
// arrow if checked
|
||||
Image {
|
||||
anchors.centerIn: parent
|
||||
anchors.left: parent.left
|
||||
source: MoneroComponents.Style.menuButtonImageDotArrowSource
|
||||
visible: button.checked
|
||||
}
|
||||
}
|
||||
width: 2
|
||||
color: button.checked ? MoneroComponents.Style.buttonBackgroundColor : "transparent"
|
||||
|
||||
// button text
|
||||
MoneroComponents.TextPlain {
|
||||
@@ -118,7 +102,7 @@ Rectangle {
|
||||
themeTransitionWhiteColor: MoneroComponents.Style._w_menuButtonTextColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.right
|
||||
anchors.leftMargin: 8
|
||||
anchors.leftMargin: button.getOffset() + 8
|
||||
font.bold: true
|
||||
font.pixelSize: 14
|
||||
}
|
||||
@@ -144,7 +128,7 @@ Rectangle {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
font.pixelSize: 12
|
||||
font.bold: true
|
||||
color: button.checked || buttonArea.containsMouse ? MoneroComponents.Style.menuButtonTextColor : dot.color
|
||||
color: MoneroComponents.Style.menuButtonTextColor
|
||||
visible: appWindow.ctrlPressed
|
||||
themeTransition: false
|
||||
}
|
||||
|
||||
@@ -1,118 +0,0 @@
|
||||
import QtQuick 2.9
|
||||
import QtGraphicalEffects 1.0
|
||||
import QtQuick.Layouts 1.1
|
||||
|
||||
import moneroComponents.Wallet 1.0
|
||||
import "../components" as MoneroComponents
|
||||
|
||||
// BasicPanel header
|
||||
Rectangle {
|
||||
id: header
|
||||
anchors.leftMargin: 1
|
||||
anchors.rightMargin: 1
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 64
|
||||
color: "#FFFFFF"
|
||||
|
||||
Image {
|
||||
id: logo
|
||||
visible: appWindow.width > 460
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.verticalCenterOffset: -5
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 50
|
||||
source: "qrc:///images/moneroLogo2.png"
|
||||
}
|
||||
|
||||
Image {
|
||||
id: icon
|
||||
visible: !logo.visible
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 40
|
||||
source: "qrc:///images/moneroIcon.png"
|
||||
}
|
||||
|
||||
Grid {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.top: parent.top
|
||||
anchors.right: parent.right
|
||||
anchors.topMargin: 10
|
||||
width: 256
|
||||
columns: 3
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
id: balanceLabel
|
||||
width: 116
|
||||
height: 20
|
||||
font.family: "Arial"
|
||||
font.pixelSize: 12
|
||||
font.letterSpacing: -1
|
||||
elide: Text.ElideRight
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
verticalAlignment: Text.AlignBottom
|
||||
color: "#535353"
|
||||
text: leftPanel.balanceLabelText + ":"
|
||||
}
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
id: balanceText
|
||||
width: 110
|
||||
height: 20
|
||||
font.family: "Arial"
|
||||
font.pixelSize: 18
|
||||
font.letterSpacing: -1
|
||||
elide: Text.ElideRight
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
verticalAlignment: Text.AlignBottom
|
||||
color: "#000000"
|
||||
text: leftPanel.balanceText
|
||||
}
|
||||
|
||||
Item {
|
||||
height: 20
|
||||
width: 20
|
||||
|
||||
Image {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
source: "qrc:///images/lockIcon.png"
|
||||
}
|
||||
}
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
width: 116
|
||||
height: 20
|
||||
font.family: "Arial"
|
||||
font.pixelSize: 12
|
||||
font.letterSpacing: -1
|
||||
elide: Text.ElideRight
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
verticalAlignment: Text.AlignBottom
|
||||
color: "#535353"
|
||||
text: qsTr("Unlocked Balance:")
|
||||
}
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
id: availableBalanceText
|
||||
width: 110
|
||||
height: 20
|
||||
font.family: "Arial"
|
||||
font.pixelSize: 14
|
||||
font.letterSpacing: -1
|
||||
elide: Text.ElideRight
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
verticalAlignment: Text.AlignBottom
|
||||
color: "#000000"
|
||||
text: leftPanel.unlockedBalanceText
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
height: 1
|
||||
color: "#DBDBDB"
|
||||
}
|
||||
}
|
||||
@@ -29,6 +29,7 @@
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Layouts 1.1
|
||||
|
||||
import FontAwesome 1.0
|
||||
import moneroComponents.Wallet 1.0
|
||||
import "../components" as MoneroComponents
|
||||
|
||||
@@ -38,23 +39,25 @@ Rectangle {
|
||||
property var connected: Wallet.ConnectionStatus_Disconnected
|
||||
|
||||
function getConnectionStatusString(status) {
|
||||
if (status == Wallet.ConnectionStatus_Connected) {
|
||||
if(!appWindow.daemonSynced)
|
||||
return qsTr("Synchronizing")
|
||||
if(persistentSettings.useRemoteNode)
|
||||
return qsTr("Remote node")
|
||||
return appWindow.isMining ? qsTr("Connected") + " + " + qsTr("Mining"): qsTr("Connected")
|
||||
switch (status) {
|
||||
case Wallet.ConnectionStatus_Connected:
|
||||
if (!appWindow.daemonSynced)
|
||||
return qsTr("Synchronizing");
|
||||
if (persistentSettings.useRemoteNode)
|
||||
return qsTr("Remote node");
|
||||
return appWindow.isMining ? qsTr("Connected") + " + " + qsTr("Mining"): qsTr("Connected");
|
||||
case Wallet.ConnectionStatus_WrongVersion:
|
||||
return qsTr("Wrong version");
|
||||
case Wallet.ConnectionStatus_Disconnected:
|
||||
if (appWindow.walletMode <= 1) {
|
||||
return qsTr("Searching node") + translationManager.emptyString;
|
||||
}
|
||||
return qsTr("Disconnected");
|
||||
case Wallet.ConnectionStatus_Connecting:
|
||||
return qsTr("Connecting");
|
||||
default:
|
||||
return qsTr("Invalid connection status");
|
||||
}
|
||||
if (status == Wallet.ConnectionStatus_WrongVersion)
|
||||
return qsTr("Wrong version")
|
||||
if (status == Wallet.ConnectionStatus_Disconnected){
|
||||
if(appWindow.walletMode <= 1){
|
||||
return qsTr("Searching node") + translationManager.emptyString;
|
||||
}
|
||||
return qsTr("Disconnected")
|
||||
}
|
||||
|
||||
return qsTr("Invalid connection status")
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
@@ -146,6 +149,50 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
anchors.left: statusTextVal.right
|
||||
anchors.leftMargin: 16
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
color: refreshMouseArea.containsMouse ? MoneroComponents.Style.dimmedFontColor : MoneroComponents.Style.defaultFontColor
|
||||
font.family: FontAwesome.fontFamilySolid
|
||||
font.pixelSize: 24
|
||||
font.styleName: "Solid"
|
||||
opacity: iconItem.opacity * (refreshMouseArea.visible ? 1 : 0.5)
|
||||
text: FontAwesome.random
|
||||
visible: (
|
||||
!appWindow.disconnected &&
|
||||
!persistentSettings.useRemoteNode &&
|
||||
(persistentSettings.bootstrapNodeAddress == "auto" || persistentSettings.walletMode < 2)
|
||||
)
|
||||
|
||||
MouseArea {
|
||||
id: refreshMouseArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
visible: true
|
||||
onClicked: {
|
||||
const callback = function(result) {
|
||||
refreshMouseArea.visible = true;
|
||||
if (result) {
|
||||
appWindow.showStatusMessage(qsTr("Successfully switched to another public node"), 3);
|
||||
appWindow.currentWallet.refreshHeightAsync();
|
||||
} else {
|
||||
appWindow.showStatusMessage(qsTr("Failed to switch public node"), 3);
|
||||
}
|
||||
};
|
||||
|
||||
daemonManager.sendCommandAsync(
|
||||
["set_bootstrap_daemon", "auto"],
|
||||
appWindow.currentWallet.nettype,
|
||||
callback);
|
||||
|
||||
refreshMouseArea.visible = false;
|
||||
appWindow.showStatusMessage(qsTr("Switching to another public node"), 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,11 +41,11 @@ import "../js/Utils.js" as Utils
|
||||
Item {
|
||||
id: root
|
||||
visible: false
|
||||
z: parent.z + 2
|
||||
|
||||
property bool isHidden: true
|
||||
property alias password: passwordInput1.text
|
||||
property string walletName
|
||||
property var okButtonText
|
||||
property string okButtonIcon
|
||||
property string errorText
|
||||
property bool passwordDialogMode
|
||||
property bool passphraseDialogMode
|
||||
@@ -61,14 +61,11 @@ Item {
|
||||
signal closeCallback()
|
||||
|
||||
function _openInit(walletName, errorText) {
|
||||
isHidden = true
|
||||
capsLockTextLabel.visible = oshelper.isCapsLock();
|
||||
passwordInput1.echoMode = TextInput.Password
|
||||
passwordInput2.echoMode = TextInput.Password
|
||||
passwordInput1.text = ""
|
||||
passwordInput2.text = ""
|
||||
passwordInput1.forceActiveFocus();
|
||||
inactiveOverlay.visible = true // draw appwindow inactive
|
||||
passwordInput1.reset();
|
||||
passwordInput2.reset();
|
||||
if(!appWindow.currentWallet || appWindow.active)
|
||||
passwordInput1.input.forceActiveFocus();
|
||||
root.walletName = walletName ? walletName : ""
|
||||
errorTextLabel.text = errorText ? errorText : "";
|
||||
leftPanel.enabled = false
|
||||
@@ -80,10 +77,12 @@ Item {
|
||||
appWindow.updateBalance();
|
||||
}
|
||||
|
||||
function open(walletName, errorText) {
|
||||
function open(walletName, errorText, okButtonText, okButtonIcon) {
|
||||
passwordDialogMode = true;
|
||||
passphraseDialogMode = false;
|
||||
newPasswordDialogMode = false;
|
||||
root.okButtonText = okButtonText;
|
||||
root.okButtonIcon = okButtonIcon ? okButtonIcon : "";
|
||||
_openInit(walletName, errorText);
|
||||
}
|
||||
|
||||
@@ -106,7 +105,6 @@ Item {
|
||||
}
|
||||
|
||||
function close() {
|
||||
inactiveOverlay.visible = false
|
||||
leftPanel.enabled = true
|
||||
middlePanel.enabled = true
|
||||
wizard.enabled = true
|
||||
@@ -118,14 +116,32 @@ Item {
|
||||
closeCallback();
|
||||
}
|
||||
|
||||
function toggleIsHidden() {
|
||||
passwordInput1.echoMode = isHidden ? TextInput.Normal : TextInput.Password;
|
||||
passwordInput2.echoMode = isHidden ? TextInput.Normal : TextInput.Password;
|
||||
isHidden = !isHidden;
|
||||
function onOk() {
|
||||
if (!passwordDialogMode && passwordInput1.text !== passwordInput2.text) {
|
||||
return;
|
||||
}
|
||||
root.close()
|
||||
if (passwordDialogMode) {
|
||||
root.accepted()
|
||||
} else if (newPasswordDialogMode) {
|
||||
root.acceptedNewPassword()
|
||||
} else if (passphraseDialogMode) {
|
||||
root.acceptedPassphrase()
|
||||
}
|
||||
}
|
||||
|
||||
function onCancel() {
|
||||
root.close()
|
||||
if (passwordDialogMode) {
|
||||
root.rejected()
|
||||
} else if (newPasswordDialogMode) {
|
||||
root.rejectedNewPassword()
|
||||
} else if (passphraseDialogMode) {
|
||||
root.rejectedPassphrase()
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
z: inactiveOverlay.z + 1
|
||||
id: mainLayout
|
||||
spacing: 10
|
||||
anchors { fill: parent; margins: 35 }
|
||||
@@ -187,15 +203,11 @@ Item {
|
||||
text: qsTr("CAPSLOCKS IS ON.") + translationManager.emptyString;
|
||||
}
|
||||
|
||||
TextField {
|
||||
MoneroComponents.LineEdit {
|
||||
id: passwordInput1
|
||||
password: true
|
||||
Layout.topMargin: 6
|
||||
Layout.fillWidth: true
|
||||
horizontalAlignment: TextInput.AlignLeft
|
||||
verticalAlignment: TextInput.AlignVCenter
|
||||
font.family: MoneroComponents.Style.fontLight.name
|
||||
font.pixelSize: 24
|
||||
echoMode: TextInput.Password
|
||||
KeyNavigation.tab: {
|
||||
if (passwordDialogMode) {
|
||||
return okButton
|
||||
@@ -203,76 +215,12 @@ Item {
|
||||
return passwordInput2
|
||||
}
|
||||
}
|
||||
bottomPadding: 10
|
||||
leftPadding: 10
|
||||
topPadding: 10
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
selectionColor: MoneroComponents.Style.textSelectionColor
|
||||
selectedTextColor: MoneroComponents.Style.textSelectedColor
|
||||
onTextChanged: capsLockTextLabel.visible = oshelper.isCapsLock();
|
||||
|
||||
background: Rectangle {
|
||||
radius: 2
|
||||
color: MoneroComponents.Style.blackTheme ? "black" : "#A9FFFFFF"
|
||||
border.color: MoneroComponents.Style.inputBorderColorInActive
|
||||
border.width: 1
|
||||
|
||||
MoneroEffects.ColorTransition {
|
||||
targetObj: parent
|
||||
blackColor: "black"
|
||||
whiteColor: "#A9FFFFFF"
|
||||
}
|
||||
|
||||
MoneroComponents.Label {
|
||||
fontSize: 20
|
||||
text: isHidden ? FontAwesome.eye : FontAwesome.eyeSlash
|
||||
opacity: 0.7
|
||||
fontFamily: FontAwesome.fontFamily
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 15
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.verticalCenterOffset: 1
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
hoverEnabled: true
|
||||
onClicked: {
|
||||
toggleIsHidden();
|
||||
}
|
||||
onEntered: {
|
||||
parent.opacity = 0.9
|
||||
parent.fontSize = 24
|
||||
}
|
||||
onExited: {
|
||||
parent.opacity = 0.7
|
||||
parent.fontSize = 20
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Keys.enabled: root.visible
|
||||
Keys.onReturnPressed: {
|
||||
root.close()
|
||||
if (passwordDialogMode) {
|
||||
root.accepted()
|
||||
} else if (newPasswordDialogMode) {
|
||||
root.acceptedNewPassword()
|
||||
} else if (passphraseDialogMode) {
|
||||
root.acceptedPassphrase()
|
||||
}
|
||||
}
|
||||
Keys.onEscapePressed: {
|
||||
root.close()
|
||||
if (passwordDialogMode) {
|
||||
root.rejected()
|
||||
} else if (newPasswordDialogMode) {
|
||||
root.rejectedNewPassword()
|
||||
} else if (passphraseDialogMode) {
|
||||
root.rejectedPassphrase()
|
||||
}
|
||||
}
|
||||
Keys.onEnterPressed: root.onOk()
|
||||
Keys.onReturnPressed: root.onOk()
|
||||
Keys.onEscapePressed: root.onCancel()
|
||||
}
|
||||
|
||||
// padding
|
||||
@@ -296,78 +244,19 @@ Item {
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
}
|
||||
|
||||
TextField {
|
||||
MoneroComponents.LineEdit {
|
||||
id: passwordInput2
|
||||
passwordLinked: passwordInput1
|
||||
visible: !passwordDialogMode
|
||||
Layout.topMargin: 6
|
||||
Layout.fillWidth: true
|
||||
horizontalAlignment: TextInput.AlignLeft
|
||||
verticalAlignment: TextInput.AlignVCenter
|
||||
font.family: MoneroComponents.Style.fontLight.name
|
||||
font.pixelSize: 24
|
||||
echoMode: TextInput.Password
|
||||
KeyNavigation.tab: okButton
|
||||
bottomPadding: 10
|
||||
leftPadding: 10
|
||||
topPadding: 10
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
selectionColor: MoneroComponents.Style.textSelectionColor
|
||||
selectedTextColor: MoneroComponents.Style.textSelectedColor
|
||||
onTextChanged: capsLockTextLabel.visible = oshelper.isCapsLock();
|
||||
|
||||
background: Rectangle {
|
||||
radius: 2
|
||||
border.color: MoneroComponents.Style.inputBorderColorInActive
|
||||
border.width: 1
|
||||
color: MoneroComponents.Style.blackTheme ? "black" : "#A9FFFFFF"
|
||||
|
||||
MoneroComponents.Label {
|
||||
fontSize: 20
|
||||
text: isHidden ? FontAwesome.eye : FontAwesome.eyeSlash
|
||||
opacity: 0.7
|
||||
fontFamily: FontAwesome.fontFamily
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 15
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.verticalCenterOffset: 1
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
hoverEnabled: true
|
||||
onClicked: {
|
||||
toggleIsHidden()
|
||||
}
|
||||
onEntered: {
|
||||
parent.opacity = 0.9
|
||||
parent.fontSize = 24
|
||||
}
|
||||
onExited: {
|
||||
parent.opacity = 0.7
|
||||
parent.fontSize = 20
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Keys.onReturnPressed: {
|
||||
if (passwordInput1.text === passwordInput2.text) {
|
||||
root.close()
|
||||
if (newPasswordDialogMode) {
|
||||
root.acceptedNewPassword()
|
||||
} else if (passphraseDialogMode) {
|
||||
root.acceptedPassphrase()
|
||||
}
|
||||
}
|
||||
}
|
||||
Keys.onEscapePressed: {
|
||||
root.close()
|
||||
if (newPasswordDialogMode) {
|
||||
root.rejectedNewPassword()
|
||||
} else if (passphraseDialogMode) {
|
||||
root.rejectedPassphrase()
|
||||
}
|
||||
}
|
||||
Keys.enabled: root.visible
|
||||
Keys.onEnterPressed: root.onOk()
|
||||
Keys.onReturnPressed: root.onOk()
|
||||
Keys.onEscapePressed: root.onCancel()
|
||||
}
|
||||
|
||||
// padding
|
||||
@@ -389,37 +278,22 @@ Item {
|
||||
|
||||
MoneroComponents.StandardButton {
|
||||
id: cancelButton
|
||||
primary: false
|
||||
small: true
|
||||
text: root.walletName.length > 0 ? qsTr("Change wallet") + translationManager.emptyString : qsTr("Cancel") + translationManager.emptyString
|
||||
text: qsTr("Cancel") + translationManager.emptyString
|
||||
KeyNavigation.tab: passwordInput1
|
||||
onClicked: {
|
||||
root.close()
|
||||
if (passwordDialogMode) {
|
||||
root.rejected()
|
||||
} else if (newPasswordDialogMode) {
|
||||
root.rejectedNewPassword()
|
||||
} else if (passphraseDialogMode) {
|
||||
root.rejectedPassphrase()
|
||||
}
|
||||
}
|
||||
onClicked: onCancel()
|
||||
}
|
||||
|
||||
MoneroComponents.StandardButton {
|
||||
id: okButton
|
||||
fontAwesomeIcon: true
|
||||
rightIcon: okButtonIcon
|
||||
small: true
|
||||
text: qsTr("Continue") + translationManager.emptyString
|
||||
text: okButtonText ? okButtonText : qsTr("Ok") + translationManager.emptyString
|
||||
KeyNavigation.tab: cancelButton
|
||||
enabled: (passwordDialogMode == true) ? true : passwordInput1.text === passwordInput2.text
|
||||
onClicked: {
|
||||
root.close()
|
||||
if (passwordDialogMode) {
|
||||
root.accepted()
|
||||
} else if (newPasswordDialogMode) {
|
||||
root.acceptedNewPassword()
|
||||
} else if (passphraseDialogMode) {
|
||||
root.acceptedPassphrase()
|
||||
}
|
||||
}
|
||||
onClicked: onOk()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,21 +29,23 @@
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Window 2.1
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtQuick.Layouts 1.1
|
||||
|
||||
import "../components" as MoneroComponents
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
color: MoneroComponents.Style.blackTheme ? "white" : "transparent"
|
||||
color: MoneroComponents.Style.blackTheme ? "black" : "white"
|
||||
visible: false
|
||||
radius: 10
|
||||
border.color: MoneroComponents.Style.blackTheme ? Qt.rgba(255, 255, 255, 0.25) : Qt.rgba(0, 0, 0, 0.25)
|
||||
border.width: 1
|
||||
z: 11
|
||||
property alias messageText: messageTitle.text
|
||||
property alias heightProgressText : heightProgress.text
|
||||
|
||||
width: 200
|
||||
height: 100
|
||||
opacity: 0.7
|
||||
width: 100
|
||||
height: 50
|
||||
|
||||
function show() {
|
||||
root.visible = true;
|
||||
@@ -56,44 +58,55 @@ Rectangle {
|
||||
ColumnLayout {
|
||||
id: rootLayout
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.centerIn: parent
|
||||
|
||||
anchors.leftMargin: 30
|
||||
anchors.rightMargin: 30
|
||||
|
||||
spacing: 12
|
||||
spacing: 21
|
||||
|
||||
BusyIndicator {
|
||||
running: parent.visible
|
||||
Item {
|
||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
|
||||
Layout.preferredHeight: 80
|
||||
|
||||
Image {
|
||||
id: imgLogo
|
||||
width: 60
|
||||
height: 60
|
||||
anchors.centerIn: parent
|
||||
source: "qrc:///images/monero-vector.svg"
|
||||
mipmap: true
|
||||
}
|
||||
|
||||
BusyIndicator {
|
||||
running: parent.visible
|
||||
anchors.centerIn: imgLogo
|
||||
style: BusyIndicatorStyle {
|
||||
indicator: Image {
|
||||
visible: control.running
|
||||
source: "qrc:///images/busy-indicator.png"
|
||||
RotationAnimator on rotation {
|
||||
running: control.running
|
||||
loops: Animation.Infinite
|
||||
duration: 1000
|
||||
from: 0
|
||||
to: 360
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
id: messageTitle
|
||||
text: "Please wait..."
|
||||
font {
|
||||
pixelSize: 22
|
||||
}
|
||||
text: qsTr("Please wait...") + translationManager.emptyString
|
||||
font.pixelSize: 24
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
|
||||
Layout.fillWidth: true
|
||||
themeTransition: false
|
||||
color: "black"
|
||||
}
|
||||
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
id: heightProgress
|
||||
font {
|
||||
pixelSize: 18
|
||||
}
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
|
||||
Layout.fillWidth: true
|
||||
themeTransition: false
|
||||
color: "black"
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ Rectangle {
|
||||
function updateProgress(currentBlock,targetBlock, blocksToSync, statusTxt){
|
||||
if(targetBlock > 0) {
|
||||
var remaining = (currentBlock < targetBlock) ? targetBlock - currentBlock : 0
|
||||
var progressLevel = (blocksToSync > 0 && blocksToSync != remaining) ? (100*(blocksToSync - remaining)/blocksToSync).toFixed(0) : (100*(currentBlock / targetBlock)).toFixed(0)
|
||||
var progressLevel = (blocksToSync > 0 ) ? (100*(blocksToSync - remaining)/blocksToSync).toFixed(0) : 100
|
||||
fillLevel = progressLevel
|
||||
if(typeof statusTxt != "undefined" && statusTxt != "") {
|
||||
progressText.text = statusTxt;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2014-2018, The Monero Project
|
||||
// Copyright (c) 2014-2020, The Monero Project
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
@@ -53,6 +53,7 @@ Rectangle {
|
||||
script: {
|
||||
root.visible = true
|
||||
camera.captureMode = Camera.CaptureStillImage
|
||||
camera.cameraState = Camera.ActiveState
|
||||
camera.start()
|
||||
finder.enabled = true
|
||||
}
|
||||
@@ -65,6 +66,7 @@ Rectangle {
|
||||
camera.stop()
|
||||
root.visible = false
|
||||
finder.enabled = false
|
||||
camera.cameraState = Camera.UnloadedState
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -74,6 +76,7 @@ Rectangle {
|
||||
id: camera
|
||||
objectName: "qrCameraQML"
|
||||
captureMode: Camera.CaptureStillImage
|
||||
cameraState: Camera.UnloadedState
|
||||
|
||||
focus {
|
||||
focusMode: Camera.FocusContinuous
|
||||
@@ -83,9 +86,14 @@ Rectangle {
|
||||
id : finder
|
||||
objectName: "QrFinder"
|
||||
onDecoded : {
|
||||
root.qrcode_decoded(address, payment_id, amount, tx_description, recipient_name, extra_parameters)
|
||||
root.state = "Stopped"
|
||||
}
|
||||
const parsed = walletManager.parse_uri_to_object(data);
|
||||
if (!parsed.error) {
|
||||
root.qrcode_decoded(parsed.address, parsed.payment_id, parsed.amount, parsed.tx_description, parsed.recipient_name, parsed.extra_parameters);
|
||||
root.state = "Stopped";
|
||||
} else {
|
||||
onNotifyError(parsed.error);
|
||||
}
|
||||
}
|
||||
onNotifyError : {
|
||||
if( warning )
|
||||
messageDialog.icon = StandardIcon.Critical
|
||||
|
||||
@@ -74,7 +74,7 @@ Item {
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
id: label
|
||||
Layout.leftMargin: (!isMobile ? 10 : 8)
|
||||
Layout.leftMargin: 10
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: radioButton.fontSize
|
||||
|
||||
@@ -35,7 +35,7 @@ import "../js/Utils.js" as Utils
|
||||
import "../components" as MoneroComponents
|
||||
|
||||
GridLayout {
|
||||
columns: (isMobile) ? 1 : 2
|
||||
columns: 2
|
||||
columnSpacing: 32
|
||||
id: root
|
||||
property alias daemonAddrText: daemonAddr.text
|
||||
@@ -43,6 +43,9 @@ GridLayout {
|
||||
property alias daemonAddrLabelText: daemonAddr.labelText
|
||||
property alias daemonPortLabelText: daemonPort.labelText
|
||||
|
||||
property string initialAddress: ""
|
||||
property var initialHostPort: initialAddress.match(/^(.*?)(?:\:?(\d*))$/)
|
||||
|
||||
// TODO: LEGACY; remove these placeHolder variables when
|
||||
// the wizards get redesigned to the black-theme
|
||||
property string placeholderFontFamily: MoneroComponents.Style.fontRegular.name
|
||||
@@ -58,6 +61,9 @@ GridLayout {
|
||||
property bool lineEditFontBold: false
|
||||
property int lineEditFontSize: 15
|
||||
|
||||
// Author: David M. Syzdek https://github.com/syzdek https://gist.github.com/syzdek/6086792
|
||||
readonly property var ipv6Regex: /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe08:(:[0-9a-fA-F]{1,4}){2,2}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/
|
||||
|
||||
signal editingFinished()
|
||||
signal textChanged()
|
||||
|
||||
@@ -91,8 +97,12 @@ GridLayout {
|
||||
fontColor: lineEditFontColor
|
||||
fontBold: lineEditFontBold
|
||||
fontSize: lineEditFontSize
|
||||
onEditingFinished: root.editingFinished()
|
||||
onEditingFinished: {
|
||||
text = text.replace(ipv6Regex, "[$1]");
|
||||
root.editingFinished();
|
||||
}
|
||||
onTextChanged: root.textChanged()
|
||||
text: initialHostPort[1]
|
||||
}
|
||||
|
||||
LineEdit {
|
||||
@@ -114,5 +124,6 @@ GridLayout {
|
||||
|
||||
onEditingFinished: root.editingFinished()
|
||||
onTextChanged: root.textChanged()
|
||||
text: initialHostPort[2]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,89 +0,0 @@
|
||||
// Copyright (c) 2014-2018, The Monero Project
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification, are
|
||||
// permitted provided that the following conditions are met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
// conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
// of conditions and the following disclaimer in the documentation and/or other
|
||||
// materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the copyright holder nor the names of its contributors may be
|
||||
// used to endorse or promote products derived from this software without specific
|
||||
// prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import QtQuick 2.9
|
||||
import "." as MoneroComponents
|
||||
|
||||
Item {
|
||||
id: scrollItem
|
||||
property var flickable
|
||||
property alias scrollColor: scroll.color
|
||||
property alias scrollWidth: scroll.width
|
||||
property alias scrollRadius: scroll.radius
|
||||
width: 15
|
||||
z: 1
|
||||
|
||||
function flickableContentYChanged() {
|
||||
if(flickable === undefined)
|
||||
return
|
||||
|
||||
var t = flickable.height - scroll.height
|
||||
scroll.y = (flickable.contentY / (flickable.contentHeight - flickable.height)) * t
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: scrollArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: scroll
|
||||
|
||||
width: 4
|
||||
radius: width / 2
|
||||
height: {
|
||||
var t = (flickable.height * flickable.height) / flickable.contentHeight
|
||||
return t < 50 ? 50 : t
|
||||
}
|
||||
y: 0; x: 0
|
||||
color: MoneroComponents.Style.orange
|
||||
opacity: flickable.moving || handleArea.pressed || scrollArea.containsMouse ? 0.8 : 0
|
||||
visible: flickable.contentHeight > flickable.height
|
||||
|
||||
Behavior on opacity {
|
||||
NumberAnimation { duration: 200; easing.type: Easing.InQuad }
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: handleArea
|
||||
anchors.fill: parent
|
||||
drag.target: scroll
|
||||
drag.axis: Drag.YAxis
|
||||
drag.minimumY: 0
|
||||
drag.maximumY: flickable.height - height
|
||||
propagateComposedEvents: true
|
||||
|
||||
onPositionChanged: {
|
||||
if(!pressed) return
|
||||
var dy = scroll.y / (flickable.height - scroll.height)
|
||||
flickable.contentY = (flickable.contentHeight - flickable.height) * dy
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
115
components/SettingsListItem.qml
Normal file
@@ -0,0 +1,115 @@
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Layouts 1.1
|
||||
import FontAwesome 1.0
|
||||
|
||||
import "../components" as MoneroComponents
|
||||
|
||||
ColumnLayout {
|
||||
id: settingsListItem
|
||||
property alias iconText: iconLabel.text
|
||||
property alias description: area.text
|
||||
property alias title: header.text
|
||||
property bool isLast: false
|
||||
signal clicked()
|
||||
|
||||
Layout.fillWidth: true
|
||||
spacing: 0
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumHeight: 75
|
||||
Layout.preferredHeight: rect.height + 15
|
||||
color: "transparent"
|
||||
|
||||
Rectangle {
|
||||
id: divider
|
||||
anchors.topMargin: 0
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
height: 1
|
||||
color: MoneroComponents.Style.dividerColor
|
||||
opacity: MoneroComponents.Style.dividerOpacity
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: rect
|
||||
width: parent.width
|
||||
height: header.height + area.contentHeight
|
||||
color: "transparent";
|
||||
anchors.left: parent.left
|
||||
anchors.bottomMargin: 4
|
||||
anchors.topMargin: 4
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
Rectangle {
|
||||
id: icon
|
||||
color: "transparent"
|
||||
height: 32
|
||||
width: 32
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 16
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
MoneroComponents.Label {
|
||||
id: iconLabel
|
||||
fontSize: 32
|
||||
fontFamily: FontAwesome.fontFamilySolid
|
||||
anchors.centerIn: parent
|
||||
fontColor: MoneroComponents.Style.defaultFontColor
|
||||
styleName: "Solid"
|
||||
}
|
||||
}
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
id: header
|
||||
anchors.left: icon.right
|
||||
anchors.leftMargin: 16
|
||||
anchors.top: parent.top
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
opacity: MoneroComponents.Style.blackTheme ? 1.0 : 0.8
|
||||
font.bold: true
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: 16
|
||||
}
|
||||
|
||||
Text {
|
||||
id: area
|
||||
anchors.top: header.bottom
|
||||
anchors.topMargin: 4
|
||||
anchors.left: icon.right
|
||||
anchors.leftMargin: 16
|
||||
color: MoneroComponents.Style.dimmedFontColor
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: 15
|
||||
horizontalAlignment: TextInput.AlignLeft
|
||||
wrapMode: Text.WordWrap;
|
||||
leftPadding: 0
|
||||
topPadding: 0
|
||||
width: parent.width - (icon.width + icon.anchors.leftMargin + anchors.leftMargin)
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: bottomDivider
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
height: 1
|
||||
color: MoneroComponents.Style.dividerColor
|
||||
opacity: MoneroComponents.Style.dividerOpacity
|
||||
visible: settingsListItem.isLast
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onEntered: root.color = MoneroComponents.Style.titleBarButtonHoverColor
|
||||
onExited: root.color = "transparent"
|
||||
onClicked: {
|
||||
settingsListItem.clicked()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
68
components/Slider.qml
Normal file
@@ -0,0 +1,68 @@
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.0 as QtQuickControls
|
||||
import QtQuick.Layouts 1.1
|
||||
|
||||
import "../components" as MoneroComponents
|
||||
|
||||
ColumnLayout {
|
||||
property alias from: slider.from
|
||||
property alias stepSize: slider.stepSize
|
||||
property alias to: slider.to
|
||||
property alias value: slider.value
|
||||
|
||||
property alias text: label.text
|
||||
|
||||
signal moved()
|
||||
|
||||
spacing: 0
|
||||
|
||||
Text {
|
||||
id: label
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
font.pixelSize: 14
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
QtQuickControls.Slider {
|
||||
id: slider
|
||||
leftPadding: 0
|
||||
snapMode: QtQuickControls.Slider.SnapAlways
|
||||
|
||||
background: Rectangle {
|
||||
x: parent.leftPadding
|
||||
y: parent.topPadding + parent.availableHeight / 2 - height / 2
|
||||
implicitWidth: 200
|
||||
implicitHeight: 4
|
||||
width: parent.availableWidth
|
||||
height: implicitHeight
|
||||
radius: 2
|
||||
color: MoneroComponents.Style.progressBarBackgroundColor
|
||||
|
||||
Rectangle {
|
||||
width: parent.visualPosition * parent.width
|
||||
height: parent.height
|
||||
color: MoneroComponents.Style.green
|
||||
radius: 2
|
||||
}
|
||||
}
|
||||
|
||||
handle: Rectangle {
|
||||
x: parent.leftPadding + parent.visualPosition * (parent.availableWidth - width)
|
||||
y: parent.topPadding + parent.availableHeight / 2 - height / 2
|
||||
implicitWidth: 18
|
||||
implicitHeight: 18
|
||||
radius: 8
|
||||
color: parent.pressed ? "#f0f0f0" : "#f6f6f6"
|
||||
border.color: MoneroComponents.Style.grey
|
||||
}
|
||||
|
||||
onMoved: parent.moved()
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.NoButton
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -29,15 +29,24 @@
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Layouts 1.1
|
||||
|
||||
import FontAwesome 1.0
|
||||
|
||||
import "../components" as MoneroComponents
|
||||
|
||||
Item {
|
||||
id: button
|
||||
property bool fontAwesomeIcon: false
|
||||
property bool primary: true
|
||||
property string rightIcon: ""
|
||||
property string rightIconInactive: ""
|
||||
property string textColor: button.enabled? MoneroComponents.Style.buttonTextColor: MoneroComponents.Style.buttonTextColorDisabled
|
||||
property color textColor: !button.enabled
|
||||
? MoneroComponents.Style.buttonTextColorDisabled
|
||||
: primary
|
||||
? MoneroComponents.Style.buttonTextColor
|
||||
: MoneroComponents.Style.buttonSecondaryTextColor;
|
||||
property bool small: false
|
||||
property alias text: label.text
|
||||
property alias fontBold: label.font.bold
|
||||
property int fontSize: {
|
||||
if(small) return 14;
|
||||
else return 16;
|
||||
@@ -70,7 +79,9 @@ Item {
|
||||
when: buttonArea.containsMouse || button.focus
|
||||
PropertyChanges {
|
||||
target: buttonRect
|
||||
color: MoneroComponents.Style.buttonBackgroundColorHover
|
||||
color: primary
|
||||
? MoneroComponents.Style.buttonBackgroundColorHover
|
||||
: MoneroComponents.Style.buttonSecondaryBackgroundColorHover
|
||||
}
|
||||
},
|
||||
State {
|
||||
@@ -78,7 +89,9 @@ Item {
|
||||
when: button.enabled
|
||||
PropertyChanges {
|
||||
target: buttonRect
|
||||
color: MoneroComponents.Style.buttonBackgroundColor
|
||||
color: primary
|
||||
? MoneroComponents.Style.buttonBackgroundColor
|
||||
: MoneroComponents.Style.buttonSecondaryBackgroundColor
|
||||
}
|
||||
},
|
||||
State {
|
||||
@@ -125,7 +138,7 @@ Item {
|
||||
}
|
||||
|
||||
Image {
|
||||
visible: button.rightIcon !== ""
|
||||
visible: !fontAwesomeIcon && button.rightIcon !== ""
|
||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
|
||||
width: button.small ? 16 : 20
|
||||
height: button.small ? 16 : 20
|
||||
@@ -136,6 +149,16 @@ Item {
|
||||
return button.rightIcon;
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
font.family: FontAwesome.fontFamilySolid
|
||||
font.pixelSize: button.small ? 16 : 20
|
||||
font.styleName: "Solid"
|
||||
text: button.rightIcon
|
||||
visible: fontAwesomeIcon && button.rightIcon !== ""
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
@@ -146,6 +169,8 @@ Item {
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
}
|
||||
|
||||
Keys.enabled: button.visible
|
||||
Keys.onSpacePressed: doClick()
|
||||
Keys.onEnterPressed: Keys.onReturnPressed(event)
|
||||
Keys.onReturnPressed: doClick()
|
||||
}
|
||||
|
||||
@@ -82,28 +82,30 @@ Rectangle {
|
||||
|
||||
function open() {
|
||||
// Center
|
||||
if(!isMobile) {
|
||||
root.x = parent.width/2 - root.width/2
|
||||
root.y = 100
|
||||
}
|
||||
root.x = parent.width/2 - root.width/2
|
||||
root.y = 100
|
||||
root.z = 11
|
||||
root.visible = true;
|
||||
}
|
||||
|
||||
function close() {
|
||||
root.visible = false;
|
||||
// reset button text
|
||||
okButton.text = qsTr("OK")
|
||||
cancelButton.text = qsTr("Cancel")
|
||||
|
||||
closeCallback();
|
||||
}
|
||||
|
||||
// TODO: implement without hardcoding sizes
|
||||
width: isMobile ? screenWidth : 520
|
||||
height: isMobile ? screenHeight : 380
|
||||
width: 520
|
||||
height: 380
|
||||
|
||||
ColumnLayout {
|
||||
id: mainLayout
|
||||
spacing: 10
|
||||
anchors.fill: parent
|
||||
anchors.margins: (isMobile? 17 : 20)
|
||||
anchors.margins: 20
|
||||
|
||||
RowLayout {
|
||||
id: column
|
||||
@@ -126,7 +128,10 @@ Rectangle {
|
||||
Flickable {
|
||||
id: flickable
|
||||
anchors.fill: parent
|
||||
ScrollBar.vertical: ScrollBar { }
|
||||
ScrollBar.vertical: ScrollBar {
|
||||
onActiveChanged: if (!active && !isMac) active = true
|
||||
}
|
||||
boundsBehavior: isMac ? Flickable.DragAndOvershootBounds : Flickable.StopAtBounds
|
||||
|
||||
TextArea.flickable: TextArea {
|
||||
id: dialogContent
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.2
|
||||
import QtGraphicalEffects 1.0
|
||||
|
||||
import "../components" as MoneroComponents
|
||||
@@ -42,7 +43,7 @@ Item {
|
||||
property string releasedColor: MoneroComponents.Style.titleBarButtonHoverColor
|
||||
property string textColor: MoneroComponents.Style.defaultFontColor
|
||||
property alias currentIndex: columnid.currentIndex
|
||||
property bool expanded: false
|
||||
readonly property alias expanded: popup.visible
|
||||
property int dropdownHeight: 42
|
||||
property int fontHeaderSize: 16
|
||||
property int fontItemSize: 14
|
||||
@@ -56,23 +57,6 @@ Item {
|
||||
signal changed();
|
||||
|
||||
onExpandedChanged: if(expanded) appWindow.currentItem = dropdown
|
||||
function hide() { dropdown.expanded = false }
|
||||
function containsPoint(px, py) {
|
||||
if(px < 0)
|
||||
return false
|
||||
if(px > width)
|
||||
return false
|
||||
if(py < 0)
|
||||
return false
|
||||
if(py > height + droplist.height)
|
||||
return false
|
||||
return true
|
||||
}
|
||||
|
||||
// Workaroud for suspected memory leak in 5.8 causing malloc crash on app exit
|
||||
function update() {
|
||||
firstColText.text = columnid.currentIndex < repeater.model.rowCount() ? qsTr(repeater.model.get(columnid.currentIndex).column1) + translationManager.emptyString : ""
|
||||
}
|
||||
|
||||
Item {
|
||||
id: head
|
||||
@@ -91,15 +75,17 @@ Item {
|
||||
}
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
id: firstColText
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 12
|
||||
anchors.right: dropIndicator.left
|
||||
anchors.rightMargin: 12
|
||||
elide: Text.ElideRight
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.bold: dropdown.headerFontBold
|
||||
font.pixelSize: dropdown.fontHeaderSize
|
||||
color: dropdown.textColor
|
||||
text: columnid.currentIndex < repeater.model.count ? qsTr(repeater.model.get(columnid.currentIndex).column1) + translationManager.emptyString : ""
|
||||
}
|
||||
|
||||
Item {
|
||||
@@ -107,7 +93,8 @@ Item {
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.right: parent.right
|
||||
width: 32
|
||||
anchors.rightMargin: 12
|
||||
width: dropdownIcon.width
|
||||
|
||||
Image {
|
||||
id: dropdownIcon
|
||||
@@ -128,118 +115,104 @@ Item {
|
||||
MouseArea {
|
||||
id: dropArea
|
||||
anchors.fill: parent
|
||||
onClicked: dropdown.expanded = !dropdown.expanded
|
||||
onClicked: dropdown.expanded ? popup.close() : popup.open()
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: droplist
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: head.bottom
|
||||
clip: true
|
||||
height: dropdown.expanded ? columnid.height : 0
|
||||
color: dropdown.pressedColor
|
||||
Popup {
|
||||
id: popup
|
||||
padding: 0
|
||||
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent
|
||||
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
width: 3; height: 3
|
||||
id: droplist
|
||||
x: dropdown.x
|
||||
width: dropdown.width
|
||||
y: head.y + head.height
|
||||
clip: true
|
||||
height: dropdown.expanded ? columnid.height : 0
|
||||
color: dropdown.pressedColor
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
width: 3; height: 3
|
||||
color: dropdown.pressedColor
|
||||
}
|
||||
Behavior on height {
|
||||
NumberAnimation { duration: 100; easing.type: Easing.InQuad }
|
||||
}
|
||||
|
||||
Behavior on height {
|
||||
NumberAnimation { duration: 100; easing.type: Easing.InQuad }
|
||||
}
|
||||
Column {
|
||||
id: columnid
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
property int currentIndex: 0
|
||||
|
||||
Column {
|
||||
id: columnid
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
property int currentIndex: 0
|
||||
Repeater {
|
||||
id: repeater
|
||||
|
||||
Repeater {
|
||||
id: repeater
|
||||
// Workaround for translations in listElements. All translated strings needs to be listed in this file.
|
||||
property string stringAutomatic: qsTr("Automatic") + translationManager.emptyString
|
||||
property string stringSlow: qsTr("Slow (x0.2 fee)") + translationManager.emptyString
|
||||
property string stringNormal: qsTr("Normal (x1 fee)") + translationManager.emptyString
|
||||
property string stringFast: qsTr("Fast (x5 fee)") + translationManager.emptyString
|
||||
property string stringFastest: qsTr("Fastest (x200 fee)") + translationManager.emptyString
|
||||
|
||||
// Workaround for translations in listElements. All translated strings needs to be listed in this file.
|
||||
property string stringLow: qsTr("Low (x1 fee)") + translationManager.emptyString
|
||||
property string stringMedium: qsTr("Medium (x20 fee)") + translationManager.emptyString
|
||||
property string stringHigh: qsTr("High (x166 fee)") + translationManager.emptyString
|
||||
property string stringSlow: qsTr("Slow (x0.25 fee)") + translationManager.emptyString
|
||||
property string stringDefault: qsTr("Default (x1 fee)") + translationManager.emptyString
|
||||
property string stringFast: qsTr("Fast (x5 fee)") + translationManager.emptyString
|
||||
property string stringFastest: qsTr("Fastest (x41.5 fee)") + translationManager.emptyString
|
||||
property string stringAll: qsTr("All") + translationManager.emptyString
|
||||
property string stringSent: qsTr("Sent") + translationManager.emptyString
|
||||
property string stringReceived: qsTr("Received") + translationManager.emptyString
|
||||
|
||||
delegate: Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
height: (dropdown.dropdownHeight * 0.75)
|
||||
//radius: index === repeater.count - 1 ? 4 : 0
|
||||
color: itemArea.containsMouse || index === columnid.currentIndex || itemArea.containsMouse ? dropdown.releasedColor : dropdown.pressedColor
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
id: col1Text
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
delegate: Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.right: col2Text.left
|
||||
anchors.leftMargin: 12
|
||||
anchors.rightMargin: 0
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.bold: true
|
||||
font.pixelSize: fontItemSize
|
||||
color: itemArea.containsMouse || index === columnid.currentIndex || itemArea.containsMouse ? "#FA6800" : "#FFFFFF"
|
||||
text: qsTr(column1) + translationManager.emptyString
|
||||
}
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
id: col2Text
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 45
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: 14
|
||||
color: "#FFFFFF"
|
||||
text: ""
|
||||
}
|
||||
height: (dropdown.dropdownHeight * 0.75)
|
||||
//radius: index === repeater.count - 1 ? 4 : 0
|
||||
color: itemArea.containsMouse || index === columnid.currentIndex || itemArea.containsMouse ? dropdown.releasedColor : dropdown.pressedColor
|
||||
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
width: 3; height: 3
|
||||
color: parent.color
|
||||
}
|
||||
MoneroComponents.TextPlain {
|
||||
id: col1Text
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
anchors.right: col2Text.left
|
||||
anchors.leftMargin: 12
|
||||
anchors.rightMargin: 0
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.bold: true
|
||||
font.pixelSize: fontItemSize
|
||||
color: itemArea.containsMouse || index === columnid.currentIndex || itemArea.containsMouse ? "#FA6800" : "#FFFFFF"
|
||||
text: qsTr(column1) + translationManager.emptyString
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
width: 3; height: 3
|
||||
color: parent.color
|
||||
}
|
||||
MoneroComponents.TextPlain {
|
||||
id: col2Text
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 45
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: 14
|
||||
color: "#FFFFFF"
|
||||
text: ""
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: itemArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
width: 3; height: 3
|
||||
color: parent.color
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
dropdown.expanded = false
|
||||
columnid.currentIndex = index
|
||||
changed();
|
||||
dropdown.update()
|
||||
Rectangle {
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
width: 3; height: 3
|
||||
color: parent.color
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: itemArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
|
||||
onClicked: {
|
||||
popup.close()
|
||||
columnid.currentIndex = index
|
||||
changed();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ QtObject {
|
||||
property string textSelectedColor: blackTheme ? _b_textSelectedColor : _w_textSelectedColor
|
||||
|
||||
property string inputBoxBackground: blackTheme ? _b_inputBoxBackground : _w_inputBoxBackground
|
||||
property string inputBoxBackgroundDisabled: blackTheme ? _b_inputBoxBackgroundDisabled : _w_inputBoxBackgroundDisabled
|
||||
property string inputBoxBackgroundError: blackTheme ? _b_inputBoxBackgroundError : _w_inputBoxBackgroundError
|
||||
property string inputBoxColor: blackTheme ? _b_inputBoxColor : _w_inputBoxColor
|
||||
property string legacy_placeholderFontColor: blackTheme ? _b_legacy_placeholderFontColor : _w_legacy_placeholderFontColor
|
||||
@@ -43,6 +44,9 @@ QtObject {
|
||||
property string buttonInlineBackgroundColor: blackTheme ? _b_buttonInlineBackgroundColor : _w_buttonInlineBackgroundColor
|
||||
property string buttonTextColor: blackTheme ? _b_buttonTextColor : _w_buttonTextColor
|
||||
property string buttonTextColorDisabled: blackTheme ? _b_buttonTextColorDisabled : _w_buttonTextColorDisabled
|
||||
property string buttonSecondaryBackgroundColor: "#d9d9d9"
|
||||
property string buttonSecondaryBackgroundColorHover: "#a6a6a6"
|
||||
property string buttonSecondaryTextColor: "#4d4d4d"
|
||||
property string dividerColor: blackTheme ? _b_dividerColor : _w_dividerColor
|
||||
property real dividerOpacity: blackTheme ? _b_dividerOpacity : _w_dividerOpacity
|
||||
|
||||
@@ -51,7 +55,6 @@ QtObject {
|
||||
property string titleBarBackgroundBorderColor: blackTheme ? _b_titleBarBackgroundBorderColor : _w_titleBarBackgroundBorderColor
|
||||
property string titleBarLogoSource: blackTheme ? _b_titleBarLogoSource : _w_titleBarLogoSource
|
||||
property string titleBarMinimizeSource: blackTheme ? _b_titleBarMinimizeSource : _w_titleBarMinimizeSource
|
||||
property string titleBarExpandSource: blackTheme ? _b_titleBarExpandSource : _w_titleBarExpandSource
|
||||
property string titleBarFullscreenSource: blackTheme ? _b_titleBarFullscreenSource : _w_titleBarFullscreenSource
|
||||
property string titleBarCloseSource: blackTheme ? _b_titleBarCloseSource : _w_titleBarCloseSource
|
||||
property string titleBarButtonHoverColor: blackTheme ? _b_titleBarButtonHoverColor : _w_titleBarButtonHoverColor
|
||||
@@ -86,6 +89,7 @@ QtObject {
|
||||
property string _b_textSelectedColor: "white"
|
||||
|
||||
property string _b_inputBoxBackground: "black"
|
||||
property string _b_inputBoxBackgroundDisabled: Qt.rgba(255, 255, 255, 0.10)
|
||||
property string _b_inputBoxBackgroundError: "#FFDDDD"
|
||||
property string _b_inputBoxColor: "white"
|
||||
property string _b_legacy_placeholderFontColor: "#BABABA"
|
||||
@@ -108,7 +112,6 @@ QtObject {
|
||||
property string _b_titleBarBackgroundBorderColor: "#2f2f2f"
|
||||
property string _b_titleBarLogoSource: "qrc:///images/titlebarLogo.png"
|
||||
property string _b_titleBarMinimizeSource: "qrc:///images/minimize.svg"
|
||||
property string _b_titleBarExpandSource: "qrc:///images/sidebar.svg"
|
||||
property string _b_titleBarFullscreenSource: "qrc:///images/fullscreen.svg"
|
||||
property string _b_titleBarCloseSource: "qrc:///images/close.svg"
|
||||
property string _b_titleBarButtonHoverColor: "#10FFFFFF"
|
||||
@@ -125,7 +128,7 @@ QtObject {
|
||||
property string _b_menuButtonImageRightColor: "white"
|
||||
property string _b_menuButtonImageRightSource: "qrc:///images/right.svg"
|
||||
property string _b_menuButtonImageDotArrowSource: "qrc:///images/arrow-right-medium-white.png"
|
||||
property string _b_inlineButtonTextColor: "black"
|
||||
property string _b_inlineButtonTextColor: "white"
|
||||
property string _b_inlineButtonBorderColor: "black"
|
||||
property string _b_appWindowBackgroundColor: "white"
|
||||
property string _b_appWindowBorderColor: "#313131"
|
||||
@@ -143,6 +146,7 @@ QtObject {
|
||||
property string _w_textSelectedColor: "black"
|
||||
|
||||
property string _w_inputBoxBackground: "white"
|
||||
property string _w_inputBoxBackgroundDisabled: Qt.rgba(0, 0, 0, 0.20)
|
||||
property string _w_inputBoxBackgroundError: "#FFDDDD"
|
||||
property string _w_inputBoxColor: "black"
|
||||
property string _w_legacy_placeholderFontColor: "#BABABA"
|
||||
@@ -165,7 +169,6 @@ QtObject {
|
||||
property string _w_titleBarBackgroundBorderColor: "#DEDEDE"
|
||||
property string _w_titleBarLogoSource: "qrc:///images/themes/white/titlebarLogo.png"
|
||||
property string _w_titleBarMinimizeSource: "qrc:///images/themes/white/minimize.svg"
|
||||
property string _w_titleBarExpandSource: "qrc:///images/themes/white/expand.svg"
|
||||
property string _w_titleBarFullscreenSource: "qrc:///images/themes/white/fullscreen.svg"
|
||||
property string _w_titleBarCloseSource: "qrc:///images/themes/white/close.svg"
|
||||
property string _w_titleBarButtonHoverColor: "#11000000"
|
||||
@@ -182,7 +185,7 @@ QtObject {
|
||||
property string _w_menuButtonImageRightColorActive: "#FA6800"
|
||||
property string _w_menuButtonImageRightColor: "#808080"
|
||||
property string _w_menuButtonImageDotArrowSource: "qrc:///images/arrow-right-medium-white.png"
|
||||
property string _w_inlineButtonTextColor: "white"
|
||||
property string _w_inlineButtonTextColor: "black"
|
||||
property string _w_inlineButtonBorderColor: "transparent"
|
||||
property string _w_appWindowBackgroundColor: "black"
|
||||
property string _w_appWindowBorderColor: "#dedede"
|
||||
|
||||
191
components/SuccessfulTxDialog.qml
Normal file
@@ -0,0 +1,191 @@
|
||||
// Copyright (c) 2014-2020, The Monero Project
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification, are
|
||||
// permitted provided that the following conditions are met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
// conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
// of conditions and the following disclaimer in the documentation and/or other
|
||||
// materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the copyright holder nor the names of its contributors may be
|
||||
// used to endorse or promote products derived from this software without specific
|
||||
// prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.1
|
||||
|
||||
import moneroComponents.Clipboard 1.0
|
||||
import "../components" as MoneroComponents
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
x: parent.width/2 - root.width/2
|
||||
y: parent.height/2 - root.height/2
|
||||
// TODO: implement without hardcoding sizes
|
||||
width: 580
|
||||
height: 400
|
||||
color: MoneroComponents.Style.blackTheme ? "black" : "white"
|
||||
visible: false
|
||||
radius: 10
|
||||
border.color: MoneroComponents.Style.blackTheme ? Qt.rgba(255, 255, 255, 0.25) : Qt.rgba(0, 0, 0, 0.25)
|
||||
border.width: 1
|
||||
focus: true
|
||||
Keys.enabled: true
|
||||
Keys.onEscapePressed: {
|
||||
root.close()
|
||||
root.rejected()
|
||||
}
|
||||
Keys.onEnterPressed: {
|
||||
root.close()
|
||||
root.accepted()
|
||||
}
|
||||
Keys.onReturnPressed: {
|
||||
root.close()
|
||||
root.accepted()
|
||||
}
|
||||
KeyNavigation.tab: doneButton
|
||||
|
||||
Clipboard { id: clipboard }
|
||||
|
||||
property var transactionID;
|
||||
|
||||
// same signals as Dialog has
|
||||
signal accepted()
|
||||
signal rejected()
|
||||
|
||||
function open(txid) {
|
||||
root.transactionID = txid;
|
||||
root.visible = true;
|
||||
root.forceActiveFocus();
|
||||
}
|
||||
|
||||
function close() {
|
||||
root.visible = false;
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
spacing: 10
|
||||
anchors.fill: parent
|
||||
anchors.margins: 25
|
||||
|
||||
ColumnLayout{
|
||||
Layout.topMargin: 10
|
||||
Layout.leftMargin: 0
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
|
||||
MoneroComponents.Label {
|
||||
fontSize: 18
|
||||
fontFamily: "Arial"
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: {
|
||||
if (appWindow.viewOnly){
|
||||
return qsTr("Transaction file successfully saved!") + translationManager.emptyString;
|
||||
} else {
|
||||
return qsTr("Transaction successfully sent!") + translationManager.emptyString;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Image {
|
||||
id: successImage
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
width: 140
|
||||
height: 140
|
||||
source: "qrc:///images/success.png"
|
||||
|
||||
SequentialAnimation{
|
||||
running: successImage.visible
|
||||
ScaleAnimator { target: successImage; from: 0.4; to: 1.3; duration: 125}
|
||||
ScaleAnimator { target: successImage; from: 1.3; to: 1; duration: 80}
|
||||
}
|
||||
}
|
||||
|
||||
MoneroComponents.LineEditMulti {
|
||||
visible: !appWindow.viewOnly
|
||||
Layout.leftMargin: 25
|
||||
Layout.rightMargin: 25
|
||||
borderDisabled: true
|
||||
readOnly: true
|
||||
copyButton: true
|
||||
wrapMode: Text.Wrap
|
||||
labelText: qsTr("Transaction ID:") + translationManager.emptyString
|
||||
text: root.transactionID ? root.transactionID : "";
|
||||
fontSize: 16
|
||||
}
|
||||
|
||||
MoneroComponents.LineEditMulti {
|
||||
visible: appWindow.viewOnly
|
||||
Layout.leftMargin: 25
|
||||
borderDisabled: true
|
||||
readOnly: true
|
||||
wrapMode: Text.Wrap
|
||||
labelText: qsTr("Transaction file location:") + translationManager.emptyString
|
||||
text: walletManager.urlToLocalPath(saveTxDialog.fileUrl)
|
||||
fontSize: 16
|
||||
}
|
||||
|
||||
// open folder / done buttons
|
||||
RowLayout {
|
||||
id: buttons
|
||||
spacing: 70
|
||||
Layout.alignment: Qt.AlignBottom | Qt.AlignHCenter
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 50
|
||||
|
||||
MoneroComponents.StandardButton {
|
||||
id: openFolderButton
|
||||
visible: appWindow.viewOnly
|
||||
text: qsTr("Open folder") + translationManager.emptyString;
|
||||
width: 200
|
||||
KeyNavigation.tab: doneButton
|
||||
Keys.enabled: openFolderButton.visible
|
||||
Keys.onReturnPressed: openFolderButton.onClicked
|
||||
Keys.onEnterPressed: openFolderButton.onClicked
|
||||
Keys.onEscapePressed: {
|
||||
root.close()
|
||||
root.rejected()
|
||||
}
|
||||
onClicked: {
|
||||
oshelper.openContainingFolder(walletManager.urlToLocalPath(saveTxDialog.fileUrl))
|
||||
}
|
||||
}
|
||||
|
||||
MoneroComponents.StandardButton {
|
||||
id: doneButton
|
||||
text: qsTr("Done") + translationManager.emptyString;
|
||||
width: 200
|
||||
focus: true
|
||||
KeyNavigation.tab: openFolderButton
|
||||
Keys.enabled: doneButton.visible
|
||||
Keys.onReturnPressed: doneButton.onClicked
|
||||
Keys.onEnterPressed: doneButton.onClicked
|
||||
Keys.onEscapePressed: {
|
||||
root.close()
|
||||
root.rejected()
|
||||
}
|
||||
onClicked: {
|
||||
root.close()
|
||||
root.accepted()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -38,14 +38,14 @@ import "effects/" as MoneroEffects
|
||||
Rectangle {
|
||||
id: root
|
||||
property int mouseX: 0
|
||||
property bool basicButtonVisible: false
|
||||
property bool customDecorations: persistentSettings.customDecorations
|
||||
property bool showMinimizeButton: true
|
||||
property bool showMaximizeButton: true
|
||||
property bool showCloseButton: true
|
||||
property string walletName: ""
|
||||
|
||||
height: {
|
||||
if(!persistentSettings.customDecorations || isMobile) return 0;
|
||||
if(!persistentSettings.customDecorations) return 0;
|
||||
return 50;
|
||||
}
|
||||
|
||||
@@ -56,18 +56,18 @@ Rectangle {
|
||||
signal maximizeClicked
|
||||
signal minimizeClicked
|
||||
signal languageClicked
|
||||
signal goToBasicVersion(bool yes)
|
||||
signal closeWalletClicked
|
||||
|
||||
state: "default"
|
||||
states: [
|
||||
State {
|
||||
name: "default";
|
||||
PropertyChanges { target: btnSidebarCollapse; visible: true}
|
||||
PropertyChanges { target: btnCloseWallet; visible: true}
|
||||
PropertyChanges { target: btnLanguageToggle; visible: true}
|
||||
}, State {
|
||||
// show only theme switcher and window controls
|
||||
name: "essentials";
|
||||
PropertyChanges { target: btnSidebarCollapse; visible: false}
|
||||
PropertyChanges { target: btnCloseWallet; visible: false}
|
||||
PropertyChanges { target: btnLanguageToggle; visible: false}
|
||||
}
|
||||
]
|
||||
@@ -93,22 +93,20 @@ Rectangle {
|
||||
|
||||
// collapse sidebar
|
||||
Rectangle {
|
||||
id: btnSidebarCollapse
|
||||
visible: root.basicButtonVisible
|
||||
id: btnCloseWallet
|
||||
color: "transparent"
|
||||
Layout.preferredWidth: parent.height
|
||||
Layout.preferredHeight: parent.height
|
||||
|
||||
MoneroEffects.ImageMask {
|
||||
|
||||
Text {
|
||||
text: FontAwesome.signOutAlt
|
||||
font.family: FontAwesome.fontFamilySolid
|
||||
font.pixelSize: 16
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
font.styleName: "Solid"
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
height: 14
|
||||
width: 14
|
||||
image: MoneroComponents.Style.titleBarExpandSource
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
fontAwesomeFallbackIcon: FontAwesome.cube
|
||||
fontAwesomeFallbackSize: 14
|
||||
fontAwesomeFallbackOpacity: MoneroComponents.Style.blackTheme ? 1.0 : 0.9
|
||||
opacity: 0.75
|
||||
}
|
||||
|
||||
@@ -118,7 +116,7 @@ Rectangle {
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onEntered: parent.color = MoneroComponents.Style.titleBarButtonHoverColor
|
||||
onExited: parent.color = "transparent"
|
||||
onClicked: root.goToBasicVersion(leftPanel.visible)
|
||||
onClicked: root.closeWalletClicked(leftPanel.visible)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,9 +129,10 @@ Rectangle {
|
||||
|
||||
Text {
|
||||
text: FontAwesome.globe
|
||||
font.family: FontAwesome.fontFamily
|
||||
font.family: FontAwesome.fontFamilySolid
|
||||
font.pixelSize: 16
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
font.styleName: "Solid"
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
opacity: 0.75
|
||||
@@ -156,9 +155,10 @@ Rectangle {
|
||||
Layout.preferredHeight: parent.height
|
||||
|
||||
Text {
|
||||
text: MoneroComponents.Style.blackTheme ? FontAwesome.lightbulbO : FontAwesome.moonO
|
||||
font.family: FontAwesome.fontFamily
|
||||
font.pixelSize: 16
|
||||
text: FontAwesome.moonO
|
||||
font.family: MoneroComponents.Style.blackTheme ? FontAwesome.fontFamilySolid : FontAwesome.fontFamily
|
||||
font.styleName: MoneroComponents.Style.blackTheme ? "Solid" : "Regular"
|
||||
font.pixelSize: 15
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
@@ -189,6 +189,7 @@ Rectangle {
|
||||
|
||||
// monero logo
|
||||
Item {
|
||||
visible: walletName.length === 0
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: parent.height
|
||||
|
||||
@@ -216,6 +217,22 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
visible: walletName.length > 0
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: parent.height
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
font.pixelSize: 20
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
elide: Text.ElideRight
|
||||
text: walletName
|
||||
}
|
||||
}
|
||||
|
||||
// minimize
|
||||
Rectangle {
|
||||
color: "transparent"
|
||||
@@ -292,8 +309,8 @@ Rectangle {
|
||||
width: 16
|
||||
image: MoneroComponents.Style.titleBarCloseSource
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
fontAwesomeFallbackIcon: FontAwesome.timesRectangle
|
||||
fontAwesomeFallbackSize: 18
|
||||
fontAwesomeFallbackIcon: FontAwesome.times
|
||||
fontAwesomeFallbackSize: 21
|
||||
fontAwesomeFallbackOpacity: MoneroComponents.Style.blackTheme ? 0.8 : 0.6
|
||||
opacity: 0.75
|
||||
}
|
||||
|
||||
204
components/UpdateDialog.qml
Normal file
@@ -0,0 +1,204 @@
|
||||
// Copyright (c) 2020, The Monero Project
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification, are
|
||||
// permitted provided that the following conditions are met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
// conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
// of conditions and the following disclaimer in the documentation and/or other
|
||||
// materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the copyright holder nor the names of its contributors may be
|
||||
// used to endorse or promote products derived from this software without specific
|
||||
// prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.2
|
||||
import QtQuick.Layouts 1.1
|
||||
|
||||
import moneroComponents.Downloader 1.0
|
||||
|
||||
import "../components" as MoneroComponents
|
||||
|
||||
Popup {
|
||||
id: updateDialog
|
||||
|
||||
property bool active: false
|
||||
property bool allowed: true
|
||||
property string error: ""
|
||||
property string filename: ""
|
||||
property string hash: ""
|
||||
property double progress: url && downloader.total > 0 ? downloader.loaded * 100 / downloader.total : 0
|
||||
property string url: ""
|
||||
property bool valid: false
|
||||
property string version: ""
|
||||
|
||||
background: Rectangle {
|
||||
border.color: MoneroComponents.Style.appWindowBorderColor
|
||||
border.width: 1
|
||||
color: MoneroComponents.Style.middlePanelBackgroundColor
|
||||
}
|
||||
closePolicy: Popup.NoAutoClose
|
||||
padding: 20
|
||||
visible: active && allowed
|
||||
|
||||
function show(version, url, hash) {
|
||||
updateDialog.error = "";
|
||||
updateDialog.hash = hash;
|
||||
updateDialog.url = url;
|
||||
updateDialog.valid = false;
|
||||
updateDialog.version = version;
|
||||
updateDialog.active = true;
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
id: mainLayout
|
||||
spacing: updateDialog.padding
|
||||
|
||||
Text {
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
font.bold: true
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: 18
|
||||
text: qsTr("New Monero version v%1 is available.").arg(updateDialog.version)
|
||||
}
|
||||
|
||||
Text {
|
||||
id: errorText
|
||||
color: "red"
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: 18
|
||||
text: updateDialog.error
|
||||
visible: text
|
||||
}
|
||||
|
||||
Text {
|
||||
id: statusText
|
||||
color: updateDialog.valid ? MoneroComponents.Style.green : MoneroComponents.Style.defaultFontColor
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: 18
|
||||
visible: !errorText.visible
|
||||
|
||||
text: {
|
||||
if (!updateDialog.url) {
|
||||
return qsTr("Please visit getmonero.org for details") + translationManager.emptyString;
|
||||
}
|
||||
if (downloader.active) {
|
||||
return "%1 (%2%)"
|
||||
.arg(qsTr("Downloading"))
|
||||
.arg(updateDialog.progress.toFixed(1))
|
||||
+ translationManager.emptyString;
|
||||
}
|
||||
if (updateDialog.valid) {
|
||||
return qsTr("Update downloaded, signature verified") + translationManager.emptyString;
|
||||
}
|
||||
return qsTr("Do you want to download and verify new version?") + translationManager.emptyString;
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: progressBar
|
||||
color: MoneroComponents.Style.lightGreyFontColor
|
||||
height: 3
|
||||
Layout.fillWidth: true
|
||||
visible: updateDialog.valid || downloader.active
|
||||
|
||||
Rectangle {
|
||||
color: MoneroComponents.Style.buttonBackgroundColor
|
||||
height: parent.height
|
||||
width: parent.width * updateDialog.progress / 100
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
spacing: parent.spacing
|
||||
|
||||
MoneroComponents.StandardButton {
|
||||
id: cancelButton
|
||||
fontBold: false
|
||||
primary: !updateDialog.url
|
||||
text: {
|
||||
if (!updateDialog.url) {
|
||||
return qsTr("Ok") + translationManager.emptyString;
|
||||
}
|
||||
if (updateDialog.valid || downloader.active || errorText.visible) {
|
||||
return qsTr("Cancel") + translationManager.emptyString;
|
||||
}
|
||||
return qsTr("Download later") + translationManager.emptyString;
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
downloader.cancel();
|
||||
updateDialog.active = false;
|
||||
}
|
||||
}
|
||||
|
||||
MoneroComponents.StandardButton {
|
||||
id: downloadButton
|
||||
KeyNavigation.tab: cancelButton
|
||||
fontBold: false
|
||||
text: (updateDialog.error ? qsTr("Retry") : qsTr("Download")) + translationManager.emptyString
|
||||
visible: updateDialog.url && !updateDialog.valid && !downloader.active
|
||||
|
||||
onClicked: {
|
||||
updateDialog.error = "";
|
||||
updateDialog.filename = updateDialog.url.replace(/^.*\//, '');
|
||||
const downloadingStarted = downloader.get(updateDialog.url, updateDialog.hash, function(error) {
|
||||
if (error) {
|
||||
console.error("Download failed", error);
|
||||
updateDialog.error = qsTr("Download failed") + translationManager.emptyString;
|
||||
} else {
|
||||
updateDialog.valid = true;
|
||||
}
|
||||
});
|
||||
if (!downloadingStarted) {
|
||||
updateDialog.error = qsTr("Failed to start download") + translationManager.emptyString;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MoneroComponents.StandardButton {
|
||||
id: saveButton
|
||||
KeyNavigation.tab: cancelButton
|
||||
fontBold: false
|
||||
onClicked: {
|
||||
const fullPath = oshelper.openSaveFileDialog(
|
||||
qsTr("Save as") + translationManager.emptyString,
|
||||
oshelper.downloadLocation(),
|
||||
updateDialog.filename);
|
||||
if (!fullPath) {
|
||||
return;
|
||||
}
|
||||
if (downloader.saveToFile(fullPath)) {
|
||||
cancelButton.clicked();
|
||||
oshelper.openContainingFolder(fullPath);
|
||||
} else {
|
||||
updateDialog.error = qsTr("Save operation failed") + translationManager.emptyString;
|
||||
}
|
||||
}
|
||||
text: qsTr("Save to file") + translationManager.emptyString
|
||||
visible: updateDialog.valid
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Downloader {
|
||||
id: downloader
|
||||
proxyAddress: persistentSettings.getProxyAddress()
|
||||
}
|
||||
}
|
||||
@@ -37,26 +37,26 @@ Rectangle {
|
||||
source: "qrc:///images/warning.png"
|
||||
}
|
||||
|
||||
TextArea {
|
||||
Text {
|
||||
id: content
|
||||
Layout.fillWidth: true
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: root.fontSize
|
||||
horizontalAlignment: TextInput.AlignLeft
|
||||
selectByMouse: true
|
||||
textFormat: Text.RichText
|
||||
wrapMode: Text.WordWrap
|
||||
textMargin: 0
|
||||
leftPadding: 4
|
||||
rightPadding: 18
|
||||
topPadding: 10
|
||||
bottomPadding: 10
|
||||
readOnly: true
|
||||
onLinkActivated: root.linkActivated();
|
||||
|
||||
selectionColor: MoneroComponents.Style.textSelectionColor
|
||||
selectedTextColor: MoneroComponents.Style.textSelectedColor
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.NoButton
|
||||
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,8 +39,9 @@ Item {
|
||||
id: root
|
||||
property string image: ""
|
||||
property string color: ""
|
||||
property bool fontAwesomeFallbackEnabled: true
|
||||
property var fontAwesomeFallbackIcon: ""
|
||||
property string fontAwesomeFallbackFont: FontAwesome.fontFamilySolid
|
||||
property string fontAwesomeFallbackStyle: "Solid"
|
||||
property int fontAwesomeFallbackSize: 16
|
||||
property double fontAwesomeFallbackOpacity: 0.8
|
||||
property string fontAwesomeFallbackColor: MoneroComponents.Style.defaultFontColor
|
||||
@@ -67,15 +68,16 @@ Item {
|
||||
anchors.fill: root
|
||||
source: svgMask
|
||||
color: root.color
|
||||
visible: isOpenGL
|
||||
visible: image && isOpenGL
|
||||
}
|
||||
|
||||
Text {
|
||||
id: fontAwesomeFallback
|
||||
visible: !isOpenGL && root.fontAwesomeFallback
|
||||
text: !isOpenGL ? root.fontAwesomeFallbackIcon : ""
|
||||
font.family: FontAwesome.fontFamily
|
||||
visible: !imgMockColor.visible
|
||||
text: root.fontAwesomeFallbackIcon
|
||||
font.family: root.fontAwesomeFallbackFont
|
||||
font.pixelSize: root.fontAwesomeFallbackSize
|
||||
font.styleName: root.fontAwesomeFallbackStyle
|
||||
color: root.fontAwesomeFallbackColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
||||
1
fonts/CMakeLists.txt
Normal file
@@ -0,0 +1 @@
|
||||
qt5_add_resources(RESOURCE_FILES *.otf)
|
||||
@@ -4,10 +4,23 @@ import QtQuick 2.9
|
||||
Object {
|
||||
|
||||
FontLoader {
|
||||
source: "./fontawesome-webfont.ttf"
|
||||
id: regular
|
||||
source: "./fa-regular-400.ttf"
|
||||
}
|
||||
|
||||
property string fontFamily: "FontAwesome"
|
||||
FontLoader {
|
||||
id: brands
|
||||
source: "./fa-brands-400.ttf"
|
||||
}
|
||||
|
||||
FontLoader {
|
||||
id: solid
|
||||
source: "./fa-solid-900.ttf"
|
||||
}
|
||||
|
||||
property string fontFamily: regular.name
|
||||
property string fontFamilyBrands: brands.name
|
||||
property string fontFamilySolid: solid.name
|
||||
|
||||
// Icons
|
||||
property string addressBook : "\uf2b9"
|
||||
@@ -136,6 +149,7 @@ Object {
|
||||
property string caretUp : "\uf0d8"
|
||||
property string cartArrowDown : "\uf218"
|
||||
property string cartPlus : "\uf217"
|
||||
property string cashRegister: "\uf788"
|
||||
property string cc : "\uf20a"
|
||||
property string ccAmex : "\uf1f3"
|
||||
property string ccDinersClub : "\uf24c"
|
||||
@@ -594,6 +608,7 @@ Object {
|
||||
property string shower : "\uf2cc"
|
||||
property string signIn : "\uf090"
|
||||
property string signLanguage : "\uf2a7"
|
||||
property string signOutAlt : "\uf2f5"
|
||||
property string signOut : "\uf08b"
|
||||
property string signal : "\uf012"
|
||||
property string signing : "\uf2a7"
|
||||
|
||||
BIN
fonts/FontAwesome/fa-brands-400.ttf
Normal file
BIN
fonts/FontAwesome/fa-regular-400.ttf
Normal file
BIN
fonts/FontAwesome/fa-solid-900.ttf
Normal file
@@ -17,7 +17,7 @@ if [ ! -d $MONERO_DIR/src ]; then
|
||||
fi
|
||||
git submodule update --remote
|
||||
git -C $MONERO_DIR fetch
|
||||
git -C $MONERO_DIR checkout origin/master
|
||||
git -C $MONERO_DIR checkout v0.17.1.0
|
||||
|
||||
# get monero core tag
|
||||
pushd $MONERO_DIR
|
||||
@@ -140,13 +140,40 @@ platform=$(get_platform)
|
||||
# default make executable
|
||||
make_exec="make"
|
||||
|
||||
if [ -z "$ARCH" ]; then
|
||||
ARCH="native"
|
||||
if [ "$platform" == "darwin" ]; then
|
||||
if [ "$STATIC" == true ]; then
|
||||
ARCH="x86-64"
|
||||
fi
|
||||
elif [ "$platform" == "linux64" ]; then
|
||||
if [ "$ANDROID" == true ]; then
|
||||
ARCH="armv7-a"
|
||||
elif [ "$STATIC" == true ]; then
|
||||
ARCH="x86-64"
|
||||
fi
|
||||
elif [ "$platform" == "linux32" ]; then
|
||||
if [ "$STATIC" == true ]; then
|
||||
ARCH="i686"
|
||||
fi
|
||||
elif [ "$platform" == "linuxarmv7" ]; then
|
||||
ARCH="armv7-a"
|
||||
elif [ "$platform" == "mingw32" ]; then
|
||||
ARCH="i686"
|
||||
elif [ "$platform" == "mingw64" ]; then
|
||||
ARCH="x86-64"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Building for ARCH=$ARCH"
|
||||
|
||||
## OS X
|
||||
if [ "$platform" == "darwin" ]; then
|
||||
echo "Configuring build for MacOS.."
|
||||
if [ "$STATIC" == true ]; then
|
||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="$ARCH" -D BUILD_64=ON -D BUILD_TAG="mac-x64" -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
||||
else
|
||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D ARCH="$ARCH" -D BUILD_TAG="mac-x64" -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
||||
fi
|
||||
|
||||
## LINUX 64
|
||||
@@ -154,38 +181,38 @@ elif [ "$platform" == "linux64" ]; then
|
||||
echo "Configuring build for Linux x64"
|
||||
if [ "$ANDROID" == true ]; then
|
||||
echo "Configuring build for Android on Linux host"
|
||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="armv7-a" -D ANDROID=true -D BUILD_GUI_DEPS=ON -D USE_LTO=OFF -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="$ARCH" -D ANDROID=true -D BUILD_GUI_DEPS=ON -D USE_LTO=OFF -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
||||
elif [ "$STATIC" == true ]; then
|
||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="$ARCH" -D BUILD_64=ON -D BUILD_TAG="linux-x64" -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
||||
else
|
||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D BUILD_GUI_DEPS=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D ARCH="$ARCH" -D BUILD_TAG="linux-x64" -D BUILD_GUI_DEPS=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
||||
fi
|
||||
|
||||
## LINUX 32
|
||||
elif [ "$platform" == "linux32" ]; then
|
||||
echo "Configuring build for Linux i686"
|
||||
if [ "$STATIC" == true ]; then
|
||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="i686" -D BUILD_64=OFF -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="$ARCH" -D BUILD_64=OFF -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
||||
else
|
||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D BUILD_GUI_DEPS=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D ARCH="$ARCH" -D BUILD_GUI_DEPS=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
||||
fi
|
||||
|
||||
## LINUX ARMv7
|
||||
elif [ "$platform" == "linuxarmv7" ]; then
|
||||
echo "Configuring build for Linux armv7"
|
||||
if [ "$STATIC" == true ]; then
|
||||
cmake -D BUILD_TESTS=OFF -D ARCH="armv7-a" -D STATIC=ON -D BUILD_64=OFF -D BUILD_GUI_DEPS=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
||||
cmake -D BUILD_TESTS=OFF -D ARCH="$ARCH" -D STATIC=ON -D BUILD_64=OFF -D BUILD_GUI_DEPS=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
||||
else
|
||||
cmake -D BUILD_TESTS=OFF -D ARCH="armv7-a" -D -D BUILD_64=OFF -D BUILD_GUI_DEPS=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
||||
cmake -D BUILD_TESTS=OFF -D ARCH="$ARCH" -D BUILD_64=OFF -D BUILD_GUI_DEPS=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
||||
fi
|
||||
|
||||
## LINUX other
|
||||
elif [ "$platform" == "linux" ]; then
|
||||
echo "Configuring build for Linux general"
|
||||
if [ "$STATIC" == true ]; then
|
||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="$ARCH" -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
||||
else
|
||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D BUILD_GUI_DEPS=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D ARCH="$ARCH" -D BUILD_GUI_DEPS=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
||||
fi
|
||||
|
||||
## Windows 64
|
||||
@@ -194,21 +221,21 @@ elif [ "$platform" == "mingw64" ]; then
|
||||
# Do something under Windows NT platform
|
||||
echo "Configuring build for MINGW64.."
|
||||
BOOST_ROOT=/mingw64/boost
|
||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D BOOST_ROOT="$BOOST_ROOT" -D ARCH="x86-64" -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" -G "MSYS Makefiles" -D CMAKE_TOOLCHAIN_FILE=../../cmake/64-bit-toolchain.cmake -D MSYS2_FOLDER=c:/msys64 ../..
|
||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D BOOST_ROOT="$BOOST_ROOT" -D ARCH="$ARCH" -D BUILD_TAG="win-x64" -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" -G "MSYS Makefiles" -D CMAKE_TOOLCHAIN_FILE=../../cmake/64-bit-toolchain.cmake -D MSYS2_FOLDER=$(cd $MINGW_PREFIX/.. && pwd -W) ../..
|
||||
|
||||
## Windows 32
|
||||
elif [ "$platform" == "mingw32" ]; then
|
||||
# Do something under Windows NT platform
|
||||
echo "Configuring build for MINGW32.."
|
||||
BOOST_ROOT=/mingw32/boost
|
||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D Boost_DEBUG=ON -D BOOST_ROOT="$BOOST_ROOT" -D ARCH="i686" -D BUILD_64=OFF -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" -G "MSYS Makefiles" -D CMAKE_TOOLCHAIN_FILE=../../cmake/32-bit-toolchain.cmake -D MSYS2_FOLDER=c:/msys32 ../..
|
||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D Boost_DEBUG=ON -D BOOST_ROOT="$BOOST_ROOT" -D ARCH="$ARCH" -D BUILD_64=OFF -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" -G "MSYS Makefiles" -D CMAKE_TOOLCHAIN_FILE=../../cmake/32-bit-toolchain.cmake -D MSYS2_FOLDER=$(cd $MINGW_PREFIX/.. && pwd -W) ../..
|
||||
make_exec="mingw32-make"
|
||||
else
|
||||
echo "Unknown platform, configuring general build"
|
||||
if [ "$STATIC" == true ]; then
|
||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D BUILD_GUI_DEPS=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="$ARCH" -D BUILD_GUI_DEPS=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
||||
else
|
||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D BUILD_GUI_DEPS=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D ARCH="$ARCH" -D BUILD_GUI_DEPS=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -253,4 +280,7 @@ if [ -d $MONERO_DIR/build/$BUILD_TYPE/external/unbound ]; then
|
||||
popd
|
||||
fi
|
||||
|
||||
# install randomx
|
||||
eval make -C $MONERO_DIR/build/$BUILD_TYPE/external/randomx all install
|
||||
|
||||
popd
|
||||
|
||||
1
images/CMakeLists.txt
Normal file
@@ -0,0 +1 @@
|
||||
qt5_add_resources(RESOURCE_FILES *.png)
|
||||
BIN
images/busy-indicator.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
images/busy-indicator@2x.png
Normal file
|
After Width: | Height: | Size: 7.3 KiB |
BIN
images/card-background-black.png
Executable file
|
After Width: | Height: | Size: 24 KiB |
BIN
images/card-background-black@2x.png
Executable file
|
After Width: | Height: | Size: 68 KiB |
BIN
images/card-background-white.png
Executable file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
images/card-background-white@2x.png
Executable file
|
After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 87 KiB |
|
Before Width: | Height: | Size: 214 B |
|
Before Width: | Height: | Size: 255 B |
|
Before Width: | Height: | Size: 246 B |
|
Before Width: | Height: | Size: 323 B |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 493 B |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 419 B |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 436 B |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 612 B |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 170 B |
|
Before Width: | Height: | Size: 170 B |
2
images/monero-vector.svg
Normal file
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg version="1.1" viewBox="0 0 6000 6000" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><metadata><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/></cc:Work></rdf:RDF></metadata><defs><clipPath id="a"><path d="m0 4500h4500v-4500h-4500z"/></clipPath></defs><g transform="matrix(1.3333 0 0 -1.3333 0 6e3)"><g clip-path="url(#a)"><g transform="translate(4128 2250.2)"><path d="m0 0c0-1037.2-840.79-1878.1-1878.1-1878.1-1037.2 0-1878 840.88-1878 1878.1 0 1037.3 840.8 1878.1 1878 1878.1 1037.3 0 1878.1-840.79 1878.1-1878.1" fill="#fff"/></g><g transform="translate(2250 4128.2)"><path d="m0 0c-1036.9 0-1879.1-842.06-1877.8-1878 0.262-207.26 33.308-406.63 95.342-593.12h561.88v1579.9l1220.6-1220.6 1220.6 1220.6v-1579.9h561.96c62.117 186.48 95.008 385.85 95.369 593.12 1.809 1037-840.89 1877.8-1877.9 1877.8z" fill="#f36e36"/></g><g transform="translate(1969.3 1735.8)"><path d="m0 0-532.67 532.7v-994.14h-407.26l-384.29-0.07c329.63-540.8 925.35-902.56 1604.9-902.56 679.54 0 1275.3 361.85 1605 902.65l-384.44-0.013h-407.27v994.14l-813.3-813.31-280.62 280.61z" fill="#575757"/></g></g></g></svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 596 B |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 399 B |
|
Before Width: | Height: | Size: 760 B |
|
Before Width: | Height: | Size: 193 B |
|
Before Width: | Height: | Size: 195 B |
|
Before Width: | Height: | Size: 440 B |
|
Before Width: | Height: | Size: 575 B |