Compare commits

...

609 Commits

Author SHA1 Message Date
luigi1111
43f378b7d2 Merge pull request #2644
3c6a1e4 wizard: fix mode selection back button (selsta)
2019-12-23 09:30:21 -05:00
luigi1111
b73551d6ab Merge pull request #2643
3528bcd main: show wizard init screen when no wallet is found (selsta)
2019-12-23 09:29:15 -05:00
luigi1111
632d82ac95 Merge pull request #2640
c5785ed main: fix wallet lock is unlocked without password (selsta)
2019-12-23 09:28:21 -05:00
luigi1111
3fb775de28 Merge pull request #2680
6d0593a build: fix build on Ubuntu 16.04 GCC 5.4 (missing includes) (xiphon)
2019-12-23 09:06:27 -05:00
luigi1111
82affff63f Merge pull request #2679
13ea403 FutureScheduler: drop moveToThread, setParent might silently fail (xiphon)
2019-12-23 09:05:09 -05:00
xiphon
6d0593a26b build: fix build on Ubuntu 16.04 GCC 5.4 (missing includes) 2019-12-23 12:01:41 +00:00
xiphon
13ea4035b5 FutureScheduler: drop moveToThread, setParent might silently fail 2019-12-23 11:35:47 +00:00
luigi1111
1c97e9796d Merge pull request #2601
4a86a1c remove colored dots (tobtoht)
2019-12-21 18:43:06 -05:00
luigi1111
4eca4194b7 Merge pull request #2675
3f4f6f0 misc: remove unused components (tobtoht)
2019-12-21 18:16:01 -05:00
luigi1111
5c801ec2ad Merge pull request #2674
ded0a4d Scrollbar: don't autohide if enabled (except on Mac) (tobtoht)
2019-12-21 18:15:09 -05:00
luigi1111
7f324fb3e6 Merge pull request #2673
6a5de80 Add *.autosave (tobtoht)
2019-12-21 18:14:17 -05:00
luigi1111
710159a236 Merge pull request #2670
1fef418 main: enable high DPI scaling (selsta)
2019-12-21 18:12:46 -05:00
luigi1111
7afbcc9855 Merge pull request #2665
c6c094b SettingsWallet: cleanup on wallet close (xiphon)
2019-12-21 18:10:59 -05:00
luigi1111
8d0647d677 Merge pull request #2650
10dea60 Settings: fix page height (tobtoht)
2019-12-21 18:09:53 -05:00
luigi1111
9a5296f00e Merge pull request #2648
beeddea build: add application icon on Windows (xiphon)
2019-12-21 18:07:53 -05:00
luigi1111
6f53cc4dda Merge pull request #2645
66f6b95 Account: update balance card label (selsta)
2019-12-21 18:07:07 -05:00
luigi1111
86f573f02c Merge pull request #2642
f8262b0 misc: cleanup unused variables and comments (selsta)
2019-12-21 18:06:17 -05:00
thotbot
ded0a4da48 Scrollbar: don't autohide if enabled (except on Mac) 2019-12-21 18:33:36 +00:00
thotbot
3f4f6f01dc misc: remove unused components 2019-12-21 15:13:23 +00:00
thotbot
6a5de80bd9 Add *.autosave 2019-12-21 11:16:43 +00:00
selsta
1fef418adb main: enable high DPI scaling 2019-12-21 06:31:25 +01:00
xiphon
c6c094bbd5 SettingsWallet: cleanup on wallet close 2019-12-20 19:28:17 +00:00
thotbot
10dea6073b Settings: fix page height 2019-12-20 16:15:36 +00:00
xiphon
beeddea678 build: add application icon on Windows 2019-12-20 13:27:47 +00:00
selsta
66f6b95b5c Account: update balance card label 2019-12-20 07:29:19 +01:00
selsta
3c6a1e45d7 wizard: fix mode selection back button 2019-12-20 06:32:42 +01:00
selsta
3528bcd6b5 main: show wizard init screen when no wallet is found 2019-12-20 03:49:31 +01:00
selsta
f8262b0d27 misc: cleanup unused variables and comments 2019-12-20 03:37:52 +01:00
selsta
c5785ed195 main: fix wallet lock is unlocked without password 2019-12-20 02:20:12 +01:00
luigi1111
500c7ec82e Merge pull request #2591
3e07eca main: blur on PasswordDialog, InputDialog or ProcessingSplash (xiphon)
2019-12-19 20:06:42 -05:00
xiphon
3e07ecabf9 main: blur on PasswordDialog, InputDialog or ProcessingSplash 2019-12-20 01:04:36 +00:00
luigi1111
98279f54fb Merge pull request #2635
aa96e2f build: define QT_NO_DEBUG for non--debug targets (xiphon)
2019-12-19 19:51:05 -05:00
luigi1111
a6818cd274 Merge pull request #2632
d6ccae3 Transfer: cleanup payment id code (tobtoht)
2019-12-19 19:50:11 -05:00
luigi1111
4c7d402eaf Merge pull request #2631
ec83dea build: support DEV_MODE env var to override default value (xiphon)
2019-12-19 19:49:06 -05:00
luigi1111
3984f8d1e8 Merge pull request #2630
3ea329e FutureScheduler: fix possible race, connect before setFuture (xiphon)
2019-12-19 19:48:10 -05:00
luigi1111
f2424ddeaa Merge pull request #2627
8c51172 Subaddress: fix use-after-free on accessing stale Wallet API data (xiphon)
2019-12-19 19:46:45 -05:00
luigi1111
b963028f10 Merge pull request #2626
a83adb7 Transfer: improve warning flow (tobtoht)
2019-12-19 19:45:33 -05:00
luigi1111
4aac66a024 Merge pull request #2625
131769f fix dropdown closure behavior (tobtoht)
2019-12-19 19:43:32 -05:00
luigi1111
598de0f03f Merge pull request #2623
c9900c0 SubaddressAccount: drop useless getAll 'update' default argument (xiphon)
e0ab9aa SubaddressAccount: fix use-after-free bug (xiphon)
2019-12-19 19:37:27 -05:00
luigi1111
bd3b26c33d Merge pull request #2604
50cb726 do not ask to start daemon if in remote node mode (tobtoht)
2019-12-19 19:36:17 -05:00
luigi1111
66f5b7310f Merge pull request #2622
94561ed fix clunky scrolling behavior on flickables (tobtoht)
2019-12-19 19:35:22 -05:00
luigi1111
5ff030783a Merge pull request #2616
5dccde2 History: don't hide 'Export all history' if there ain't any txes (xiphon)
2019-12-19 19:34:08 -05:00
luigi1111
7c11ac4d98 Merge pull request #2614
4e1f734 TransactionHistory: fix use-after-free bugs (xiphon)
2019-12-19 19:32:37 -05:00
luigi1111
05a0d21f4c Merge pull request #2590
cc86795 WizardController: always close and re-open newly created wallet (xiphon)
2019-12-19 19:30:32 -05:00
luigi1111
d0c2740a51 Merge pull request #2588
a113670 History: don't show empty paymentId in tx details (xiphon)
2019-12-19 19:29:36 -05:00
luigi1111
118752e775 Merge pull request #2587
1661c82 TransactionInfo: parse Wallet API provided data on initialization (xiphon)
2019-12-19 19:23:06 -05:00
luigi1111
1ed02f7d7a Merge pull request #2581
872b49f CMakeLists: remove duplicated x11 (selsta)
2019-12-19 19:21:55 -05:00
luigi1111
4042186fac Merge pull request #2580
ba24fd7 SettingsInfo: open containing folder on wallet log path click (xiphon)
088d32e OSHelper: file preselection support (Windows and Mac) (xiphon)
2019-12-19 19:20:53 -05:00
luigi1111
abd98b95f6 Merge pull request #2578
38d412a components: handle enter and return (selsta)
2019-12-19 19:19:32 -05:00
thotbot
d6ccae342d Transfer: cleanup payment id code 2019-12-20 00:18:52 +00:00
luigi1111
78f8cb2595 Merge pull request #2576
b940ad7 InputDialog: pre-populate input text (selsta)
2019-12-19 19:18:03 -05:00
xiphon
aa96e2ff3e build: define QT_NO_DEBUG for non--debug targets 2019-12-19 15:13:10 +00:00
xiphon
ec83dea3c3 build: support DEV_MODE env var to override default value 2019-12-19 00:52:26 +00:00
xiphon
3ea329e45f FutureScheduler: fix possible race, connect before setFuture 2019-12-19 00:37:00 +00:00
thotbot
a83adb70ad Transfer: improve warning flow 2019-12-19 00:16:00 +00:00
thotbot
94561ed2a6 fix clunky scrolling behavior on flickables 2019-12-17 23:11:11 +00:00
xiphon
8c511722e0 Subaddress: fix use-after-free on accessing stale Wallet API data 2019-12-17 21:51:04 +00:00
thotbot
131769f175 fix dropdown closure behavior 2019-12-17 20:21:04 +00:00
thotbot
4a86a1cf76 remove colored dots 2019-12-17 15:04:23 +00:00
xiphon
e0ab9aa898 SubaddressAccount: fix use-after-free bug 2019-12-17 14:18:54 +00:00
xiphon
cc86795fa3 WizardController: always close and re-open newly created wallet 2019-12-17 01:08:08 +00:00
thotbot
50cb72656a do not ask to start daemon if in remote node mode 2019-12-16 22:48:35 +00:00
xiphon
c9900c05b2 SubaddressAccount: drop useless getAll 'update' default argument 2019-12-16 14:35:50 +00:00
xiphon
4e1f7349c4 TransactionHistory: fix use-after-free bugs 2019-12-16 13:31:31 +00:00
xiphon
5dccde25f4 History: don't hide 'Export all history' if there ain't any txes 2019-12-16 09:30:23 +00:00
xiphon
a113670905 History: don't show empty paymentId in tx details 2019-12-13 10:42:47 +00:00
xiphon
1661c82449 TransactionInfo: parse Wallet API provided data on initialization 2019-12-12 21:26:18 +00:00
xiphon
088d32e712 OSHelper: file preselection support (Windows and Mac)
Co-authored-by: selsta <selsta@sent.at>
2019-12-12 01:28:49 +00:00
xiphon
ba24fd79bb SettingsInfo: open containing folder on wallet log path click 2019-12-12 00:10:22 +00:00
luigi1111
46227bdad0 Merge pull request #2531
2833fdb cmake: use appropriate compiler flags (xiphon)
17ea26e build: fix monero-wallet-gui.pro source paths, rm qml.qrc duplicate (xiphon)
2019-12-09 22:05:22 -06:00
selsta
872b49f29a CMakeLists: remove duplicated x11 2019-12-10 03:01:02 +01:00
selsta
38d412a3fa components: handle enter and return 2019-12-10 02:52:15 +01:00
xiphon
2833fdb907 cmake: use appropriate compiler flags 2019-12-09 22:49:42 +00:00
selsta
b940ad72be InputDialog: pre-populate input text 2019-12-09 17:38:09 +01:00
xiphon
17ea26e02a build: fix monero-wallet-gui.pro source paths, rm qml.qrc duplicate 2019-12-09 14:03:24 +00:00
luigi1111
1cee81b996 Merge pull request #2404
8dd2a20 e04db92 d06ae80 c83c74d 1723d04 52182ef 97a9ac9 2d23917 91aff7c (TheCharlatan)
2019-12-09 07:52:41 -06:00
luigi1111
f03ea0461c Merge pull request #2560
6ce9a3c History: fix translations (xiphon)
2019-12-05 09:35:52 -06:00
xiphon
6ce9a3cba0 History: fix translations 2019-12-05 15:18:15 +00:00
luigi1111
8cd32987d4 Revert "Merge pull request #2526"
This reverts commit 457b1dee49, reversing
changes made to 7cca39ad48.
2019-12-05 09:03:56 -06:00
luigi1111
648b775a25 Merge pull request #2559
e81a589 Transfer: improve amount sanitization (xiphon)
2019-12-05 08:53:47 -06:00
luigi1111
b24ccc2fe3 Merge pull request #2558
074d8fb WizardLang: fix display text (selsta)
2019-12-05 08:52:57 -06:00
luigi1111
00783e7b68 Merge pull request #2557
b632d07 WizardRestoreWallet1: fix placeholder text visibility (selsta)
2019-12-05 08:52:11 -06:00
luigi1111
dafc47050a Merge pull request #2556
1c2920a WizardAskPassword: fix lock icon (selsta)
2019-12-05 08:51:05 -06:00
luigi1111
0e65d89172 Merge pull request #2555
676b8d6 History: add date, amount, integrated addr (incoming) to tx details (xiphon)
2019-12-05 08:50:15 -06:00
luigi1111
fd9e7d00ed Merge pull request #2553
9d5eb00 TransactionHistory: guard tx info list against concurrent access (xiphon)
2019-12-05 08:49:14 -06:00
luigi1111
3d7ded209a Merge pull request #2540
983a3ba Translation: fix untranslated strings (selsta)
2019-12-05 08:47:54 -06:00
xiphon
e81a589a8d Transfer: improve amount sanitization 2019-12-05 10:13:29 +00:00
selsta
074d8fb42e WizardLang: fix display text 2019-12-04 23:18:44 +01:00
selsta
b632d078e5 WizardRestoreWallet1: fix placeholder text visibility 2019-12-04 23:05:42 +01:00
selsta
1c2920a339 WizardAskPassword: fix lock icon 2019-12-04 22:24:08 +01:00
xiphon
676b8d6921 History: add date, amount, integrated addr (incoming) to tx details 2019-12-04 21:07:10 +00:00
xiphon
9d5eb002ae TransactionHistory: guard tx info list against concurrent access 2019-12-04 10:33:54 +00:00
luigi1111
63d4ba6df8 Merge pull request #2551
646d339 Wallet: persistent subaddress account selection (xiphon)
2019-12-03 22:32:58 -06:00
luigi1111
c2dbda63c6 Merge pull request #2543
bc40942 StandardDropdown: implement automatic closing (xiphon)
2019-12-03 22:32:10 -06:00
luigi1111
6e7b4ff9f9 Merge pull request #2542
32f7666 DatePicker: don't propagate mouse events to underlying controls (xiphon)
2019-12-03 22:31:20 -06:00
luigi1111
1269f0a13a Merge pull request #2532
265afe1 DaemonManager: increase daemon start timeout to 120 seconds (xiphon)
2019-12-03 22:30:22 -06:00
luigi1111
04b91e76f2 Merge pull request #2529
4cc3d3f Label: change cursor on link hover (selsta)
2019-12-03 22:29:14 -06:00
luigi1111
c9c7bb9171 Merge pull request #2528
2ab3d8e MiddlePanel: remove margin bottom (selsta)
2019-12-03 22:27:37 -06:00
luigi1111
619661a61d Merge pull request #2527
c06cb5c MiddlePanel: remove color stripe for consistency (selsta)
2019-12-03 22:26:51 -06:00
luigi1111
457b1dee49 Merge pull request #2526
20a5814 Transfer: add parenthesis to links (selsta)
2019-12-03 22:26:00 -06:00
luigi1111
7cca39ad48 Merge pull request #2520
7b0cd19 wizard: Language button on home and add back button (selsta)
2019-12-03 22:24:06 -06:00
luigi1111
90406dfd1e Merge pull request #2517
9e4bfb1 WarningBox: hover cursor and disable selecting text (selsta)
2019-12-03 22:22:45 -06:00
luigi1111
6d7abaf5c0 Merge pull request #2515
c0fa4f5 SettingsLayout: pointing mouse cursor and selecting text (selsta)
2019-12-03 22:21:51 -06:00
xiphon
bc40942889 StandardDropdown: implement automatic closing 2019-12-03 22:45:15 +00:00
xiphon
646d3394d3 Wallet: persistent subaddress account selection 2019-12-03 12:39:34 +00:00
selsta
c06cb5cc58 MiddlePanel: remove color stripe for consistency 2019-12-02 23:19:31 +01:00
selsta
983a3ba7ad Translation: fix untranslated strings 2019-12-02 00:09:43 +01:00
xiphon
265afe1610 DaemonManager: increase daemon start timeout to 120 seconds 2019-11-29 17:24:40 +00:00
xiphon
32f7666912 DatePicker: don't propagate mouse events to underlying controls 2019-11-29 17:22:00 +00:00
selsta
20a58143b6 Transfer: add parenthesis to links 2019-11-28 12:25:33 +01:00
selsta
4cc3d3f3e2 Label: change cursor on link hover 2019-11-28 00:59:44 +01:00
selsta
2ab3d8ebf2 MiddlePanel: remove margin bottom 2019-11-28 00:55:00 +01:00
selsta
9e4bfb1ef2 WarningBox: hover cursor and disable selecting text 2019-11-28 00:08:59 +01:00
xiphon
97a9ac9bf8 cmake: don't force LINUX=ON, DEBUG=ON, CMAKE_BUILD_TYPE=Release 2019-11-27 22:59:27 +01:00
xiphon
2d23917afb cmake: MinGW - set WIN32 executable property 2019-11-27 22:59:27 +01:00
xiphon
52182ef9b1 cmake: fix MinGW static builds, add 'release-static-win64' target 2019-11-27 22:59:27 +01:00
xiphon
91aff7c0e4 cmake: put monero-gui executable into 'bin' directory 2019-11-27 22:59:27 +01:00
xiphon
1723d04902 cmake: inherit ARCH_WIDTH from 'monero' subdirectory 2019-11-27 22:59:27 +01:00
TheCharlatan
c83c74d3c2 Add Apple support 2019-11-27 22:59:27 +01:00
TheCharlatan
d06ae80e0a Add support for msys/mingw32 2019-11-27 22:59:27 +01:00
TheCharlatan
8dd2a20ff8 Migrate build system to cmake
The content in this commit is not split in order to preserve working
compilation. Once this is added to master, the old build script will no
longer work and all existing build toolings will require changes.

Monero's cmake directory's files need to be copied to this project's cmake
directory in order for the linking and function definitions to work correctly.

Monero-gui has its own version check and generate file in order to not
conflict with monero's destination version files.

Most of the source files that are currently in monero-gui's root
directory are now moved to subdirectories. This is done to preserve
compilation order properly and to give some content structure.

The original CMakeList file included all headers it found in
subdirectories. Make sure that they are set manually to evade linking
errors.

The current build script always checks out latest master of the monero
submodule. The submodule rules in the current CMakeLists.txt file do not
enforce. An override to compile master nevertheless can still be given
with `-D DEV_MODE`.

To enable the linux X11 xcb linking the libraries had to be hardcoded. There
does not seem to be good support for this in pkgconfig, or in
existing cmake checks.
2019-11-27 22:59:27 +01:00
TheCharlatan
e04db9299d Add dsc's CMakeLists.txt file 2019-11-27 22:59:27 +01:00
selsta
7b0cd19487 wizard: Language button on home and add back button 2019-11-27 19:20:58 +01:00
selsta
c0fa4f5d27 SettingsLayout: pointing mouse cursor and selecting text 2019-11-27 18:49:18 +01:00
luigi1111
d5f4d5d93f Merge pull request #2506
f47335f Wizard, AddressBook, SettingsNode: prevent undesired text selection (xiphon)
2019-11-27 10:26:03 -06:00
luigi1111
9ba1960207 Merge pull request #2504
f75aa22 main: omit onWalletRefresh call with uninitialized currentWallet (xiphon)
2019-11-27 10:24:54 -06:00
luigi1111
04a665db0c Merge pull request #2449
4a52681 workflows: check if QML loads successfully (selsta)
2019-11-27 10:23:45 -06:00
xiphon
f47335f89f Wizard, AddressBook, SettingsNode: prevent undesired text selection 2019-11-27 12:33:30 +00:00
xiphon
f75aa22b26 main: omit onWalletRefresh call with uninitialized currentWallet 2019-11-27 09:14:35 +00:00
luigi1111
50e1ce1460 Merge pull request #2502
bd20626 Installer: fix 'GUI Wallet Guide' shortcut target filename (xiphon)
2019-11-26 15:18:25 -06:00
luigi1111
df02532fd5 Merge pull request #2500
8738210 PasswordDialog: fix text field height changing on input (Windows) (xiphon)
2019-11-26 15:17:38 -06:00
xiphon
bd20626460 Installer: fix 'GUI Wallet Guide' shortcut target filename 2019-11-26 16:25:24 +00:00
xiphon
8738210991 PasswordDialog: fix text field height changing on input (Windows) 2019-11-26 16:09:09 +00:00
luigi1111
6c2c17ada1 Merge pull request #2489
0daf2aa CheckBox: use Font Awesome plus/minus icons, remove unused images (xiphon)
2019-11-25 12:57:28 -06:00
luigi1111
380f218b3a Merge pull request #2494
56023fa build: MacOS openssl path provided by brew, fallback to default (xiphon)
2019-11-25 12:49:05 -06:00
luigi1111
12647fac73 Merge pull request #2491
1dc45ba Input: fix cursor shape, should be 'Qt.IBeamCursor' (xiphon)
2019-11-25 12:47:26 -06:00
luigi1111
9f0f40af80 Merge pull request #2486
06ccded Transfer: fix NaN fiat conversion (selsta)
2019-11-25 12:46:09 -06:00
luigi1111
c316fab29f Merge pull request #2485
ff38e96 build: set BUILD_TAG to fix update notification (selsta)
2019-11-25 12:45:22 -06:00
luigi1111
37de27d7f6 Merge pull request #2477
a9a59fd main: ask whether to stop local node upon switching to remote node (xiphon)
2019-11-25 12:44:28 -06:00
luigi1111
c61d857a67 Merge pull request #2464
e2a187f AppWindow: append wallet name to window title (xiphon)
2019-11-25 12:43:31 -06:00
xiphon
56023facaa build: MacOS openssl path provided by brew, fallback to default 2019-11-25 14:46:18 +00:00
xiphon
1dc45bad87 Input: fix cursor shape, should be 'Qt.IBeamCursor' 2019-11-25 07:56:30 +00:00
xiphon
0daf2aacf5 CheckBox: use Font Awesome plus/minus icons, remove unused images 2019-11-25 06:37:21 +00:00
selsta
06ccded94e Transfer: fix NaN fiat conversion 2019-11-25 00:57:59 +01:00
selsta
ff38e965bd build: set BUILD_TAG to fix update notification 2019-11-25 00:27:29 +01:00
xiphon
a9a59fd314 main: ask whether to stop local node upon switching to remote node 2019-11-24 10:19:40 +00:00
xiphon
e2a187f892 AppWindow: append wallet name to window title 2019-11-24 08:49:59 +00:00
selsta
4a526810ce workflows: check if QML loads successfully 2019-11-20 15:32:42 +01:00
luigi1111
2f5c47e95f Merge pull request #2448
d2b9d56 ContextMenu: styling, implement ContextMenuItem component (xiphon)
2019-11-19 10:36:34 -06:00
luigi1111
34b216e6dc Merge pull request #2444
5a65d28 build: set submodule to v0.15.0.1 (selsta)
2019-11-19 10:35:25 -06:00
xiphon
d2b9d5690b ContextMenu: styling, implement ContextMenuItem component 2019-11-19 12:32:53 +00:00
luigi1111
d10f1b5d30 Merge pull request #2447
d92cc94 readme: add 'zeromq-devel' to Fedora deps (xiphon)
2019-11-18 13:00:54 -06:00
luigi1111
fea3bb503f Merge pull request #2446
f57b2d5 workflows: add basic ubuntu/macOS build script (selsta)
2019-11-18 12:58:46 -06:00
xiphon
d92cc944cb readme: add 'zeromq-devel' to Fedora deps 2019-11-17 19:32:13 +00:00
selsta
f57b2d57cd workflows: add basic ubuntu/macOS build script 2019-11-14 22:12:38 +01:00
luigi1111
cf0e5a811e Merge pull request #2440
e9cdaf4 Transfer: convert and display entered amount in fiat currency (xiphon)
2019-11-13 09:08:16 -06:00
luigi1111
ea8f51d168 Merge pull request #2439
17f032e fiat: fix invalid type, don't round conversion rate to whole number (xiphon)
2019-11-13 09:06:51 -06:00
luigi1111
e8befc4c67 Merge pull request #2438
92f9bec installer: automatically set app version information (xiphon)
2019-11-13 09:05:55 -06:00
luigi1111
5518771a8b Merge pull request #2437
ef565e5 build: embed version metadata into binary (xiphon)
2019-11-13 09:04:49 -06:00
luigi1111
47bc0f2a3c Merge pull request #2435
0e3f3c1 SettingsWallet: refactor list items into separate component (xiphon)
2019-11-13 09:03:51 -06:00
luigi1111
8bd820b909 Merge pull request #2429
74e12ce ContextMenu: implement 'paste' context menu for all text fields (xiphon)
2019-11-13 09:03:02 -06:00
luigi1111
f948d0e214 Merge pull request #2428
5fe6b48 Settings: fix 'Light theme' checkbox (xiphon)
2019-11-13 09:02:03 -06:00
luigi1111
3a7c9e6c8e Merge pull request #2417
212c8dd Warning added that balance reflects only incoming transactions for view-only wallets (peli-pro)
2019-11-13 09:00:44 -06:00
selsta
5a65d28d29 build: set submodule to v0.15.0.1 2019-11-13 15:45:42 +01:00
xiphon
e9cdaf4dbe Transfer: convert and display entered amount in fiat currency 2019-11-13 08:10:49 +00:00
xiphon
17f032ea11 fiat: fix invalid type, don't round conversion rate to whole number 2019-11-13 06:34:33 +00:00
xiphon
ef565e5fa3 build: embed version metadata into binary 2019-11-12 16:23:02 +00:00
xiphon
92f9bec1e7 installer: automatically set app version information 2019-11-12 02:25:29 +00:00
xiphon
0e3f3c13a1 SettingsWallet: refactor list items into separate component 2019-11-11 21:14:39 +00:00
xiphon
74e12ce71d ContextMenu: implement 'paste' context menu for all text fields 2019-11-08 12:41:32 +00:00
xiphon
5fe6b48517 Settings: fix 'Light theme' checkbox 2019-11-04 21:47:38 +00:00
luigi1111
7f7a39292c Merge pull request #2427
2e1e227 build: MinGW fix gcc >= 9.1 build, enable stack protection (xiphon)
2019-11-04 11:06:35 -06:00
xiphon
2e1e227b4c build: MinGW fix gcc >= 9.1 build, enable stack protection 2019-11-04 16:26:28 +03:00
luigi1111
ee68bcb6e9 Merge pull request #2426
a4c17ac build: set submodule to v0.15.0.0 (selsta)
2019-11-03 19:13:04 -06:00
luigi1111
025a638082 Merge pull request #2424
06ba205 Windows Installer: Update for Carbon Chamaeleon 0.15.0.0 (rbrunner7)
2019-11-03 19:12:16 -06:00
luigi1111
33babc5d85 Merge pull request #2423
5df14ab Merchant: fix leaving the page (xiphon)
2019-11-03 19:11:29 -06:00
selsta
a4c17ac82b build: set submodule to v0.15.0.0 2019-11-03 23:56:27 +01:00
René Brunner
06ba205320 Windows Installer: Update for Carbon Chamaeleon 0.15.0.0 2019-11-01 16:13:11 +01:00
xiphon
5df14abed2 Merchant: fix leaving the page 2019-11-01 12:19:25 +00:00
luigi1111
cdad85c0ef Merge pull request #2419
40e2d20 Translations from Weblate (Monero-Weblate)
2019-10-26 19:06:42 -05:00
Weblate
40e2d2045b Translations from Weblate
Translators:

[Czech]
dskch83

[German]
Christian
M5M400
Sneaky Squid
Paul Rant

[Japanese]
Andrew Onishi
Scott Anecito

[French]
el00ruobuob
glv2

[Dutch]
Jonathan Heirbaut
siesero

[Italian]
erciccione
Luca Ciavatta
Alessandro Lotta
stefanomarty

[Finnish]
vaa red

[Chinese (Simplified)]
jindouyunz
TE Scott
razorshaman909

[Catalan]
Assumpta Anglada
BennyBeat
Ecron
Joan Montané

[Ukrainian]
Agent LvM
TheFuzzStone

[Russian]
Agent LvM
TheFuzzStone
Russian Bear

[Chinese (Traditional)]
Lafudoci
2019-10-26 13:08:33 +00:00
peli-pro
212c8dd054 Warning added that balance reflects only incoming transactions for view-only wallets 2019-10-17 14:25:36 +02:00
luigi1111
290582d428 Merge pull request #2416
582267a main: apply WalletMode check on start (xiphon)
2019-10-16 14:22:56 -05:00
xiphon
582267a923 main: apply WalletMode check on start 2019-10-15 18:07:08 +00:00
luigi1111
fe3c06c36b Merge pull request #2415
631a1c4 fix fee labels in transfer (#2412) (jtgrassie)
2019-10-14 17:59:13 -05:00
luigi1111
95d7826163 Merge pull request #2413
c60c9ee Change 'Pootle' to 'Weblate' in readme (erciccione)
2019-10-14 17:58:15 -05:00
luigi1111
5e2099ad47 Merge pull request #2411
965081c DaemonManager: reset disconnectedEpoch on start, start timeout 60s (xiphon)
2019-10-14 17:57:23 -05:00
luigi1111
44280d1e52 Merge pull request #2399
d3b20d2 SimpleMode: implement 'switch to another public node' button (xiphon)
2019-10-14 17:53:08 -05:00
luigi1111
897d879dad Merge pull request #2398
32257c8 DaemonManager: implement async sendCommand (xiphon)
2019-10-14 17:50:54 -05:00
Jethro Grassie
631a1c49c8 fix fee labels in transfer (#2412) 2019-10-13 13:07:52 -04:00
xiphon
d3b20d2c04 SimpleMode: implement "switch to another public node" button 2019-10-11 01:01:19 +00:00
erciccione
c60c9ee69a Change 'Pootle' to 'Weblate' in readme 2019-10-10 11:46:59 +02:00
xiphon
965081c554 DaemonManager: reset disconnectedEpoch on start, start timeout 60s 2019-10-09 02:02:58 +00:00
luigi1111
e6458b58ef Merge pull request #2402
f72ed25 Transfer: forbid long Payment IDs (xiphon)
2019-10-08 15:21:35 -05:00
luigi1111
9207462676 Merge pull request #2401
947e265 Transfer: warn on long Payment ID filled into description field (xiphon)
2019-10-08 15:20:07 -05:00
luigi1111
ab020358e7 Merge pull request #2400
77ff362 SettingsNode: 'auto' special case for Bootstrap Address edit (xiphon)
2019-10-08 15:19:01 -05:00
luigi1111
135cfbac68 Merge pull request #2397
9d40baa SimpleMode: allow wrong local daemon version (xiphon)
2019-10-08 15:17:50 -05:00
luigi1111
3dbf09e7ad Merge pull request #2393
a6cd010 windeploy: bump icu version to 64, add libdouble-conversion.dll (stoffu)
2019-10-08 15:17:02 -05:00
xiphon
32257c8fab DaemonManager: implement async sendCommand 2019-10-07 10:39:30 +00:00
luigi1111
5ecca50977 Merge pull request #2403
ae2fdc7 build: build, install and link against randomx library (xiphon)
2019-09-30 18:59:26 -05:00
xiphon
ae2fdc7ab3 build: build, install and link against randomx library 2019-09-28 12:20:30 +00:00
xiphon
f72ed257ce Transfer: forbid long Payment IDs 2019-09-28 02:01:20 +00:00
xiphon
947e265a1a Transfer: warn on long Payment ID filled into description field 2019-09-28 01:46:22 +00:00
xiphon
77ff362b58 SettingsNode: 'auto' special case for Bootstrap Address edit 2019-09-27 15:50:38 +00:00
xiphon
9d40baa3ef SimpleMode: allow wrong local daemon version 2019-09-26 23:36:18 +00:00
luigi1111
d3b81cb6f8 Merge pull request #2391
4905341 TitleBar: add close wallet button (selsta)
c87ebf1 TitleBar: slightly reduce size of moon icon (selsta)
2019-09-24 11:15:28 -05:00
selsta
c87ebf1f31 TitleBar: slightly reduce size of moon icon 2019-09-24 17:53:02 +02:00
selsta
4905341999 TitleBar: add close wallet button 2019-09-24 17:53:02 +02:00
luigi1111
047dee4eb4 Merge pull request #2396
413507b build: highlight minimum required Qt version (selsta)
2019-09-24 10:52:48 -05:00
luigi1111
dd1046b31f Merge pull request #2392
411505b SimpleMode: ignore persistent daemon flags (xiphon)
2019-09-24 10:51:29 -05:00
luigi1111
2b82a472ae Merge pull request #2390
4f4e879 main: set TERM='goaway' (selsta)
2019-09-24 10:48:43 -05:00
luigi1111
8d5ef035d2 Merge pull request #2389
448727f WizardLang: reduce top margin (selsta)
2019-09-24 10:47:37 -05:00
luigi1111
a3d41a80bf Merge pull request #2383
2ca76ff LeftPanel: new balance card (selsta)
2019-09-24 10:46:40 -05:00
selsta
413507bba9 build: highlight minimum required Qt version 2019-09-23 16:47:56 +02:00
selsta
2ca76ff13c LeftPanel: new balance card 2019-09-21 01:23:09 +02:00
stoffu
a6cd010695 windeploy: bump icu version to 64, add libdouble-conversion.dll 2019-09-19 14:06:18 +09:00
xiphon
411505bff5 SimpleMode: ignore persistent daemon flags 2019-09-16 23:54:05 +00:00
selsta
4f4e879f8d main: set TERM="goaway" 2019-09-15 20:43:52 +02:00
selsta
448727f4b5 WizardLang: reduce top margin 2019-09-14 21:47:20 +02:00
luigi1111
ca8138bb46 Merge pull request #2385
bc22de4 DaemonManager: use 'sync_info' to avoid bootstrap daemon requests (xiphon)
2019-09-14 12:46:18 -05:00
luigi1111
10764b8a68 Merge pull request #2384
2c78f77 WizardController: fix overlap with network type dropdown (selsta)
2019-09-14 12:45:20 -05:00
luigi1111
b91afaf5c7 Merge pull request #2378
738e802 macOS/Windows: fix compiler warning (selsta)
2019-09-14 12:44:35 -05:00
luigi1111
31501316c9 Merge pull request #2377
8dab075 repo: remove isMobile leftovers (selsta)
2019-09-14 12:43:36 -05:00
luigi1111
120a62257f Merge pull request #2376
5f81b57 TitleBar: show wallet name (selsta)
2019-09-14 12:42:51 -05:00
luigi1111
a1e416ee83 Merge pull request #2375
6df9e58 fontawesome: fix regular/solid font style (selsta)
2019-09-14 12:41:52 -05:00
luigi1111
3cf2dc0c04 Merge pull request #2370
0d247a9 SimpleMode: automatic public nodes discovering and switching (xiphon)
2019-09-14 12:41:02 -05:00
selsta
6df9e584b3 fontawesome: fix regular/solid font style 2019-09-10 13:14:10 +02:00
xiphon
0d247a9b8a SimpleMode: automatic public nodes discovering and switching 2019-09-09 15:24:26 +00:00
xiphon
bc22de47f9 DaemonManager: use 'sync_info' to avoid bootstrap daemon requests 2019-09-09 01:14:06 +00:00
luigi1111
a5b2d5e727 Merge pull request #2373
4c05bff main: node and log page are hidden in simple mode (selsta)
2019-09-08 20:13:24 -05:00
selsta
2c78f77eb2 WizardController: fix overlap with network type dropdown 2019-09-08 17:06:14 +02:00
selsta
738e802f3c macOS/Windows: fix compiler warning 2019-09-06 00:22:39 +02:00
selsta
8dab0755d3 repo: remove isMobile leftovers 2019-09-06 00:11:12 +02:00
selsta
5f81b573c0 TitleBar: show wallet name 2019-09-05 18:49:28 +02:00
luigi1111
a267712d10 Merge pull request #2358
5392dd7 TitleBar: change Light Theme icon from 'light bulb' to 'moon' (xiphon)
2019-09-04 09:49:57 -05:00
luigi1111
0abaae073d Merge pull request #2372
cb9cb6e FontAwesome: bump to 5.10.2 (xiphon)
2019-09-04 09:48:58 -05:00
luigi1111
a6791561d6 Merge pull request #2366
a83910d SettingsNode: make input read only (selsta)
2019-09-04 09:48:06 -05:00
luigi1111
3ca2473239 Merge pull request #2362
3a33dde fix invalid include paths, compilation warnings, update README.md (xiphon)
2019-09-04 09:46:13 -05:00
luigi1111
779cc3e24d Merge pull request #2361
336ed9d sync and update language files (erciccione)
2019-09-04 09:44:41 -05:00
luigi1111
cfd2139310 Merge pull request #2346
049cef9 android: fix build (selsta)
2019-09-04 09:42:09 -05:00
selsta
4c05bff21e main: node and log page are hidden in simple mode 2019-09-04 00:06:26 +02:00
xiphon
5392dd7ed0 TitleBar: change Light Theme icon from 'light bulb' to 'moon' 2019-09-03 18:51:12 +00:00
xiphon
cb9cb6eb09 FontAwesome: bump to 5.10.2 2019-09-03 18:43:12 +00:00
xiphon
3a33ddeecd fix invalid include paths, compilation warnings, update README.md 2019-09-02 20:01:28 +00:00
selsta
a83910d7de SettingsNode: make input read only 2019-09-01 02:38:03 +02:00
erciccione
336ed9d6e5 sync and update language files 2019-08-28 12:44:06 +02:00
luigi1111
346e942e93 Merge pull request #2360
29580de History: fix tx key 'click to reveal' handling (xiphon)
2019-08-27 14:58:33 -05:00
luigi1111
13a5be7306 Merge pull request #2357
67e08da README: update (selsta)
2019-08-27 14:57:46 -05:00
luigi1111
bdceff6380 Merge pull request #2355
e660b2d build: link libstdc++ on Windows to statically link libwinpthreads (xiphon)
2019-08-27 14:56:11 -05:00
luigi1111
17c61f897a Merge pull request #2353
40bdf69 Ledger: improve hw wallet splash screen (selsta)
2019-08-27 14:55:15 -05:00
luigi1111
9a58e88ec6 Merge pull request #2351
b616e1c SettingsNode: change icons (selsta)
2019-08-27 14:53:29 -05:00
luigi1111
355cccaa64 Merge pull request #2175
ab47b4a Expose get/set attrs for wallet cache in libwalletqt, requires #5534 (xmrdsc)
2019-08-27 14:52:17 -05:00
xiphon
29580de2c7 History: fix tx key 'click to reveal' handling 2019-08-26 04:05:35 +00:00
selsta
67e08da918 README: update 2019-08-22 00:07:12 +02:00
xiphon
e660b2d169 build: link libstdc++ on Windows to statically link libwinpthreads 2019-08-20 14:17:46 +00:00
selsta
40bdf692d1 Ledger: improve hw wallet splash screen 2019-08-17 01:05:22 +02:00
luigi1111
562c46660a Merge pull request #2349
1ec22b3 history: fix start/end of the day calculation, apply local timezone (xiphon)
2019-08-14 15:52:02 -05:00
luigi1111
0724dd0043 Merge pull request #2348
a01ffc6 daemon: async daemon status check, don't freeze on wallet startup (xiphon)
2019-08-14 15:45:54 -05:00
luigi1111
c0932a1bd5 Merge pull request #2347
e1bbc1e LeftPanel: use currency symbol for fiat toggle (selsta)
2019-08-14 15:44:21 -05:00
luigi1111
d7a65fafad Merge pull request #2340
2f5c926 WizardLanguage: add missing qsTr() (selsta)
2019-08-14 15:43:06 -05:00
luigi1111
239e27c1b5 Merge pull request #2338
18f7a6a Receive: fix warning (selsta)
2019-08-14 15:42:04 -05:00
luigi1111
1ca10373a3 Merge pull request #2336
30a3abe Wallet: explicitly set trusted daemon flag (xiphon)
2019-08-14 15:40:33 -05:00
luigi1111
ac6687f6ff Merge pull request #2313
01740a2 images: fix known incorrect sRGB profile warning (selsta)
2019-08-14 15:39:32 -05:00
selsta
b616e1c8f6 SettingsNode: change icons 2019-08-14 20:35:53 +02:00
xiphon
1ec22b3d0c history: fix start/end of the day calculation, apply local timezone 2019-08-13 14:25:16 +00:00
xiphon
a01ffc6e1a daemon: async daemon status check, don't freeze on wallet startup 2019-08-13 12:21:47 +00:00
selsta
e1bbc1e525 LeftPanel: use currency symbol for fiat toggle 2019-08-12 00:10:24 +02:00
selsta
049cef9ce3 android: fix build 2019-08-10 22:09:30 +02:00
selsta
18f7a6a694 Receive: fix warning 2019-08-07 14:19:56 +02:00
xiphon
30a3abedbe Wallet: explicitly set trusted daemon flag 2019-08-07 06:43:18 +00:00
selsta
2f5c926c82 WizardLanguage: add missing qsTr() 2019-08-06 23:44:53 +02:00
luigi1111
55b4425c5d Merge pull request #2335
f666e6f main: don't attempt to close already closed wallet (xiphon)
2019-08-06 15:06:27 -05:00
luigi1111
dc49d7af38 Merge pull request #2331
e546ce8 WizardRestoreWallet1: use RadioButtons instead of buttons (selsta)
2019-08-06 15:05:36 -05:00
luigi1111
e01c2e903a Merge pull request #2327
059a2d7 SettingsNode: make button text more consistent (selsta)
2019-08-06 15:04:39 -05:00
luigi1111
886be81af2 Merge pull request #2315
1e64ebe QML: warning fixes (selsta)
2019-08-06 15:03:40 -05:00
luigi1111
671ddf5bef Merge pull request #2314
8abf8f8 wizard: bug fixes (selsta)
2019-08-06 15:02:36 -05:00
luigi1111
5f8cb04fee Merge pull request #2221
2d72f55 device: show address on device display (ph4r05)
2019-08-06 15:01:48 -05:00
luigi1111
3f06560c51 Revert "set submodule v0.14.1.2"
This reverts commit 8d17018019.
2019-08-06 15:00:43 -05:00
xiphon
f666e6f42e main: don't attempt to close already closed wallet 2019-08-06 10:50:26 +00:00
selsta
e546ce83b4 WizardRestoreWallet1: use RadioButtons instead of buttons 2019-07-31 18:17:46 +02:00
selsta
059a2d754e SettingsNode: make button text more consistent 2019-07-27 18:08:24 +02:00
selsta
1e64ebe17a QML: warning fixes 2019-07-24 05:24:37 +02:00
selsta
8abf8f844f wizard: bug fixes
- property binding loop
- wrong transition
- html in plaintext
2019-07-24 05:07:54 +02:00
selsta
01740a253d images: fix known incorrect sRGB profile warning 2019-07-24 04:05:39 +02:00
luigi1111
0461a28701 Merge pull request #2310
ff23a5b prices: improve error message (selsta)
2019-07-23 11:29:46 -05:00
luigi1111
a3b1590286 Merge pull request #2309
afe2b14 QML: fix more warnings (selsta)
2019-07-23 11:28:50 -05:00
luigi1111
b5cbb8b990 Merge pull request #2308
d4a6826 WizardController: make scrollbar visible (selsta)
2019-07-23 11:27:34 -05:00
selsta
ff23a5bf1e prices: improve error message 2019-07-23 01:00:40 +02:00
selsta
afe2b14430 QML: fix more warnings 2019-07-22 23:11:38 +02:00
selsta
d4a6826d13 WizardController: make scrollbar visible 2019-07-22 22:28:46 +02:00
luigi1111
8d17018019 set submodule v0.14.1.2 2019-07-22 13:40:20 -05:00
luigi1111
a65222d057 Merge pull request #2302
7e40a81 Account: fix theme switch label color (selsta)
2019-07-22 13:35:24 -05:00
luigi1111
25e56ee8fb Merge pull request #2307
f20ab12 QML: fix various warnings (selsta)
2019-07-22 13:29:31 -05:00
luigi1111
40c3e38f5a Merge pull request #2305
e6642c4 Account/Receive: update table on new entry (selsta)
2019-07-22 13:25:20 -05:00
luigi1111
f810c56100 Merge pull request #2303
5b81a1a Windows installer: Bumped the version number to 0.14.1.2 (rbrunner7)
2019-07-22 13:24:14 -05:00
luigi1111
95b3bb955c Merge pull request #2300
8f7d2b5 WizardAskPassword: improve label (selsta)
2019-07-22 13:21:50 -05:00
luigi1111
8db07974e2 Merge pull request #2299
e7653d0 updating the readme (parasew)
2019-07-22 13:20:41 -05:00
luigi1111
6c25650bbd Merge pull request #2297
7480f9b Changes Change wallet/Continue to Cancel/Ok (notmike-5)
2019-07-22 13:18:23 -05:00
luigi1111
4775fd74b8 Merge pull request #2294
ba33649 Fix segfault on Tails (tobtoht)
2019-07-22 13:11:15 -05:00
selsta
f20ab12cf3 QML: fix various warnings 2019-07-21 23:23:03 +02:00
selsta
e6642c4338 Account/Receive: update table on new entry 2019-07-21 21:17:18 +02:00
René Brunner
5b81a1a9d6 Windows installer: Bumped the version number to 0.14.1.2 2019-07-20 17:27:31 +02:00
selsta
7e40a810eb Account: fix theme switch label color 2019-07-20 02:54:16 +02:00
Matthias
e7653d0497 updating the readme 2019-07-19 18:03:48 +03:00
selsta
8f7d2b592a WizardAskPassword: improve label 2019-07-18 23:25:50 +02:00
notmike
7480f9b559 Changes Change wallet/Continue to Cancel/Ok
see #2290 #2204
2019-07-18 09:02:53 -06:00
thotbot
ba33649d7e Fix segfault on Tails 2019-07-18 13:22:38 +00:00
luigi1111
705439c78b Merge pull request #2289
cddba56 Fix project file (xmrdsc)
2019-07-16 11:50:11 -05:00
dsc
cddba56848 Fix project file 2019-07-16 18:47:12 +02:00
luigi1111
39fe5478b9 Merge pull request #2287
b96004a main: don't lock on inactivity if passwordDialog is visible (selsta)
2019-07-16 11:38:46 -05:00
luigi1111
cb3c310eb8 Merge pull request #2286
d2e7358 PasswordDialog: label improvements (selsta)
2019-07-16 11:37:19 -05:00
luigi1111
c426f1eb83 Merge pull request #2283
e04d563 src: fix compiler warnings (selsta)
2019-07-16 11:36:26 -05:00
luigi1111
beb94783c6 Merge pull request #2258
0b61328 Detect tails, support data persistence (xmrdsc)
2019-07-16 11:35:16 -05:00
dsc
0b61328971 Detect tails, support data persistence
Co-authored-by: Thotbot <thotbot@protonmail.com>
Co-authored-by: Selsta <selsta@sent.at>
2019-07-16 18:33:44 +02:00
selsta
b96004a101 main: don't lock on inactivity if passwordDialog is visible 2019-07-16 14:17:22 +02:00
selsta
d2e7358db7 PasswordDialog: label improvements 2019-07-16 14:08:22 +02:00
luigi1111
cfec9dde96 Merge pull request #2257
96c99b2 Replace Qt.labs.settings with MoneroSettings to allow for more customization (xmrdsc)
2019-07-15 23:38:56 -05:00
selsta
e04d563eb4 src: fix compiler warnings 2019-07-16 03:34:46 +02:00
dsc
96c99b250e Replace Qt.labs.settings with MoneroSettings to allow for more customization 2019-07-16 01:47:07 +02:00
luigi1111
4370733b2b Merge pull request #2282
d113bf1 main: fix password dialog overlay (selsta)
2019-07-15 18:43:33 -05:00
luigi1111
cac7662558 Merge pull request #2279
59550ec Windows installer: Achieve reproducible builds (rbrunner7)
2019-07-15 18:42:42 -05:00
luigi1111
0abd21b434 Merge pull request #2276
4b0d1dc Fixes #2275, transactionCommited txid list (ph4r05)
2019-07-15 18:41:19 -05:00
luigi1111
0d29ea33d8 Merge pull request #2256
817115f Start script for Tails (xmrdsc)
2019-07-15 18:39:39 -05:00
luigi1111
3a9f0e1100 Merge pull request #2240
35a0f25 PasswordDialog: merge components and bug fixes (selsta)
2019-07-15 18:38:32 -05:00
selsta
d113bf1a66 main: fix password dialog overlay 2019-07-15 21:56:57 +02:00
Dusan Klinec
2d72f55e57 device: show address on device display 2019-07-15 17:54:50 +02:00
Dusan Klinec
4b0d1dcfbf Fixes #2275, transactionCommited txid list
txid list was empty when emitted
2019-07-15 16:17:21 +02:00
selsta
35a0f25b57 PasswordDialog: merge components and bug fixes
This commit merges PasswordDialog, PassphraseDialog and
NewPasswordDialog. Also the following bugs were fixed:

- Wizard pages still being active when opening a wallet
  from wizard.
- Capslock detection was buggy when copy pasting password, I
  replaced it with native implementations for each platform.
- isAlpha could throw errors when using special characters.
2019-07-15 00:05:10 +02:00
luigi1111
702b654f09 Merge pull request #2263
14619b9 History: don't reset date filtering when switching page (selsta)
2019-07-12 20:39:27 -05:00
luigi1111
f6de660e0e Merge pull request #2255
6baa963 NetworkStatusItem: simple mode has no node settings page (selsta)
2019-07-12 20:37:46 -05:00
luigi1111
b3402b3d4e Merge pull request #2251
5f5f210 History: dynamic number of tx rows (selsta)
2019-07-12 20:36:52 -05:00
luigi1111
5b411b471e Merge pull request #2250
84865cd History: allow to search for tx_note (selsta)
2019-07-12 20:35:29 -05:00
luigi1111
79dcb92d18 Merge pull request #2247
ab9e31e WalletManager: async close with splash screen (xiphon)
2019-07-12 20:34:10 -05:00
luigi1111
8bbc2e87bc Merge pull request #2246
c34a2b4 QML: fix warnings (selsta)
2019-07-12 20:33:22 -05:00
luigi1111
c10ea20f83 Merge pull request #2241
e1b4bcb build: minimum required qt version is 5.9 (selsta)
2019-07-12 20:32:14 -05:00
luigi1111
b4231a758c Merge pull request #2237
1b5796a WizardSummary: remove duplicated entry (selsta)
2019-07-12 20:31:17 -05:00
René Brunner
59550ec673 Windows installer: Achieve reproducible builds 2019-07-07 17:23:08 +02:00
selsta
6baa96360f NetworkStatusItem: simple mode has no node settings page 2019-07-05 20:57:19 +02:00
selsta
14619b9437 History: don't reset date filtering when switching page 2019-07-04 15:17:41 +02:00
dsc
817115fa47 Start script for Tails
Co-authored-by: thotbot <thotbot@protonmail.com>
2019-07-04 01:25:03 +02:00
selsta
5f5f2103c0 History: dynamic number of tx rows 2019-07-03 15:24:39 +02:00
selsta
84865cdead History: allow to search for tx_note 2019-07-03 13:54:01 +02:00
selsta
c34a2b43fc QML: fix warnings 2019-07-02 15:10:40 +02:00
xiphon
ab9e31e7cc WalletManager: async close with splash screen 2019-07-02 11:11:38 +00:00
selsta
e1b4bcb2ef build: minimum required qt version is 5.9 2019-07-01 14:40:20 +02:00
luigi1111
c4b3fbae1d Merge pull request #2235
9ab2922 Add vim generated files to gitignore (TheCharlatan)
2019-06-29 13:37:54 -05:00
selsta
1b5796a0ee WizardSummary: remove duplicated entry 2019-06-29 04:29:55 +02:00
TheCharlatan
9ab2922eb2 Add vim generated files to gitignore 2019-06-28 06:48:54 +02:00
luigi1111
036b3b56c5 Merge pull request #2229
be7810c qt: implement FutureScheduler, always await async code to complete (xiphon)
2019-06-25 14:02:40 -05:00
luigi1111
3c3848633e Merge pull request #1960
63ee61b transfer: make simple mode more simple (mmbyday)
2019-06-25 14:00:47 -05:00
xiphon
be7810c5a8 qt: implement FutureScheduler, always await async code to complete 2019-06-24 20:09:50 +00:00
luigi1111
c7956f76ea Merge pull request #2231
9d6038e main: make variable used once local to function (selsta)
df50c51 main: remove unused variables (selsta)
2019-06-21 14:46:02 -05:00
luigi1111
30997a8262 Merge pull request #2230
484d403 NetworkStatusItem: correctly display remote node status (selsta)
2019-06-21 14:44:53 -05:00
luigi1111
431a789a39 Merge pull request #2228
024fe1b MainApp: send unhandled events to base class (selsta)
2019-06-21 14:44:06 -05:00
luigi1111
8428e77c16 Merge pull request #2226
55ad588 main: fix UI freeze on close in remote node mode (xiphon)
2019-06-21 14:43:08 -05:00
luigi1111
fe40ceab20 Merge pull request #2224
2dc820c repo: remove unused components (xiphon)
2019-06-21 14:41:49 -05:00
luigi1111
27ad473695 Merge pull request #2223
d237e70 main: fix false positive daemonRunning (invalid daemon address check) (xiphon)
2019-06-21 14:41:05 -05:00
luigi1111
2c81f1808f Merge pull request #2222
68c5527 persistentSettings: preserve fiat balance toggle on wallet restart (xiphon)
2019-06-21 14:40:18 -05:00
luigi1111
f6a797fcb5 Merge pull request #2220
8d49ad9 tx_key not displayed by default, click to reveal (ph4r05)
6d03d63 get_tx_key, get_tx_proof, tx_spend_proof async (ph4r05)
2019-06-21 14:39:20 -05:00
luigi1111
934ca28e2c Merge pull request #2217
0d7289d Windows installer: Add 3 new exe files (pruning, stats) (rbrunner7)
2019-06-21 14:38:01 -05:00
luigi1111
de65413390 Merge pull request #2216
cbbd898 WalletManager: remove unused functions (selsta)
2019-06-21 14:37:14 -05:00
luigi1111
3bb69fd645 Merge pull request #2200
c69f0ad add missed translatable string in SettingsNode.qml (erciccione)
2019-06-21 14:36:20 -05:00
luigi1111
d301a9ac6e Merge pull request #2198
725cf73 wizardhome: add change network label (mmbyday)
2019-06-21 14:34:58 -05:00
luigi1111
a4648d9738 Merge pull request #2194
7aff9e6 remove Seed & Keys subtab in left panel (cryptochangements34)
2019-06-21 14:33:40 -05:00
luigi1111
df34693d4e Merge pull request #2189
6267be0 monero-wallet-gui.pro: add lupdate options no-obsolete and locations none (mmbyday)
2019-06-21 14:31:05 -05:00
luigi1111
edb849fa81 Merge pull request #2170
a3c620f restore height visibility enhancements (mmbyday)
2019-06-21 14:27:26 -05:00
selsta
df50c5111b main: remove unused variables 2019-06-21 01:54:17 +02:00
selsta
9d6038e0a3 main: make variable used once local to function 2019-06-21 01:24:39 +02:00
selsta
484d403921 NetworkStatusItem: correctly display remote node status 2019-06-21 00:43:29 +02:00
Dusan Klinec
6d03d63c88 get_tx_key, get_tx_proof, tx_spend_proof async 2019-06-20 14:57:10 +02:00
selsta
024fe1b834 MainApp: send unhandled events to base class 2019-06-19 20:36:16 +02:00
xiphon
d237e70ef1 main: fix false positive daemonRunning (invalid daemon address check) 2019-06-18 21:06:27 +00:00
Dusan Klinec
8d49ad9ba4 tx_key not displayed by default, click to reveal 2019-06-18 13:30:06 +02:00
xiphon
55ad5886b4 main: fix UI freeze on close in remote node mode 2019-06-18 11:23:13 +00:00
xiphon
2dc820c9d4 repo: remove unused components 2019-06-18 00:32:55 +00:00
xiphon
68c55270d4 persistentSettings: preserve fiat balance toggle on wallet restart 2019-06-17 20:51:18 +00:00
René Brunner
0d7289d94b Windows installer: Add 3 new exe files (pruning, stats) 2019-06-15 21:06:06 +02:00
luigi1111
d1e8b6f823 Merge pull request #2213
2524cc1 Wallet: async fetching wallet, daemon and target height (xiphon)
2019-06-14 14:34:27 -05:00
selsta
cbbd898cd5 WalletManager: remove unused functions 2019-06-14 17:08:26 +02:00
xiphon
2524cc179e Wallet: async fetching wallet, daemon and target height 2019-06-13 12:33:05 +00:00
erciccione
c69f0adac8 add missed translatable string in SettingsNode.qml 2019-06-06 15:04:54 +02:00
mmbyday
725cf737bc wizardhome: add change network label 2019-06-05 23:15:26 -07:00
luigi1111
68c7cf7276 Merge pull request #2197
42bf4b2 KeysFiles: fix file path (mmbyday)
2019-06-05 22:36:49 -05:00
luigi1111
c32f26fc8f Merge pull request #2192
8cb93ec Windows installer: Simplify script thanks to static linking of GUI wallet exe (rbrunner7)
2019-06-05 22:35:40 -05:00
luigi1111
863c75f6a2 Merge pull request #2188
f61656a Fix windows mingw build (mmbyday)
2019-06-05 22:34:48 -05:00
luigi1111
189f905785 Merge pull request #2182
73a3549 WalletManager: non-blocking mining status updates (xiphon)
2019-06-05 22:33:57 -05:00
luigi1111
477bce6117 Merge pull request #2180
a9cb42e WalletManager: fix compilation warnings (unused args, members order) (xiphon)
2019-06-05 22:32:52 -05:00
luigi1111
f8a6dec0ed Merge pull request #2179
1cffa8b WalletManager: fix crash on null/dangling pointer dereference (xiphon)
2019-06-05 22:31:39 -05:00
luigi1111
da39be9a8d Merge pull request #2178
8bc9fbe WalletManager: async setDaemonAddress (xiphon)
2019-06-05 22:30:46 -05:00
luigi1111
1c3201b17f Merge pull request #2177
a4928ba windeploy: deploy libssl and libcrypto binaries (xiphon)
2019-06-05 22:29:33 -05:00
mmbyday
42bf4b2e87 KeysFiles: fix file path 2019-06-04 23:46:10 -07:00
mmbyday
f61656a1b8 Fix windows mingw build 2019-06-04 13:55:14 -07:00
cryptochangements34
7aff9e6af0 remove Seed & Keys subtab in left panel 2019-06-03 17:32:38 -04:00
René Brunner
8cb93ec466 Windows installer: Simplify script thanks to static linking of GUI wallet exe 2019-06-02 09:10:00 +02:00
mmbyday
6267be0413 monero-wallet-gui.pro: add lupdate options no-obsolete and locations none
Co-authored-by: selsta <selsta@sent.at>
Co-authored-by: erciccione <erciccione@users.noreply.github.com>
2019-05-31 23:05:56 -07:00
xiphon
73a3549e09 WalletManager: non-blocking mining status updates 2019-05-30 23:17:26 +00:00
xiphon
a9cb42e2a4 WalletManager: fix compilation warnings (unused args, members order) 2019-05-28 15:55:10 +00:00
xiphon
1cffa8b68d WalletManager: fix crash on null/dangling pointer dereference 2019-05-28 15:46:26 +00:00
xiphon
8bc9fbecaf WalletManager: async setDaemonAddress 2019-05-28 15:08:50 +00:00
xiphon
a4928bae6a windeploy: deploy libssl and libcrypto binaries 2019-05-27 21:12:23 +00:00
luigi1111
a5a90c7ed8 Merge pull request #2176
bac13af translations for release 0.14.1 (Pootle) (Monero-Pootle)
2019-05-27 13:55:05 -05:00
luigi1111
d0e8cf2b43 Merge pull request #2174
65422ae use https to fetch remote nodes list on Windows (xiphon)
2019-05-27 13:42:20 -05:00
luigi1111
f197f507bc Merge pull request #2173
fbd6d68 build: Windows statically link gcc and c++ runtime (xiphon)
07bda54 build: Windows link against setupapi (hidapi dependency) (xipon)
2019-05-27 13:34:22 -05:00
luigi1111
4481aa7028 Merge pull request #2171
d3cf9ea Bootstrap warning text should be richtext (xmrdsc)
2019-05-27 13:30:18 -05:00
luigi1111
d71e7354d9 Merge pull request #2169
d518b20 WizardSummary: always show restore height when restoring from seed/keys/device (mmbyday)
2019-05-27 13:27:59 -05:00
luigi1111
bec3605757 Merge pull request #2168
ca9883b Fix restore height when using stagenet/testnet (mmbyday)
2019-05-27 13:26:12 -05:00
Monero-Pootle
bac13afc9b translations for release 0.14.1 (Pootle) 2019-05-27 13:19:30 +00:00
dsc
ab47b4a783 Expose get/set attrs for wallet cache in libwalletqt, requires #5534 2019-05-25 22:38:38 +02:00
mmbyday
d518b204b1 WizardSummary: always show restore height when restoring from seed/keys/device 2019-05-24 12:01:23 -07:00
mmbyday
ca9883b6c0 Fix restore height when using stagenet/testnet 2019-05-24 11:58:46 -07:00
xiphon
65422ae6ca use https to fetch remote nodes list on Windows 2019-05-22 15:03:01 +00:00
xiphon
07bda54c41 build: Windows link against setupapi (hidapi dependency) 2019-05-22 11:19:09 +00:00
xiphon
fbd6d683ed build: Windows statically link gcc and c++ runtime 2019-05-22 10:54:05 +00:00
xmrdsc
d3cf9eaf97 Bootstrap warning text should be richtext 2019-05-16 16:19:16 +02:00
mmbyday
a3c620f78d restore height visibility enhancements 2019-05-15 00:37:53 -07:00
luigi1111
c286c7e5a8 Merge pull request #2167
3734767 build: fix monero-wallet-gui.pro (selsta)
2019-05-13 12:57:49 -05:00
selsta
37347672a8 build: fix monero-wallet-gui.pro 2019-05-11 10:03:49 +02:00
luigi1111
f4982834ab Merge pull request #2165
5b79cf7 Windows installer: Update for Boron Butterfly 0.14.1.0 (rbrunner7)
2019-05-10 13:23:08 -05:00
luigi1111
209679abef Merge pull request #2164
96945c2 MiddlePanel: dynamic content height (selsta)
2019-05-10 13:22:15 -05:00
luigi1111
80a992553d Merge pull request #2158
ceed212 wallet: fix deadlock, omit invoking 'refresh' from callback (xiphon)
2019-05-10 13:21:14 -05:00
luigi1111
b77eca9db1 Merge pull request #2156
fbe1de1 keys: ux improvements for hardware device wallet (mmbyday)
2019-05-10 13:20:04 -05:00
luigi1111
cfa594e595 Merge pull request #2155
949e774 msys2: fix windows build with trezor (mmbyday)
2019-05-10 13:19:00 -05:00
luigi1111
abf823e38d Merge pull request #2147
c88bb60 transaction: async commit (ph4r05)
2019-05-10 13:01:29 -05:00
luigi1111
08caf05eb2 Merge pull request #2141
d4be763 Fiat API (xmrdsc)
2019-05-10 12:59:37 -05:00
René Brunner
5b79cf7a6a Windows installer: Update for Boron Butterfly 0.14.1.0 2019-05-07 10:37:30 +02:00
selsta
96945c2c79 MiddlePanel: dynamic content height 2019-05-07 07:34:50 +02:00
dsc
d4be7634cb Fiat API
Co-Authored-By: selsta <selsta@sent.at>
Co-Authored-By: Gene Peters <gene@telligent-data.com>
2019-05-06 04:36:23 +02:00
xiphon
ceed212e63 wallet: fix deadlock, omit invoking 'refresh' from callback
Co-authored-by: Dusan Klinec <dusan.klinec@gmail.com>
2019-05-03 18:43:11 +00:00
luigi1111
3c1fe1da8b Merge pull request #2157
1f2f081 Black theme by default (xiphon)
2019-05-03 13:06:07 -05:00
luigi1111
4b43a1dfb6 Merge pull request #2153
94440f9 readme: add svg module (mmbyday)
2019-05-03 13:04:37 -05:00
luigi1111
1fcd79729c Merge pull request #2149
5d3fe93 Check before disconnecting wallet (xmrdsc)
2019-05-03 13:01:13 -05:00
luigi1111
f53d01be56 Merge pull request #2146
c82bffe SettingsLayout: fix order (selsta)
2019-05-03 13:00:24 -05:00
luigi1111
58e7af27c4 Merge pull request #2145
c840549 Add copyright headers (mmbyday)
2019-05-03 12:59:28 -05:00
luigi1111
2d7b3e2bef Merge pull request #2144
119d91a labelSubHeader: fix width bug (mmbyday)
2019-05-03 12:58:41 -05:00
luigi1111
1b529fabef Merge pull request #2143
b74aa1a dialogs: fix titlebar disabledness (mmbyday)
2019-05-03 12:57:53 -05:00
luigi1111
eb53c72ca4 Merge pull request #2142
c151e5e wizardcreatedevice: cleanup layout (mmbyday)
2019-05-03 12:56:57 -05:00
luigi1111
d0a40b4ca8 Merge pull request #2133
cb4a9da RightPanel: cleanup from repo (selsta)
2019-05-03 12:47:46 -05:00
luigi1111
34e46eda64 Merge pull request #2100
171e1fc Fix checking for gui updates (mmbyday)
2019-05-03 12:46:42 -05:00
luigi1111
fc4ae89039 Merge pull request #2068
480acf4 Scan keysfiles in wizard - open wallet (xmrdsc)
2019-05-03 12:45:14 -05:00
xiphon
1f2f08190a Black theme by default 2019-05-03 14:39:09 +00:00
mmbyday
fbe1de1164 keys: ux improvements for hardware device wallet 2019-05-03 00:38:09 -07:00
mmbyday
949e774a9f msys2: fix windows build with trezor 2019-05-02 23:16:53 -07:00
mmbyday
94440f9d0b readme: add svg module
Fixes #2152
2019-05-02 14:01:14 -07:00
mmbyday
c151e5e7a1 wizardcreatedevice: cleanup layout 2019-05-02 12:11:21 -07:00
xmrdsc
5d3fe93e1f Check before disconnecting wallet 2019-05-02 16:27:35 +02:00
Dusan Klinec
c88bb60135 transaction: async commit
Addresses #2123, reduces UI freezing on long-lasting operation, improves Trezor experience
2019-05-02 16:19:22 +02:00
dsc
480acf441d Scan keysfiles in wizard - open wallet 2019-05-02 00:41:09 +02:00
selsta
c82bffeacc SettingsLayout: fix order 2019-05-01 23:17:41 +02:00
mmbyday
c840549db5 Add copyright headers 2019-05-01 13:53:04 -07:00
mmbyday
119d91ab80 labelSubHeader: fix width bug 2019-04-30 22:59:08 -07:00
mmbyday
b74aa1a585 dialogs: fix titlebar disabledness 2019-04-30 22:00:39 -07:00
mmbyday
171e1fc023 Fix checking for gui updates 2019-04-30 18:43:37 -07:00
luigi1111
97cd215491 Merge pull request #2131
83e4343 Transfer: warn when sending to a known long PID service (selsta)
2019-04-30 15:46:38 -05:00
selsta
83e434395b Transfer: warn when sending to a known long PID service 2019-04-30 22:45:11 +02:00
luigi1111
afd9449b1d Merge pull request #2136
ed0bccc LeftPanel: don't change font size if balance is hidden (selsta)
2019-04-30 15:40:39 -05:00
luigi1111
7ee0f5907f Merge pull request #2135
e9df885 Merchant: fix title bar with custom decorations turned off (selsta)
2019-04-30 15:39:48 -05:00
luigi1111
18f7c43fff Merge pull request #2134
e910e40 repo: cleanup unused files (selsta)
2019-04-30 15:38:57 -05:00
luigi1111
de257c0ab2 Merge pull request #2132
b1ceaea add missing language files for Greek (_el) and Nepali (_ne) (Monero-Pootle)
ca2356f round of translations + refresh template and language files (Monero-Pootle)
2019-04-30 15:28:28 -05:00
luigi1111
060a718b0c Merge pull request #2128
607b1f8 logging: initial log level set by ENV var (ph4r05)
2019-04-30 15:27:03 -05:00
luigi1111
8d9f33b5aa Merge pull request #2127
131c427 passworddialog: replace eye with font awesome (mmbyday)
2019-04-30 15:25:59 -05:00
luigi1111
5062886815 Merge pull request #2125
d37de31 sign: use radiobuttons to change modes (mmbyday)
2019-04-30 15:25:05 -05:00
luigi1111
7dfc6ceef5 Merge pull request #2124
5f38dbb wizard: fix non-existent property backTransition (mmbyday)
2019-04-30 15:23:56 -05:00
luigi1111
7daff4c13a Merge pull request #2117
b2a7cb3 macOS: enable fullscreen support (selsta)
2019-04-30 15:22:41 -05:00
luigi1111
6b54017f08 Merge pull request #2092
9b7adfc transfer: change description/pid checkbox (mmbyday)
2019-04-30 15:20:51 -05:00
luigi1111
776d0ab33d Merge pull request #2029
18f2acc IPC and custom protocol handler for monero:// (xmrdsc)
2019-04-30 15:20:05 -05:00
selsta
e910e40d0b repo: cleanup unused files 2019-04-30 03:10:51 +02:00
selsta
ed0bccc7e2 LeftPanel: don't change font size if balance is hidden 2019-04-30 02:48:34 +02:00
selsta
e9df885b26 Merchant: fix title bar with custom decorations turned off 2019-04-30 02:34:27 +02:00
selsta
cb4a9daca2 RightPanel: cleanup from repo 2019-04-30 02:14:11 +02:00
mmbyday
131c42701c passworddialog: replace eye with font awesome 2019-04-29 12:39:11 -07:00
dsc
18f2accc7f IPC and custom protocol handler for monero:// 2019-04-29 19:56:46 +02:00
Monero-Pootle
ca2356f509 round of translations + refresh template and language files 2019-04-29 14:36:07 +00:00
Monero-Pootle
b1ceaea4ac add missing language files for Greek (_el) and Nepali (_ne) 2019-04-29 14:36:00 +00:00
Dusan Klinec
607b1f8ede logging: initial log level set by ENV var 2019-04-29 14:26:34 +02:00
selsta
b2a7cb3d40 macOS: enable fullscreen support 2019-04-29 13:38:20 +02:00
mmbyday
5f38dbb7dd wizard: fix non-existent property backTransition 2019-04-28 23:44:08 -07:00
luigi1111
ff6ce6294b Merge pull request #2122
3658bf8 build: link against QtSVG module to enable SVG format support (xiphon)
2019-04-28 22:06:01 -05:00
luigi1111
03ade34cc7 Merge pull request #2121
6d60785 build: Mac OS X link CoreFoundation framework for static libhidapi (xiphon)
2019-04-28 22:05:18 -05:00
luigi1111
c8a3e29f9f Merge pull request #2120
91da476 wizard: reset remote node when switching network type (selsta)
2019-04-28 22:04:26 -05:00
luigi1111
cc5aab8c5f Merge pull request #2119
4ab1816 Mining: fix newline (selsta)
2019-04-28 22:03:37 -05:00
luigi1111
002404227f Merge pull request #2118
e6a8fcd Clean up m_wallet before opening new wallets (xmrdsc)
2019-04-28 22:02:44 -05:00
luigi1111
dff0a07a8a Merge pull request #2116
7ab8b4f SettingsLayout: userInactivitySliderTimer is not defined (selsta)
2019-04-28 21:58:45 -05:00
luigi1111
5f6a0d81de Merge pull request #2115
c92c362 components: remove show() from password dialogs (selsta)
2019-04-28 21:57:32 -05:00
luigi1111
e06e7d3e07 Merge pull request #2085
0e65f25 Update README.md for Qt 5.9.7 (xmrdsc)
2019-04-28 21:55:32 -05:00
luigi1111
78d8f1992b Merge pull request #2071
e84f462 Back transitions for the wizards (xmrdsc)
2019-04-28 21:54:43 -05:00
luigi1111
36b0900589 Merge pull request #2041
1644d3e Windows installer: Set up 'monero:' and 'moneroseed:' custom URI schemes (rbrunner7)
2019-04-28 21:53:35 -05:00
mmbyday
d37de31b35 sign: use radiobuttons to change modes 2019-04-27 21:47:25 -07:00
xiphon
3658bf8c53 build: link against QtSVG module to enable SVG format support 2019-04-28 01:40:21 +00:00
xiphon
6d60785800 build: Mac OS X link CoreFoundation framework for static libhidapi 2019-04-28 01:17:08 +00:00
selsta
91da476cb3 wizard: reset remote node when switching network type 2019-04-28 00:11:14 +02:00
selsta
4ab1816e1a Mining: fix newline 2019-04-27 23:47:44 +02:00
mmbyday
9b7adfc0a8 transfer: change description/pid checkbox 2019-04-26 02:03:50 -07:00
dsc
e6a8fcd6cc Clean up m_wallet before opening new wallets 2019-04-26 02:45:07 +02:00
dsc
e84f4623d8 Back transitions for the wizards 2019-04-26 01:53:42 +02:00
selsta
7ab8b4fac7 SettingsLayout: userInactivitySliderTimer is not defined 2019-04-25 23:41:55 +02:00
selsta
c92c3627a6 components: remove show() from password dialogs 2019-04-25 23:11:56 +02:00
luigi1111
e81cb7e640 Merge pull request #2081
99365fa Dynamic height for the settings->wallet (xmrdsc)
2019-04-25 16:01:42 -05:00
xmrdsc
0e65f25406 Update README.md for Qt 5.9.7 2019-04-25 23:00:22 +02:00
xmrdsc
99365fadf0 Dynamic height for the settings->wallet 2019-04-25 22:55:46 +02:00
luigi1111
7d9a698732 Merge pull request #2078
74dbe8b Account/Receive: update design (selsta)
2019-04-25 15:37:59 -05:00
selsta
74dbe8bfcb Account/Receive: update design 2019-04-25 22:36:02 +02:00
luigi1111
edaa28cc23 Merge pull request #2086
4b9da83 Change settings navbar text: Layout -> Interface (xmrdsc)
2019-04-25 15:33:06 -05:00
luigi1111
6477e18040 Merge pull request #2083
b8d2d05 Hide certain information from the transactions page if there are no transactions yet (xmrdsc)
2019-04-25 15:30:43 -05:00
luigi1111
9ce7c86558 Merge pull request #2073
a6525e7 wizard/device: hide splash screen (selsta)
2019-04-25 15:29:19 -05:00
luigi1111
36ec1a1c56 Merge pull request #2070
baff7f2 Animation slow down for debugging (xmrdsc)
2019-04-25 15:28:28 -05:00
luigi1111
b0ba2379f4 Merge pull request #2069
62285b0 Remove scaleRatio (xmrdsc)
2019-04-25 15:27:19 -05:00
luigi1111
5887f87677 Merge pull request #2058
247f129 Use Slider.onMoved for inactivity slider, remove Timer (xmrdsc)
2019-04-25 15:26:19 -05:00
xmrdsc
4b9da8385b Change settings navbar text: Layout -> Interface 2019-04-25 21:16:13 +02:00
xmrdsc
b8d2d05fce Hide certain information from the transactions page if there are no transactions yet 2019-04-25 21:13:41 +02:00
dsc
62285b01dc Remove scaleRatio 2019-04-25 21:09:23 +02:00
selsta
a6525e74e6 wizard/device: hide splash screen 2019-04-25 20:53:28 +02:00
xmrdsc
baff7f213f Animation slow down for debugging 2019-04-25 20:48:12 +02:00
luigi1111
e1c429110f Merge pull request #2096
f9dec6e wizard: replace icon with Font Awesome version (selsta)
2019-04-25 13:32:02 -05:00
selsta
f9dec6e882 wizard: replace icon with Font Awesome version 2019-04-25 20:29:53 +02:00
luigi1111
fd230789e9 Merge pull request #2113
035887d Activate Hindi language (erccicione)
2019-04-25 13:15:32 -05:00
luigi1111
f37a17581e Merge pull request #2111
24e7307 components: hide password on dialog opening (selsta)
2019-04-25 13:14:36 -05:00
luigi1111
8fd8bdcb2f Merge pull request #2107
04d0b14 InlineButton: fix warning and set font (selsta)
2019-04-25 13:12:40 -05:00
luigi1111
528aba8724 Merge pull request #2095
507441f History: improve human readable time format (selsta)
2019-04-25 13:08:00 -05:00
luigi1111
fb4dfd0ea8 Merge pull request #2060
42f7afa White theme (xmrdsc)
2019-04-25 13:05:54 -05:00
erciccione
035887d3be Activate Hindi language 2019-04-24 17:58:13 +02:00
selsta
24e7307a93 components: hide password on dialog opening 2019-04-24 14:14:36 +02:00
dsc
42f7afaefd White theme 2019-04-24 05:37:35 +02:00
selsta
04d0b14152 InlineButton: fix warning and set font 2019-04-23 23:21:47 +02:00
luigi1111
358e1d23fa Merge pull request #2106
7b7996d qrcodescanner: update icon with font awesome (mmbyday)
2019-04-23 15:34:24 -05:00
luigi1111
ba0f7fc9f6 Merge pull request #2105
45efb41 wizard: allow viewonly wallet restores (mmbyday)
2019-04-23 15:33:33 -05:00
luigi1111
b39f041177 Merge pull request #2103
1f90854 support user defined max-concurrency (xmrdsc)
2019-04-23 15:32:42 -05:00
luigi1111
4b324bb719 Merge pull request #2102
ee87122 wizardhome: fix network dropdown (mmbyday)
2019-04-23 15:30:08 -05:00
luigi1111
8cd97e807c Merge pull request #2098
c721670 main: remove unused openWalletFromFile and fileDialog code (xiphon)
2019-04-23 15:29:08 -05:00
luigi1111
f56d3ea590 Merge pull request #2097
ed603f3 device: fix hardware wallet creation / restore height (xiphon)
2019-04-23 15:28:16 -05:00
luigi1111
5d7102efd2 Merge pull request #2094
024abdb Merchant: remove unintentional file and add emptryString (selsta)
2019-04-23 14:06:21 -05:00
luigi1111
340b0836ff Merge pull request #2090
a6f7b13 wizard: don't translate hardware wallet names (selsta)
2019-04-23 14:04:31 -05:00
luigi1111
4926ee790b Merge pull request #2080
7f1fa6b Transfer: warn if description is a valid PID (selsta)
2019-04-23 14:01:44 -05:00
mmbyday
7b7996dc66 qrcodescanner: update icon with font awesome 2019-04-22 19:31:29 -07:00
mmbyday
45efb415cd wizard: allow viewonly wallet restores 2019-04-21 13:09:12 -07:00
mmbyday
ee87122d5b wizardhome: fix network dropdown 2019-04-21 12:26:55 -07:00
xmrdsc
1f908547e3 support user defined max-concurrency 2019-04-21 18:39:00 +02:00
xiphon
c721670098 main: remove unused openWalletFromFile and fileDialog code 2019-04-20 05:47:01 +00:00
xiphon
ed603f310e device: fix hardware wallet creation / restore height 2019-04-20 05:38:55 +00:00
selsta
507441f8b6 History: improve human readable time format 2019-04-19 14:20:26 +02:00
selsta
024abdb46f Merchant: remove unintentional file and add emptryString 2019-04-19 13:35:15 +02:00
René Brunner
1644d3eb17 Windows installer: Set up 'monero:' and 'moneroseed:' custom URI schemes 2019-04-18 18:19:00 +02:00
luigi1111
10926644bf Merge pull request #2088
15a5f76 add missing TranslationManager.emptyString (selsta)
2019-04-16 16:54:17 -04:00
luigi1111
e760d33dad Merge pull request #2084
c03ea40 Add Fedora requirements (xmrdsc)
2019-04-16 16:53:28 -04:00
luigi1111
2e4b7450ac Merge pull request #2079
5527507 repo: remove unused components/images (selsta)
2019-04-16 16:51:58 -04:00
luigi1111
09a89d8f4e Merge pull request #2076
71c3dd3 build: Linux static OpenSSL linking, add default OpenSSL lib path (xiphon)
2019-04-16 16:51:11 -04:00
luigi1111
f61a242f66 Merge pull request #2066
55fd233 readme: update link to pootle, add guide for translators, update copyright year (erciccione)
2019-04-16 16:50:23 -04:00
luigi1111
29e0f7c68f Merge pull request #2065
9c4688b PasswordDialog: don't always show() (mmbyday)
2019-04-16 16:49:25 -04:00
luigi1111
32d9c8f661 Merge pull request #2064
34fdfcb Use pkg-config to find libusb and protobuf (Trezor dependencies) (prusnak)
2019-04-16 16:48:18 -04:00
luigi1111
221a49a823 Merge pull request #2057
bd2687c flickable for wizardController (xmrdsc)
2019-04-16 16:47:31 -04:00
luigi1111
c30fd82636 Merge pull request #2056
7b0bdb1 wizard: fix clearing of restore wallet fields (mmbyday)
2019-04-16 16:46:37 -04:00
selsta
a6f7b13389 wizard: don't translate hardware wallet names 2019-04-16 16:53:35 +02:00
selsta
5527507115 repo: remove unused components/images 2019-04-16 16:44:00 +02:00
selsta
7f1fa6bbd6 Transfer: warn if description is a valid PID 2019-04-16 16:36:46 +02:00
selsta
15a5f76334 add missing TranslationManager.emptyString 2019-04-16 16:35:30 +02:00
xmrdsc
c03ea40552 Add Fedora requirements 2019-04-16 15:40:26 +02:00
xiphon
71c3dd3515 build: Linux static OpenSSL linking, add default OpenSSL lib path 2019-04-16 00:52:28 +00:00
erciccione
55fd2332ed readme: update link to pootle, add guide for translators, update copyright year 2019-04-14 11:05:12 +02:00
mmbyday
63ee61b8c4 transfer: make simple mode more simple 2019-04-12 21:36:13 -07:00
mmbyday
9c4688b3f0 PasswordDialog: don't always show() 2019-04-11 22:14:44 -07:00
dsc
bd2687c22f flickable for wizardController 2019-04-11 20:05:09 +02:00
mmbyday
7b0bdb1750 wizard: fix clearing of restore wallet fields 2019-04-11 01:28:19 -07:00
Pavol Rusnak
34fdfcb458 Use pkg-config to find libusb and protobuf (Trezor dependencies) 2019-04-10 22:10:32 +02:00
luigi1111
d2c47606ca Merge pull request #2061
568b78d Remove unused image, fix js/Utils.js, requires #5355 (xmrdsc)
2019-04-09 23:26:21 -04:00
dsc
568b78df81 Remove unused image, fix js/Utils.js, requires #5355 2019-04-09 15:27:28 +02:00
luigi1111
d72284dc0e Merge pull request #2025
7611e82 History redesign (xmrdsc)
2019-04-08 15:32:20 -04:00
dsc
7611e826aa History redesign 2019-04-08 21:28:51 +02:00
luigi1111
98a7a9e663 Merge pull request #2055
1e6e928 AddressBook: redesign (selsta)
2019-04-08 14:42:17 -04:00
selsta
1e6e928995 AddressBook: redesign 2019-04-08 20:40:35 +02:00
luigi1111
723ad8c8ae Merge pull request #2052
6833275 wizard: small UI fix (selsta)
2019-04-08 14:37:54 -04:00
luigi1111
c596e49a04 Merge pull request #2050
f7af87e Add compiled qml/js cache to gitignore (xmrdsc)
2019-04-08 14:36:33 -04:00
luigi1111
cd65cc12da Merge pull request #2037
1a2675b async device open and create from device, passphrase (ph4r05)
2019-04-08 14:35:29 -04:00
luigi1111
2f22503c8b Merge pull request #1822
5dbcd71 PasswordDialog: add CAPSLOCK checking (mmbyday)
2019-04-08 14:33:59 -04:00
dsc
247f129a24 Use Slider.onMoved for inactivity slider, remove Timer 2019-04-08 04:13:29 +02:00
Dusan Klinec
1a2675b246 async device open and create from device, passphrase
- passphrase entry on host added, requires early listener setting monero pull #5355
- wallet open and create from device shows splash to indicate possible long process
- create from device is async to support passphrase entry
2019-04-06 14:52:14 +02:00
selsta
6833275b2a wizard: small UI fix 2019-04-03 20:42:24 +02:00
luigi1111
19c2208dc4 Merge pull request #2019
9074633 device: Trezor support added (ph4r05)
2019-04-03 14:36:34 -04:00
luigi1111
82cf31010a Merge pull request #2049
49a3ead build: set monero submodule to master (selsta)
2019-04-03 14:32:00 -04:00
luigi1111
d3ad848ea1 Merge pull request #2035
8412218  README: update brew boost installation step (selsta)
2019-04-03 14:30:52 -04:00
luigi1111
f3cc2818c5 Merge pull request #2012
c2f1d01 main: automatically fix common wallet cache errors (mmbyday)
2019-04-03 14:27:34 -04:00
luigi1111
91d4470295 Merge pull request #1997
5403b94 Fix double titlebar (MaxXor)
2019-04-03 14:26:33 -04:00
xmrdsc
f7af87e57b Add compiled qml/js cache to gitignore 2019-04-03 18:11:25 +02:00
mmbyday
5dbcd714ea PasswordDialog: add CAPSLOCK checking 2019-04-02 13:18:16 -07:00
selsta
49a3eadd61 build: set monero submodule to master 2019-04-02 16:59:29 +02:00
luigi1111
d4d8ff54e6 Merge pull request #2036
51e48db addressbook description should not be richtext (xmrdsc)
2019-03-26 19:35:16 -04:00
dsc
51e48db6e5 addressbook description should not be richtext 2019-03-26 23:23:28 +01:00
selsta
8412218f70 README: update brew boost installation step 2019-03-26 12:26:07 +01:00
luigi1111
4bab4c510c Merge pull request #2022
190e2eb round of translations (about 600 strings) (Monero-Pootle)
2019-03-21 16:18:24 -04:00
luigi1111
d3d8e9fd0d Merge pull request #2021
e80e1b4 fix restore height option for hardware wallet restore (lacksfish)
2019-03-21 16:16:20 -04:00
luigi1111
11468d44be Merge pull request #2016
f5aec0e main: fix refreshing of language fields (mmbyday)
2019-03-21 16:15:21 -04:00
luigi1111
9c8b123fe5 Merge pull request #2015
e5bdf34 historytable: fix blockheight copying (mmbyday)
2019-03-21 16:14:34 -04:00
luigi1111
38788aab43 Merge pull request #2014
d6f8834 mining: fix layout issues (mmbyday)
2019-03-21 16:13:46 -04:00
luigi1111
9f53353b07 Merge pull request #2011
3562ab1 settingsnode: fix trusted node flag (mmbyday)
2019-03-21 16:13:02 -04:00
luigi1111
5c19a4d46f Merge pull request #1999
e664549 makes placeholder string untranslatable (erciccione)
2019-03-21 16:12:11 -04:00
luigi1111
3b791035bf Merge pull request #1976
dc5028f SettingsInfo: allow a date for restore height (selsta)
2019-03-21 16:11:08 -04:00
luigi1111
c47fed96b0 Merge pull request #1971
1ff1091 transfer, merchant: placehodler text for amount (mmbyday)
2019-03-21 16:10:15 -04:00
luigi1111
072d0dea24 Merge pull request #1965
01844ef transfer: messaging for disabled send button (mmbyday)
2019-03-21 16:09:13 -04:00
Monero-Pootle
190e2eb9ab round of translations (about 600 strings) 2019-03-17 18:49:54 +00:00
lacksfish
e80e1b4c1f fix restore height option for hardware wallet restore 2019-03-17 05:40:26 +01:00
Dusan Klinec
9074633751 device: Trezor support added 2019-03-15 14:21:37 +01:00
mmbyday
f5aec0eba9 main: fix refreshing of language fields 2019-03-12 18:53:56 -07:00
mmbyday
e5bdf34325 historytable: fix blockheight copying 2019-03-12 18:11:56 -07:00
mmbyday
d6f88349b9 mining: fix layout issues 2019-03-12 16:32:11 -07:00
mmbyday
c2f1d0168b main: automatically fix common wallet cache errors 2019-03-12 00:25:46 -07:00
mmbyday
3562ab1444 settingsnode: fix trusted node flag 2019-03-11 22:51:12 -07:00
erciccione
e664549f43 makes placeholder string untranslatable 2019-03-09 15:15:36 +01:00
MaxXor
5403b94f2e Fix double titlebar 2019-03-07 15:23:23 +01:00
selsta
dc5028f019 SettingsInfo: allow a date for restore height 2019-02-27 00:26:16 +01:00
mmbyday
1ff1091ea4 transfer, merchant: placehodler text for amount 2019-02-25 12:17:54 -08:00
mmbyday
01844efaa7 transfer: messaging for disabled send button 2019-02-25 08:15:08 -08:00
389 changed files with 78358 additions and 47950 deletions

34
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,34 @@
name: GUI build
on: [push, pull_request]
jobs:
build-macos:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v1
- name: update brew and install dependencies
run: brew update && brew install boost hidapi zmq libpgm unbound libsodium miniupnpc ldns expat doxygen graphviz libunwind-headers protobuf qt5
- name: build
run: export PATH=$PATH:/usr/local/opt/qt/bin && ./build.sh
- 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
- 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
- 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 xvfb
- name: build
run: ./build.sh
- name: test qml
run: xvfb-run -a build/release/bin/monero-wallet-gui --test-qml

22
.gitignore vendored
View File

@@ -11,3 +11,25 @@ moc_*
*.xcodeproj
monero-wallet-gui_plugin_import.cpp
monero-wallet-gui_qml_plugin_import.cpp
*.qmlc
*.jsc
### Vim ###
# Swap
[._]*.s[a-v][a-z]
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]
# Session
Session.vim
# Temporary
.netrwhist
*~
*.autosave
# Auto-generated tag files
tags
# Persistent undo
[._]*.un~

412
CMakeLists.txt Normal file
View File

@@ -0,0 +1,412 @@
cmake_minimum_required(VERSION 3.10)
project(monero-gui)
message(STATUS "Initiating compile using CMake ${CMAKE_VERSION}")
set(VERSION_MAJOR "14")
set(VERSION_MINOR "0")
set(VERSION_REVISION "3")
set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}")
# libwallet requires a static build, so we only allow static compilation
set(STATIC ON)
option(USE_DEVICE_TREZOR ON)
option(ENABLE_PASS_STRENGTH_METER "Disable zxcvbn" 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")
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
if(DEBUG)
set(CMAKE_VERBOSE_MAKEFILE ON)
endif()
set(BUILD_GUI_DEPS ON)
set(ARCH "x86-64")
set(BUILD_64 ON)
set(INSTALL_VENDORED_LIBUNBOUND=ON)
function (add_c_flag_if_supported flag var)
string(REPLACE "-" "_" supported ${flag}_c)
check_c_compiler_flag(${flag} ${supported})
if(${${supported}})
set(${var} "${${var}} ${flag}" PARENT_SCOPE)
endif()
endfunction()
function (add_cxx_flag_if_supported flag var)
string(REPLACE "-" "_" supported ${flag}_cxx)
check_cxx_compiler_flag(${flag} ${supported})
if(${${supported}})
set(${var} "${${var}} ${flag}" PARENT_SCOPE)
endif()
endfunction()
function (add_linker_flag_if_supported flag var)
string(REPLACE "-" "_" supported ${flag}_ld)
string(REPLACE "," "_" supported ${flag}_ld)
check_linker_flag(${flag} ${supported})
if(${${supported}})
set(${var} "${${var}} ${flag}" PARENT_SCOPE)
endif()
endfunction()
find_package(Git)
if(GIT_FOUND)
if(NOT DEV_MODE)
find_package(Git)
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\nor run cmake with -DMANUAL_SUBMODULES=1,\n or if you want to build from latest master run cmake with -DEV_MODE,\n or run make devmode")
endif()
endfunction ()
message(STATUS "Checking submodules")
check_submodule(monero)
else()
execute_process(COMMAND cd monero && git checkout origin/master)
endif()
endif()
add_subdirectory(monero)
set_property(TARGET wallet_merged PROPERTY FOLDER "monero")
get_directory_property(ARCH_WIDTH DIRECTORY "monero" DEFINITION ARCH_WIDTH)
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(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
add_definitions(-DMONERO_GUI_STATIC)
endif()
# Include password strength library
if(ENABLE_PASS_STRENGTH_METER)
message(STATUS "Buildin with pass strength meter support.")
else()
add_definitions(-DDISABLE_PASS_STRENGTH_METER)
endif()
include(CheckTrezor) # Trezor support check
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
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()
find_package(Boost 1.62 REQUIRED COMPONENTS
system
filesystem
thread
date_time
chrono
regex
serialization
program_options
locale)
if(LINUX)
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")
link_directories("${msys2_install_path}/mingw${ARCH_WIDTH}/qml/Qt/labs/folderlistmodel")
link_directories("${msys2_install_path}/mingw${ARCH_WIDTH}/qml/Qt/labs/settings")
link_directories("${msys2_install_path}/mingw${ARCH_WIDTH}/qml/QtGraphicalEffects")
link_directories("${msys2_install_path}/mingw${ARCH_WIDTH}/qml/QtGraphicalEffects/private")
link_directories("${msys2_install_path}/mingw${ARCH_WIDTH}/qml/QtMultimedia")
link_directories("${msys2_install_path}/mingw${ARCH_WIDTH}/qml/QtQuick.2")
link_directories("${msys2_install_path}/mingw${ARCH_WIDTH}/qml/QtQuick/Controls")
link_directories("${msys2_install_path}/mingw${ARCH_WIDTH}/qml/QtQuick/Controls.2")
link_directories("${msys2_install_path}/mingw${ARCH_WIDTH}/qml/QtQuick/Dialogs")
link_directories("${msys2_install_path}/mingw${ARCH_WIDTH}/qml/QtQuick/Dialogs/Private")
link_directories("${msys2_install_path}/mingw${ARCH_WIDTH}/qml/QtQuick/Layouts")
link_directories("${msys2_install_path}/mingw${ARCH_WIDTH}/qml/QtQuick/PrivateWidgets")
link_directories("${msys2_install_path}/mingw${ARCH_WIDTH}/qml/QtQuick/Templates.2")
link_directories("${msys2_install_path}/mingw${ARCH_WIDTH}/qml/QtQuick/Window.2")
link_directories("${msys2_install_path}/mingw${ARCH_WIDTH}/qml/QtQuick/XmlListModel")
# 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
Qt5QuickControls2
Qt5Widgets
Qt5Gui
Qt5Network
Qt5Qml
Qt5Multimedia
Qt5Xml
Qt5XmlPatterns
Qt5Svg
)
foreach(QT5_MODULE ${QT5_LIBRARIES})
find_package(${QT5_MODULE} REQUIRED)
endforeach()
find_package(PkgConfig)
if(PKGCONFIG_FOUND)
pkg_check_modules(QT5_PKG_CONFIG ${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()
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()
endif()
list(APPEND QT5_LIBRARIES
${Qt5Gui_PLUGINS}
${Qt5Svg_PLUGINS}
${Qt5Qml_PLUGINS}
${Qt5Network_PLUGINS}
)
if(STATIC)
set(QT5_LIBRARIES
qtquickcontrols2plugin # has to be the first one, depends on Qt5QuickControls2
${QT5_LIBRARIES}
declarative_multimedia
dialogplugin
dialogsprivateplugin
qmlfolderlistmodelplugin
qmlsettingsplugin
qmlxmllistmodelplugin
qquicklayoutsplugin
Qt5EventDispatcherSupport
Qt5FontDatabaseSupport
Qt5MultimediaQuick_p
Qt5PacketProtocol
Qt5ThemeSupport
qtgraphicaleffectsplugin
qtgraphicaleffectsprivate
qtquick2plugin
qtquickcontrolsplugin
qtquicktemplates2plugin
widgetsplugin
windowplugin
)
if(MINGW)
list(APPEND QT5_LIBRARIES qtfreetype)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
list(APPEND QT5_LIBRARIES D3D11 Dwrite D2d1)
endif()
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 OR 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(-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 (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()
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} ${C_SECURITY_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_SECURITY_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${LD_SECURITY_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)
list(APPEND EXTRA_LIBRARIES setupapi Version)
endif()
endif()
add_subdirectory(src)
# Required to make wallet_merged build before the gui
add_dependencies(monero-gui wallet_merged)

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project
// Copyright (c) 2014-2019, The Monero Project
//
// All rights reserved.
//
@@ -26,26 +26,31 @@
// 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.2
import QtQuick 2.9
import QtQuick.Layouts 1.1
import QtGraphicalEffects 1.0
import moneroComponents.Wallet 1.0
import moneroComponents.NetworkType 1.0
import moneroComponents.Clipboard 1.0
import FontAwesome 1.0
import "components" as MoneroComponents
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 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 }
@@ -59,7 +64,6 @@ Rectangle {
signal addressBookClicked()
signal miningClicked()
signal signClicked()
signal keysClicked()
signal merchantClicked()
signal accountClicked()
@@ -76,23 +80,27 @@ Rectangle {
else if(pos === "Sign") menuColumn.previousButton = signButton
else if(pos === "Settings") menuColumn.previousButton = settingsButton
else if(pos === "Advanced") menuColumn.previousButton = advancedButton
else if(pos === "Keys") menuColumn.previousButton = keysButton
else if(pos === "Account") menuColumn.previousButton = accountButton
menuColumn.previousButton.checked = true
}
width: (isMobile)? appWindow.width : 300
width: 300
color: "transparent"
anchors.bottom: parent.bottom
anchors.top: parent.top
Image {
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
height: panel.height
source: "images/leftPanelBg.jpg"
z: 1
MoneroEffects.GradientBackground {
anchors.fill: parent
fallBackColor: MoneroComponents.Style.middlePanelBackgroundColor
initialStartColor: MoneroComponents.Style.leftPanelBackgroundGradientStart
initialStopColor: MoneroComponents.Style.leftPanelBackgroundGradientStop
blackColorStart: MoneroComponents.Style._b_leftPanelBackgroundGradientStart
blackColorStop: MoneroComponents.Style._b_leftPanelBackgroundGradientStop
whiteColorStart: MoneroComponents.Style._w_leftPanelBackgroundGradientStart
whiteColorStop: MoneroComponents.Style._w_leftPanelBackgroundGradientStop
posStart: 0.6
start: Qt.point(0, 0)
end: Qt.point(height, width)
}
// card with monero logo
@@ -100,30 +108,43 @@ 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 {
visible: true
Item {
Item {
anchors.left: parent.left
anchors.top: parent.top
anchors.topMargin: 20
anchors.leftMargin: 20
anchors.verticalCenter: parent.verticalCenter
height: 490 * scaleRatio
width: 260 * scaleRatio
height: 490
width: 260
Image {
width: 260; height: 170
id: card
visible: !isOpenGL || MoneroComponents.Style.blackTheme
width: 260
height: 135
fillMode: Image.PreserveAspectFit
source: "images/card-background.png"
source: MoneroComponents.Style.blackTheme ? "qrc:///images/card-background-black.png" : "qrc:///images/card-background-white.png"
}
Text {
DropShadow {
visible: isOpenGL && !MoneroComponents.Style.blackTheme
anchors.fill: card
horizontalOffset: 3
verticalOffset: 3
radius: 10.0
samples: 15
color: "#3B000000"
source: card
cached: true
}
MoneroComponents.TextPlain {
id: testnetLabel
visible: persistentSettings.nettype != NetworkType.MAINNET
text: (persistentSettings.nettype == NetworkType.TESTNET ? qsTr("Testnet") : qsTr("Stagenet")) + translationManager.emptyString
@@ -134,9 +155,10 @@ Rectangle {
font.bold: true
font.pixelSize: 12
color: "#f33434"
themeTransition: false
}
Text {
MoneroComponents.TextPlain {
id: viewOnlyLabel
visible: viewOnly
text: qsTr("View Only") + translationManager.emptyString
@@ -147,37 +169,7 @@ Rectangle {
font.pixelSize: 12
font.bold: true
color: "#ff9323"
}
Rectangle {
height: (logoutImage.height + 8) * scaleRatio
width: (logoutImage.width + 8) * scaleRatio
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 * scaleRatio
width: 13 * scaleRatio
source: "../images/logout.png"
}
MouseArea{
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: {
middlePanel.addressBookView.clearFields();
middlePanel.transferView.clearFields();
middlePanel.receiveView.clearFields();
appWindow.showWizard();
}
}
themeTransition: false
}
}
@@ -186,109 +178,154 @@ Rectangle {
anchors.top: parent.top
anchors.topMargin: 20
anchors.leftMargin: 20
anchors.verticalCenter: parent.verticalCenter
height: 490 * scaleRatio
width: 50 * scaleRatio
height: 490
width: 50
Text {
visible: !isMobile
id: balanceText
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: {
var digits = text.split('.')[0].length
var defaultSize = 22;
if(digits > 2) {
return defaultSize - 1.1*digits
}
return defaultSize;
}
anchors.topMargin: 23
themeTransition: false
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)
}
}
}
Text {
id: unlockedBalanceText
visible: true
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: {
var digits = text.split('.')[0].length
var defaultSize = 20;
if(digits > 3) {
return defaultSize - 0.6*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)
}
onClicked: appWindow.showPageRequest("Account")
}
}
MoneroComponents.Label {
id: unlockedBalanceLabel
visible: true
text: qsTr("Unlocked balance") + translationManager.emptyString
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
}
MoneroComponents.Label {
visible: !isMobile
id: balanceLabel
text: qsTr("Balance") + translationManager.emptyString
fontSize: 14
anchors.left: parent.left
anchors.leftMargin: 20
anchors.top: parent.top
anchors.topMargin: 60
anchors.topMargin: 36
themeTransition: false
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...")
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"
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
onEntered: {
balancePart1.color = MoneroComponents.Style.orange
balancePart2.color = MoneroComponents.Style.orange
}
onExited: {
balancePart1.color = Qt.binding(function() { return MoneroComponents.Style.blackTheme ? "white" : "black" })
balancePart2.color = Qt.binding(function() { return MoneroComponents.Style.blackTheme ? "white" : "black" })
}
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: MoneroComponents.Style.blackTheme ? "white" : "black"
text: {
if (persistentSettings.fiatPriceEnabled && persistentSettings.fiatPriceToggle) {
return balanceFiatString.split('.')[1]
} else {
return balanceString.split('.')[1]
}
}
font.pixelSize: 16
MouseArea {
hoverEnabled: true
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onEntered: balancePart1MouseArea.entered()
onExited: balancePart1MouseArea.exited()
onClicked: balancePart1MouseArea.clicked(mouse)
}
}
Item { //separator
anchors.left: parent.left
anchors.right: parent.right
@@ -304,20 +341,19 @@ 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
width: parent.width
boundsBehavior: isMac ? Flickable.DragAndOvershootBounds : Flickable.StopAtBounds
clip: true
Column {
id: menuColumn
anchors.left: parent.left
anchors.right: parent.right
@@ -326,12 +362,10 @@ Rectangle {
property var previousButton: transferButton
// top border
Rectangle {
MoneroComponents.MenuButtonDivider {
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 16
color: "#313131"
height: 1
anchors.leftMargin: 20
}
// ------------- Account tab ---------------
@@ -341,7 +375,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
@@ -349,13 +382,11 @@ Rectangle {
}
}
Rectangle {
MoneroComponents.MenuButtonDivider {
visible: accountButton.present
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 16
color: "#313131"
height: 1
anchors.leftMargin: 20
}
// ------------- Transfer tab ---------------
@@ -365,7 +396,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
@@ -373,13 +403,11 @@ Rectangle {
}
}
Rectangle {
MoneroComponents.MenuButtonDivider {
visible: transferButton.present
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 16
color: "#313131"
height: 1
anchors.leftMargin: 20
}
// ------------- AddressBook tab ---------------
@@ -390,7 +418,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
@@ -399,13 +426,11 @@ Rectangle {
}
}
Rectangle {
MoneroComponents.MenuButtonDivider {
visible: addressBookButton.present
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 16
color: "#313131"
height: 1
anchors.leftMargin: 20
}
// ------------- Receive tab ---------------
@@ -415,20 +440,18 @@ 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
panel.receiveClicked()
}
}
Rectangle {
MoneroComponents.MenuButtonDivider {
visible: receiveButton.present
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 16
color: "#313131"
height: 1
anchors.leftMargin: 20
}
// ------------- Merchant tab ---------------
@@ -440,7 +463,6 @@ Rectangle {
anchors.right: parent.right
text: qsTr("Merchant") + translationManager.emptyString
symbol: qsTr("U") + translationManager.emptyString
dotColor: "#FF4F41"
under: receiveButton
onClicked: {
parent.previousButton.checked = false
@@ -449,13 +471,11 @@ Rectangle {
}
}
Rectangle {
MoneroComponents.MenuButtonDivider {
visible: merchantButton.present && appWindow.walletMode >= 2
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 16
color: "#313131"
height: 1
anchors.leftMargin: 20
}
// ------------- History tab ---------------
@@ -464,22 +484,20 @@ Rectangle {
id: historyButton
anchors.left: parent.left
anchors.right: parent.right
text: qsTr("History") + translationManager.emptyString
text: qsTr("Transactions") + translationManager.emptyString
symbol: qsTr("H") + translationManager.emptyString
dotColor: "#6B0072"
onClicked: {
parent.previousButton.checked = false
parent.previousButton = historyButton
panel.historyClicked()
}
}
Rectangle {
MoneroComponents.MenuButtonDivider {
visible: historyButton.present
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 16
color: "#313131"
height: 1
anchors.leftMargin: 20
}
// ------------- Advanced tab ---------------
@@ -490,20 +508,17 @@ 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
}
}
Rectangle {
MoneroComponents.MenuButtonDivider {
visible: advancedButton.present && appWindow.walletMode >= 2
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 16
color: "#313131"
height: 1
anchors.leftMargin: 20
}
// ------------- Mining tab ---------------
@@ -514,7 +529,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
@@ -523,14 +537,13 @@ Rectangle {
}
}
Rectangle {
MoneroComponents.MenuButtonDivider {
visible: miningButton.present && appWindow.walletMode >= 2
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 16
color: miningButton.checked || settingsButton.checked ? "#1C1C1C" : "#313131"
height: 1
anchors.leftMargin: 20
}
// ------------- TxKey tab ---------------
MoneroComponents.MenuButton {
id: txkeyButton
@@ -539,7 +552,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
@@ -547,14 +559,14 @@ Rectangle {
panel.txkeyClicked()
}
}
Rectangle {
MoneroComponents.MenuButtonDivider {
visible: txkeyButton.present && appWindow.walletMode >= 2
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 16
color: "#313131"
height: 1
anchors.leftMargin: 20
}
// ------------- Shared RingDB tab ---------------
MoneroComponents.MenuButton {
id: sharedringdbButton
@@ -563,7 +575,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
@@ -571,16 +582,14 @@ Rectangle {
panel.sharedringdbClicked()
}
}
Rectangle {
MoneroComponents.MenuButtonDivider {
visible: sharedringdbButton.present && appWindow.walletMode >= 2
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 16
color: "#313131"
height: 1
anchors.leftMargin: 20
}
// ------------- Sign/verify tab ---------------
MoneroComponents.MenuButton {
id: signButton
@@ -589,7 +598,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
@@ -597,14 +605,14 @@ Rectangle {
panel.signClicked()
}
}
Rectangle {
MoneroComponents.MenuButtonDivider {
visible: signButton.present && appWindow.walletMode >= 2
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 16
color: "#313131"
height: 1
anchors.leftMargin: 20
}
// ------------- Settings tab ---------------
MoneroComponents.MenuButton {
id: settingsButton
@@ -612,44 +620,18 @@ 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
panel.settingsClicked()
}
}
Rectangle {
MoneroComponents.MenuButtonDivider {
visible: settingsButton.present
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 16
color: "#313131"
height: 1
}
// ------------- Sign/verify tab ---------------
MoneroComponents.MenuButton {
id: keysButton
visible: appWindow.walletMode >= 2
anchors.left: parent.left
anchors.right: parent.right
text: qsTr("Seed & Keys") + translationManager.emptyString
symbol: qsTr("Y") + translationManager.emptyString
dotColor: "#FFD781"
under: settingsButton
onClicked: {
parent.previousButton.checked = false
parent.previousButton = keysButton
panel.keysClicked()
}
}
Rectangle {
visible: settingsButton.present && appWindow.walletMode >= 2
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 16
color: "#313131"
height: 1
anchors.leftMargin: 20
}
} // Column
@@ -663,7 +645,7 @@ Rectangle {
anchors.leftMargin: 0
anchors.rightMargin: 0
anchors.bottom: networkStatus.top;
height: 10 * scaleRatio
height: 10
color: "transparent"
}
@@ -671,11 +653,11 @@ Rectangle {
id: networkStatus
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 5 * scaleRatio
anchors.leftMargin: 5
anchors.rightMargin: 0
anchors.bottom: (progressBar.visible)? progressBar.top : parent.bottom;
connected: Wallet.ConnectionStatus_Disconnected
height: 48 * scaleRatio
height: 48
}
MoneroComponents.ProgressBar {
@@ -683,8 +665,8 @@ Rectangle {
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: daemonProgressBar.top
height: 48 * scaleRatio
syncType: qsTr("Wallet")
height: 48
syncType: qsTr("Wallet") + translationManager.emptyString
visible: networkStatus.connected
}
@@ -693,20 +675,9 @@ Rectangle {
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
syncType: qsTr("Daemon")
syncType: qsTr("Daemon") + translationManager.emptyString
visible: networkStatus.connected
height: 62 * scaleRatio
height: 62
}
} // menuRect
// indicate disabled state
// Desaturate {
// anchors.fill: parent
// source: parent
// desaturation: panel.enabled ? 0.0 : 1.0
// }
}
}

View File

@@ -1,8 +0,0 @@
#ifndef LOGGER_H
#define LOGGER_H
const QString getLogPath(const QString logPath);
void messageHandler(QtMsgType type, const QMessageLogContext &context, const QString &message);
#endif // LOGGER_H

View File

@@ -1,14 +0,0 @@
#include "MainApp.h"
#include <QCloseEvent>
bool MainApp::event (QEvent *event)
{
// Catch application exit event and signal to qml app to handle exit
if(event->type() == QEvent::Close) {
event->ignore();
emit closing();
return true;
}
return false;
}

View File

@@ -1,18 +0,0 @@
#ifndef MAINAPP_H
#define MAINAPP_H
#include <QApplication>
class MainApp : public QApplication
{
Q_OBJECT
public:
MainApp(int &argc, char** argv) : QApplication(argc, argv) {};
private:
bool event(QEvent *e);
signals:
void closing();
};
#endif // MAINAPP_H

40
Makefile Normal file
View File

@@ -0,0 +1,40 @@
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),)
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
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)
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=c:/msys64 -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=c:/msys64 -D MINGW=ON $(topdir) && $(MAKE)

View File

@@ -28,33 +28,27 @@
import QtQml 2.0
import QtQuick 2.2
import QtQuick 2.9
import QtQuick.Controls 2.0
import QtQuick.Controls 1.4
import QtQuick.Layouts 1.1
import QtGraphicalEffects 1.0
import moneroComponents.Wallet 1.0
import "components" as MoneroComponents
import "./pages"
import "./pages/settings"
import "./pages/merchant"
import "components" as MoneroComponents
import "./components" as MoneroComponents
import "./components/effects/" as MoneroEffects
Rectangle {
id: root
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 * scaleRatio
property int minHeight: (appWindow.height > 800) ? appWindow.height : 800
property alias contentHeight: mainFlickable.contentHeight
property alias flickable: mainFlickable
// property int headerHeight: header.height
property Transfer transferView: Transfer { }
property Receive receiveView: Receive { }
@@ -82,10 +76,18 @@ Rectangle {
anchors.fill: parent
}
Image {
anchors.fill: parent
MoneroEffects.GradientBackground {
visible: currentView !== merchantView
source: "../images/middlePanelBg.jpg"
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)
}
onCurrentViewChanged: {
@@ -118,76 +120,65 @@ Rectangle {
State {
name: "History"
PropertyChanges { target: root; currentView: historyView }
PropertyChanges { target: historyView; model: appWindow.currentWallet ? appWindow.currentWallet.historyModel : null }
PropertyChanges { target: mainFlickable; contentHeight: historyView.tableHeight + 220 * scaleRatio }
PropertyChanges { target: mainFlickable; contentHeight: historyView.contentHeight + 80}
}, State {
name: "Transfer"
PropertyChanges { target: root; currentView: transferView }
PropertyChanges { target: mainFlickable; contentHeight: 700 * scaleRatio }
PropertyChanges { target: mainFlickable; contentHeight: transferView.transferHeight1 + transferView.transferHeight2 + 80 }
}, State {
name: "Receive"
PropertyChanges { target: root; currentView: receiveView }
PropertyChanges { target: mainFlickable; contentHeight: receiveView.receiveHeight + 100 }
name: "Receive"
PropertyChanges { target: root; currentView: receiveView }
PropertyChanges { target: mainFlickable; contentHeight: receiveView.receiveHeight + 80 }
}, State {
name: "Merchant"
PropertyChanges { target: root; currentView: merchantView }
PropertyChanges { target: mainFlickable; contentHeight: merchantView.merchantHeight + 100 }
PropertyChanges { target: mainFlickable; contentHeight: merchantView.merchantHeight + 80 }
}, State {
name: "TxKey"
PropertyChanges { target: root; currentView: txkeyView }
PropertyChanges { target: mainFlickable; contentHeight: 1200 * scaleRatio }
name: "TxKey"
PropertyChanges { target: root; currentView: txkeyView }
PropertyChanges { target: mainFlickable; contentHeight: txkeyView.txkeyHeight + 80 }
}, State {
name: "SharedRingDB"
PropertyChanges { target: root; currentView: sharedringdbView }
PropertyChanges { target: mainFlickable; contentHeight: sharedringdbView.panelHeight + 100 }
name: "SharedRingDB"
PropertyChanges { target: root; currentView: sharedringdbView }
PropertyChanges { target: mainFlickable; contentHeight: sharedringdbView.panelHeight + 80 }
}, State {
name: "AddressBook"
PropertyChanges { target: root; currentView: addressBookView }
PropertyChanges { target: mainFlickable; contentHeight: minHeight }
PropertyChanges { target: root; currentView: addressBookView }
PropertyChanges { target: mainFlickable; contentHeight: addressBookView.addressbookHeight + 80 }
}, State {
name: "Sign"
PropertyChanges { target: root; currentView: signView }
PropertyChanges { target: mainFlickable; contentHeight: 1000 * scaleRatio }
PropertyChanges { target: root; currentView: signView }
PropertyChanges { target: mainFlickable; contentHeight: signView.signHeight + 80 }
}, State {
name: "Settings"
PropertyChanges { target: root; currentView: settingsView }
PropertyChanges { target: mainFlickable; contentHeight: settingsView.settingsHeight }
PropertyChanges { target: root; currentView: settingsView }
PropertyChanges { target: mainFlickable; contentHeight: settingsView.settingsHeight }
}, State {
name: "Mining"
PropertyChanges { target: root; currentView: miningView }
PropertyChanges { target: mainFlickable; contentHeight: 700 * scaleRatio}
PropertyChanges { target: mainFlickable; contentHeight: miningView.miningHeight + 80 }
}, State {
name: "Keys"
PropertyChanges { target: root; currentView: keysView }
PropertyChanges { target: mainFlickable; contentHeight: keysView.keysHeight }
PropertyChanges { target: mainFlickable; contentHeight: keysView.keysHeight + 80}
}, State {
name: "Account"
PropertyChanges { target: root; currentView: accountView }
PropertyChanges { target: mainFlickable; contentHeight: minHeight }
name: "Account"
PropertyChanges { target: root; currentView: accountView }
PropertyChanges { target: mainFlickable; contentHeight: accountView.accountHeight + 80 }
}
]
// 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: currentView !== merchantView ? 20 * scaleRatio : 0
anchors.topMargin: appWindow.persistentSettings.customDecorations ? 50 * scaleRatio : 0
anchors.margins: {
if(currentView === merchantView || currentView === historyView)
return 0;
return 20;
}
anchors.topMargin: appWindow.persistentSettings.customDecorations ? 50 : 0
anchors.bottomMargin: 0
spacing: 0
Flickable {
@@ -195,15 +186,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: {
@@ -244,11 +237,28 @@ Rectangle {
// border
Rectangle {
anchors.top: styledRow.bottom
id: borderLeft
visible: middlePanel.state !== "Merchant"
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.left: parent.left
width: 1
color: "#313131"
color: MoneroComponents.Style.appWindowBorderColor
MoneroEffects.ColorTransition {
targetObj: parent
blackColor: MoneroComponents.Style._b_appWindowBorderColor
whiteColor: MoneroComponents.Style._w_appWindowBorderColor
}
}
// border shadow
Image {
source: "qrc:///images/middlePanelShadow.png"
width: 12
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.left: borderLeft.right
}
/* connect "payment" click */

View File

@@ -1,6 +1,6 @@
# Monero GUI
Copyright (c) 2014-2018, The Monero Project
Copyright (c) 2014-2019, The Monero Project
## Development resources
@@ -9,7 +9,7 @@ Copyright (c) 2014-2018, The Monero Project
- 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)
## Vulnerability response
@@ -58,7 +58,7 @@ See [LICENSE](LICENSE).
## Translations
Do you speak a second language and would like to help translate the Monero GUI? Sign up at [translate.getmonero.org](https://translate.getmonero.org), our localization platform. Navigate to the 'monero-gui' project and find the language you can help with. Suggest changes or add new translated text.
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.
&nbsp;
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)
@@ -75,6 +75,8 @@ 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.
### On Linux:
(Tested on Ubuntu 17.10 x64, Ubuntu 18.04 x64 and Gentoo x64)
@@ -83,19 +85,27 @@ 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`
- 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`
- 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 zeromq-devel`
2. Install Qt:
*Note*: Qt 5.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. You can still build the GUI if you install an [official Qt release](https://wiki.qt.io/Install_Qt_5_on_Ubuntu), but this is not officially supported.
*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.
The following instructions will fetch Qt from your distribution's repositories instead. Take note of what version it installs. Your mileage may vary.
- For Ubuntu 17.10+
`sudo apt 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`
`sudo apt 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`
- For Gentoo
@@ -135,7 +145,7 @@ The executable can be found in the build/release/bin folder.
3. Install [monero](https://github.com/monero-project/monero) dependencies:
`brew install boost --c++11`
`brew install boost`
`brew install openssl` - to install openssl headers
@@ -149,7 +159,7 @@ The executable can be found in the build/release/bin folder.
4. Install Qt:
`brew install qt5` (or download QT 5.8+ from [qt.io](https://www.qt.io/download-open-source/))
`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:
@@ -157,9 +167,8 @@ The executable can be found in the build/release/bin folder.
5. Add the Qt bin directory to your path
Example: `export PATH=$PATH:$HOME/Qt/5.8/clang_64/bin`
This is the directory where Qt 5.x is installed on **your** system
- Example for Qt: `export PATH=$PATH:$HOME/Qt/5.9.7/clang_64/bin`
- Example for Homebrew: `export PATH=$PATH:/usr/local/opt/qt/bin`
6. Grab an up-to-date copy of the monero-gui repository
@@ -177,7 +186,7 @@ The executable can be found in the `build/release/bin` folder.
**Note:** Workaround for "ERROR: Xcode not set up properly"
Edit `$HOME/Qt/5.8/clang_64/mkspecs/features/mac/default_pre.prf`
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")))`
@@ -199,7 +208,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
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
```
Optional : To build the flag `WITH_SCANNER`

View File

@@ -1,29 +0,0 @@
#ifndef TRANSLATIONMANAGER_H
#define TRANSLATIONMANAGER_H
#include <QObject>
class QTranslator;
class TranslationManager : public QObject
{
Q_OBJECT
Q_PROPERTY(QString emptyString READ emptyString NOTIFY languageChanged)
public:
Q_INVOKABLE bool setLanguage(const QString &language);
static TranslationManager *instance();
QString emptyString();
signals:
void languageChanged();
private:
explicit TranslationManager(QObject *parent = 0);
private:
static TranslationManager * m_instance;
QTranslator * m_translator;
};
#endif // TRANSLATIONMANAGER_H

View 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)

View 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
View 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;
}

View 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()

181
cmake/CheckTrezor.cmake Normal file
View File

@@ -0,0 +1,181 @@
OPTION(USE_DEVICE_TREZOR "Trezor support compilation" ON)
OPTION(USE_DEVICE_TREZOR_LIBUSB "Trezor LibUSB compilation" ON)
OPTION(USE_DEVICE_TREZOR_UDP_RELEASE "Trezor UdpTransport in release mode" OFF)
OPTION(USE_DEVICE_TREZOR_DEBUG "Trezor Debugging enabled" OFF)
OPTION(TREZOR_DEBUG "Main trezor debugging switch" OFF)
# Helper function to fix cmake < 3.6.0 FindProtobuf variables
function(_trezor_protobuf_fix_vars)
if(${CMAKE_VERSION} VERSION_LESS "3.6.0")
foreach(UPPER
PROTOBUF_SRC_ROOT_FOLDER
PROTOBUF_IMPORT_DIRS
PROTOBUF_DEBUG
PROTOBUF_LIBRARY
PROTOBUF_PROTOC_LIBRARY
PROTOBUF_INCLUDE_DIR
PROTOBUF_PROTOC_EXECUTABLE
PROTOBUF_LIBRARY_DEBUG
PROTOBUF_PROTOC_LIBRARY_DEBUG
PROTOBUF_LITE_LIBRARY
PROTOBUF_LITE_LIBRARY_DEBUG
)
if (DEFINED ${UPPER})
string(REPLACE "PROTOBUF_" "Protobuf_" Camel ${UPPER})
if (NOT DEFINED ${Camel})
set(${Camel} ${${UPPER}} PARENT_SCOPE)
endif()
endif()
endforeach()
endif()
endfunction()
# Use Trezor master switch
if (USE_DEVICE_TREZOR)
# Protobuf is required to build protobuf messages for Trezor
include(FindProtobuf OPTIONAL)
find_package(Protobuf)
_trezor_protobuf_fix_vars()
# Protobuf handling the cache variables set in docker.
if(NOT Protobuf_FOUND AND NOT Protobuf_LIBRARY AND NOT Protobuf_PROTOC_EXECUTABLE AND NOT Protobuf_INCLUDE_DIR)
message(STATUS "Could not find Protobuf")
elseif(NOT Protobuf_LIBRARY OR NOT EXISTS "${Protobuf_LIBRARY}")
message(STATUS "Protobuf library not found: ${Protobuf_LIBRARY}")
unset(Protobuf_FOUND)
elseif(NOT Protobuf_PROTOC_EXECUTABLE OR NOT EXISTS "${Protobuf_PROTOC_EXECUTABLE}")
message(STATUS "Protobuf executable not found: ${Protobuf_PROTOC_EXECUTABLE}")
unset(Protobuf_FOUND)
elseif(NOT Protobuf_INCLUDE_DIR OR NOT EXISTS "${Protobuf_INCLUDE_DIR}")
message(STATUS "Protobuf include dir not found: ${Protobuf_INCLUDE_DIR}")
unset(Protobuf_FOUND)
else()
message(STATUS "Protobuf lib: ${Protobuf_LIBRARY}, inc: ${Protobuf_INCLUDE_DIR}, protoc: ${Protobuf_PROTOC_EXECUTABLE}")
set(Protobuf_INCLUDE_DIRS ${Protobuf_INCLUDE_DIR})
set(Protobuf_FOUND 1) # override found if all rquired info was provided by variables
endif()
if(TREZOR_DEBUG)
set(USE_DEVICE_TREZOR_DEBUG 1)
endif()
# Compile debugging support (for tests)
if (USE_DEVICE_TREZOR_DEBUG)
add_definitions(-DWITH_TREZOR_DEBUGGING=1)
endif()
else()
message(STATUS "Trezor support disabled by USE_DEVICE_TREZOR")
endif()
if(Protobuf_FOUND AND USE_DEVICE_TREZOR)
if (NOT "$ENV{TREZOR_PYTHON}" STREQUAL "")
set(TREZOR_PYTHON "$ENV{TREZOR_PYTHON}" CACHE INTERNAL "Copied from environment variable TREZOR_PYTHON")
else()
find_package(Python QUIET COMPONENTS Interpreter) # cmake 3.12+
if(Python_Interpreter_FOUND)
set(TREZOR_PYTHON "${Python_EXECUTABLE}")
endif()
endif()
if(NOT TREZOR_PYTHON)
find_package(PythonInterp)
if(PYTHONINTERP_FOUND AND PYTHON_EXECUTABLE)
set(TREZOR_PYTHON "${PYTHON_EXECUTABLE}")
endif()
endif()
if(NOT TREZOR_PYTHON)
message(STATUS "Trezor: Python not found")
endif()
endif()
# Protobuf compilation test
if(Protobuf_FOUND AND USE_DEVICE_TREZOR AND TREZOR_PYTHON)
execute_process(COMMAND ${Protobuf_PROTOC_EXECUTABLE} -I "${CMAKE_SOURCE_DIR}/cmake" -I "${Protobuf_INCLUDE_DIR}" "${CMAKE_SOURCE_DIR}/cmake/test-protobuf.proto" --cpp_out ${CMAKE_BINARY_DIR} RESULT_VARIABLE RET OUTPUT_VARIABLE OUT ERROR_VARIABLE ERR)
if(RET)
message(STATUS "Protobuf test generation failed: ${OUT} ${ERR}")
endif()
try_compile(Protobuf_COMPILE_TEST_PASSED
"${CMAKE_BINARY_DIR}"
SOURCES
"${CMAKE_BINARY_DIR}/test-protobuf.pb.cc"
"${CMAKE_SOURCE_DIR}/cmake/test-protobuf.cpp"
CMAKE_FLAGS
"-DINCLUDE_DIRECTORIES=${Protobuf_INCLUDE_DIR};${CMAKE_BINARY_DIR}"
"-DCMAKE_CXX_STANDARD=11"
LINK_LIBRARIES ${Protobuf_LIBRARY}
OUTPUT_VARIABLE OUTPUT
)
if(NOT Protobuf_COMPILE_TEST_PASSED)
message(STATUS "Protobuf Compilation test failed: ${OUTPUT}.")
endif()
endif()
# Try to build protobuf messages
if(Protobuf_FOUND AND USE_DEVICE_TREZOR AND TREZOR_PYTHON AND Protobuf_COMPILE_TEST_PASSED)
set(ENV{PROTOBUF_INCLUDE_DIRS} "${Protobuf_INCLUDE_DIR}")
set(ENV{PROTOBUF_PROTOC_EXECUTABLE} "${Protobuf_PROTOC_EXECUTABLE}")
set(TREZOR_PROTOBUF_PARAMS "")
if (USE_DEVICE_TREZOR_DEBUG)
set(TREZOR_PROTOBUF_PARAMS "--debug")
endif()
execute_process(COMMAND ${TREZOR_PYTHON} tools/build_protob.py ${TREZOR_PROTOBUF_PARAMS} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/monero/src/device_trezor/trezor RESULT_VARIABLE RET OUTPUT_VARIABLE OUT ERROR_VARIABLE ERR)
if(RET)
message(WARNING "Trezor protobuf messages could not be regenerated (err=${RET}, python ${PYTHON})."
"OUT: ${OUT}, ERR: ${ERR}."
"Please read src/device_trezor/trezor/tools/README.md")
else()
message(STATUS "Trezor protobuf messages regenerated out: \"${OUT}.\"")
set(DEVICE_TREZOR_READY 1)
add_definitions(-DDEVICE_TREZOR_READY=1)
add_definitions(-DPROTOBUF_INLINE_NOT_IN_HEADERS=0)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
add_definitions(-DTREZOR_DEBUG=1)
endif()
if(USE_DEVICE_TREZOR_UDP_RELEASE)
add_definitions(-DUSE_DEVICE_TREZOR_UDP_RELEASE=1)
endif()
if (Protobuf_INCLUDE_DIR)
include_directories(${Protobuf_INCLUDE_DIR})
endif()
# LibUSB support, check for particular version
# Include support only if compilation test passes
if (USE_DEVICE_TREZOR_LIBUSB)
find_package(LibUSB)
endif()
if (LibUSB_COMPILE_TEST_PASSED)
add_definitions(-DHAVE_TREZOR_LIBUSB=1)
if(LibUSB_INCLUDE_DIRS)
include_directories(${LibUSB_INCLUDE_DIRS})
endif()
endif()
set(TREZOR_LIBUSB_LIBRARIES "")
if(LibUSB_COMPILE_TEST_PASSED)
list(APPEND TREZOR_LIBUSB_LIBRARIES ${LibUSB_LIBRARIES})
message(STATUS "Trezor compatible LibUSB found at: ${LibUSB_INCLUDE_DIRS}")
endif()
if (BUILD_GUI_DEPS)
set(TREZOR_DEP_LIBS "")
set(TREZOR_DEP_LINKER "")
if (Protobuf_LIBRARY)
list(APPEND TREZOR_DEP_LIBS ${Protobuf_LIBRARY})
string(APPEND TREZOR_DEP_LINKER " -lprotobuf")
endif()
if (TREZOR_LIBUSB_LIBRARIES)
list(APPEND TREZOR_DEP_LIBS ${TREZOR_LIBUSB_LIBRARIES})
string(APPEND TREZOR_DEP_LINKER " -lusb-1.0")
endif()
endif()
endif()
endif()

1803
cmake/Doxyfile.in Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,14 @@
/* increase vertical space */
#titlearea, #nav-path {
display: none;
height: 0px;
}
/* uncomment these lines for some extra vertical space */
/*
.tablist li {
line-height: 26px;
}
*/

98
cmake/FindBacktrace.cmake Normal file
View File

@@ -0,0 +1,98 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
#.rst:
# FindBacktrace
# -------------
#
# Find provider for backtrace(3).
#
# Checks if OS supports backtrace(3) via either libc or custom library.
# This module defines the following variables:
#
# ``Backtrace_HEADER``
# The header file needed for backtrace(3). Cached.
# Could be forcibly set by user.
# ``Backtrace_INCLUDE_DIRS``
# The include directories needed to use backtrace(3) header.
# ``Backtrace_LIBRARIES``
# The libraries (linker flags) needed to use backtrace(3), if any.
# ``Backtrace_FOUND``
# Is set if and only if backtrace(3) support detected.
#
# The following cache variables are also available to set or use:
#
# ``Backtrace_LIBRARY``
# The external library providing backtrace, if any.
# ``Backtrace_INCLUDE_DIR``
# The directory holding the backtrace(3) header.
#
# Typical usage is to generate of header file using configure_file() with the
# contents like the following::
#
# #cmakedefine01 Backtrace_FOUND
# #if Backtrace_FOUND
# # include <${Backtrace_HEADER}>
# #endif
#
# And then reference that generated header file in actual source.
include(CMakePushCheckState)
include(CheckSymbolExists)
include(FindPackageHandleStandardArgs)
# List of variables to be provided to find_package_handle_standard_args()
set(_Backtrace_STD_ARGS Backtrace_INCLUDE_DIR)
if(Backtrace_HEADER)
set(_Backtrace_HEADER_TRY "${Backtrace_HEADER}")
else(Backtrace_HEADER)
set(_Backtrace_HEADER_TRY "execinfo.h")
endif(Backtrace_HEADER)
find_path(Backtrace_INCLUDE_DIR "${_Backtrace_HEADER_TRY}")
set(Backtrace_INCLUDE_DIRS ${Backtrace_INCLUDE_DIR})
if (NOT DEFINED Backtrace_LIBRARY)
# First, check if we already have backtrace(), e.g., in libc
cmake_push_check_state(RESET)
set(CMAKE_REQUIRED_INCLUDES ${Backtrace_INCLUDE_DIRS})
set(CMAKE_REQUIRED_QUIET ${Backtrace_FIND_QUIETLY})
check_symbol_exists("backtrace" "${_Backtrace_HEADER_TRY}" _Backtrace_SYM_FOUND)
cmake_pop_check_state()
endif()
if(_Backtrace_SYM_FOUND)
# Avoid repeating the message() call below each time CMake is run.
if(NOT Backtrace_FIND_QUIETLY AND NOT DEFINED Backtrace_LIBRARY)
message(STATUS "backtrace facility detected in default set of libraries")
endif()
set(Backtrace_LIBRARY "" CACHE FILEPATH "Library providing backtrace(3), empty for default set of libraries")
else()
# Check for external library, for non-glibc systems
if(Backtrace_INCLUDE_DIR)
# OpenBSD has libbacktrace renamed to libexecinfo
find_library(Backtrace_LIBRARY "execinfo")
elseif() # respect user wishes
set(_Backtrace_HEADER_TRY "backtrace.h")
find_path(Backtrace_INCLUDE_DIR ${_Backtrace_HEADER_TRY})
find_library(Backtrace_LIBRARY "backtrace")
endif()
# Prepend list with library path as it's more common practice
set(_Backtrace_STD_ARGS Backtrace_LIBRARY ${_Backtrace_STD_ARGS})
endif()
message(STATUS "Backtrace_LIBRARY: ${Backtrace_LIBRARY}")
if(Backtrace_LIBRARY STREQUAL "NOTFOUND")
set(Backtrace_LIBRARY "")
endif()
if(Backtrace_LIBRARY STREQUAL "Backtrace_LIBRARY-NOTFOUND")
set(Backtrace_LIBRARY "")
endif()
set(Backtrace_LIBRARIES ${Backtrace_LIBRARY})
set(Backtrace_HEADER "${_Backtrace_HEADER_TRY}" CACHE STRING "Header providing backtrace(3) facility")
find_package_handle_standard_args(Backtrace FOUND_VAR Backtrace_FOUND REQUIRED_VARS ${_Backtrace_STD_ARGS})
mark_as_advanced(Backtrace_HEADER Backtrace_INCLUDE_DIR Backtrace_LIBRARY)

View File

@@ -0,0 +1,25 @@
# - Try to find Berkeley DB
# Once done this will define
#
# BERKELEY_DB_FOUND - system has Berkeley DB
# BERKELEY_DB_INCLUDE_DIR - the Berkeley DB include directory
# BERKELEY_DB_LIBRARIES - Link these to use Berkeley DB
# BERKELEY_DB_DEFINITIONS - Compiler switches required for using Berkeley DB
# Copyright (c) 2006, Alexander Dymo, <adymo@kdevelop.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
find_path(BERKELEY_DB_INCLUDE_DIR db_cxx.h
/usr/include/db4
/usr/local/include/db4
)
find_library(BERKELEY_DB_LIBRARIES NAMES db_cxx )
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Berkeley "Could not find Berkeley DB >= 4.1" BERKELEY_DB_INCLUDE_DIR BERKELEY_DB_LIBRARIES)
# show the BERKELEY_DB_INCLUDE_DIR and BERKELEY_DB_LIBRARIES variables only in the advanced view
mark_as_advanced(BERKELEY_DB_INCLUDE_DIR BERKELEY_DB_LIBRARIES )

60
cmake/FindHIDAPI.cmake Normal file
View 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
View 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 )

41
cmake/FindLibunwind.cmake Normal file
View File

@@ -0,0 +1,41 @@
# - Try to find libunwind
# Once done this will define
#
# LIBUNWIND_FOUND - system has libunwind
# LIBUNWIND_INCLUDE_DIR - the libunwind include directory
# LIBUNWIND_LIBRARIES - Link these to use libunwind
# LIBUNWIND_DEFINITIONS - Compiler switches required for using libunwind
# Copyright (c) 2006, Alexander Dymo, <adymo@kdevelop.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
find_path(LIBUNWIND_INCLUDE_DIR libunwind.h
/usr/include
/usr/local/include
)
find_library(LIBUNWIND_LIBRARIES NAMES unwind )
if(NOT LIBUNWIND_LIBRARIES STREQUAL "LIBUNWIND_LIBRARIES-NOTFOUND")
if (CMAKE_COMPILER_IS_GNUCC)
set(LIBUNWIND_LIBRARIES "gcc_eh;${LIBUNWIND_LIBRARIES}")
endif()
endif()
# some versions of libunwind need liblzma, and we don't use pkg-config
# so we just look whether liblzma is installed, and add it if it is.
# It might not be actually needed, but doesn't hurt if it is not.
# We don't need any headers, just the lib, as it's privately needed.
message(STATUS "looking for liblzma")
find_library(LIBLZMA_LIBRARIES lzma )
if(NOT LIBLZMA_LIBRARIES STREQUAL "LIBLZMA_LIBRARIES-NOTFOUND")
message(STATUS "liblzma found")
set(LIBUNWIND_LIBRARIES "${LIBUNWIND_LIBRARIES};${LIBLZMA_LIBRARIES}")
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Libunwind "Could not find libunwind" LIBUNWIND_INCLUDE_DIR LIBUNWIND_LIBRARIES)
# show the LIBUNWIND_INCLUDE_DIR and LIBUNWIND_LIBRARIES variables only in the advanced view
mark_as_advanced(LIBUNWIND_INCLUDE_DIR LIBUNWIND_LIBRARIES )

59
cmake/FindMiniupnpc.cmake Normal file
View File

@@ -0,0 +1,59 @@
# --------------------------------- FindMiniupnpc Start ---------------------------------
# Locate miniupnp library
# This module defines
# MINIUPNP_FOUND, if false, do not try to link to miniupnp
# MINIUPNP_LIBRARY, the miniupnp variant
# MINIUPNP_INCLUDE_DIR, where to find miniupnpc.h and family)
# MINIUPNPC_VERSION_1_7_OR_HIGHER, set if we detect the version of miniupnpc is 1.7 or higher
#
# Note that the expected include convention is
# #include "miniupnpc.h"
# and not
# #include <miniupnpc/miniupnpc.h>
# This is because, the miniupnpc location is not standardized and may exist
# in locations other than miniupnpc/
if (MINIUPNP_INCLUDE_DIR AND MINIUPNP_LIBRARY)
# Already in cache, be silent
set(MINIUPNP_FIND_QUIETLY TRUE)
endif ()
find_path(MINIUPNP_INCLUDE_DIR miniupnpc.h
HINTS $ENV{MINIUPNP_INCLUDE_DIR}
PATH_SUFFIXES miniupnpc
)
find_library(MINIUPNP_LIBRARY miniupnpc
HINTS $ENV{MINIUPNP_LIBRARY}
)
find_library(MINIUPNP_STATIC_LIBRARY libminiupnpc.a
HINTS $ENV{MINIUPNP_STATIC_LIBRARY}
)
set(MINIUPNP_INCLUDE_DIRS ${MINIUPNP_INCLUDE_DIR})
set(MINIUPNP_LIBRARIES ${MINIUPNP_LIBRARY})
set(MINIUPNP_STATIC_LIBRARIES ${MINIUPNP_STATIC_LIBRARY})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
MiniUPnPc DEFAULT_MSG
MINIUPNP_INCLUDE_DIR
MINIUPNP_LIBRARY
)
IF(MINIUPNPC_FOUND)
file(STRINGS "${MINIUPNP_INCLUDE_DIR}/miniupnpc.h" MINIUPNPC_API_VERSION_STR REGEX "^#define[\t ]+MINIUPNPC_API_VERSION[\t ]+[0-9]+")
if(MINIUPNPC_API_VERSION_STR MATCHES "^#define[\t ]+MINIUPNPC_API_VERSION[\t ]+([0-9]+)")
set(MINIUPNPC_API_VERSION "${CMAKE_MATCH_1}")
if (${MINIUPNPC_API_VERSION} GREATER "10" OR ${MINIUPNPC_API_VERSION} EQUAL "10")
message(STATUS "Found miniupnpc API version " ${MINIUPNPC_API_VERSION})
set(MINIUPNP_FOUND true)
set(MINIUPNPC_VERSION_1_7_OR_HIGHER true)
endif()
endif()
ENDIF()
mark_as_advanced(MINIUPNP_INCLUDE_DIR MINIUPNP_LIBRARY MINIUPNP_STATIC_LIBRARY)
# --------------------------------- FindMiniupnpc End ---------------------------------

91
cmake/FindReadline.cmake Normal file
View File

@@ -0,0 +1,91 @@
# - Try to find readline include dirs and libraries
#
# Usage of this module as follows:
#
# find_package(Readline)
#
# Variables used by this module, they can change the default behaviour and need
# to be set before calling find_package:
#
# Readline_ROOT_DIR Set this variable to the root installation of
# readline if the module has problems finding the
# proper installation path.
#
# Variables defined by this module:
#
# READLINE_FOUND System has readline, include and lib dirs found
# GNU_READLINE_FOUND Version of readline found is GNU readline, not libedit!
# LIBEDIT_FOUND Version of readline found is libedit, not GNU readline!
# Readline_INCLUDE_DIR The readline include directories.
# Readline_LIBRARY The readline library.
# GNU_READLINE_LIBRARY The GNU readline library or empty string.
# LIBEDIT_LIBRARY The libedit library or empty string.
find_path(Readline_ROOT_DIR
NAMES include/readline/readline.h
PATHS /usr/local/opt/readline/ /opt/local/ /usr/local/ /usr/
NO_DEFAULT_PATH
)
find_path(Readline_INCLUDE_DIR
NAMES readline/readline.h
PATHS ${Readline_ROOT_DIR}/include
NO_DEFAULT_PATH
)
find_library(Readline_LIBRARY
NAMES readline
PATHS ${Readline_ROOT_DIR}/lib
NO_DEFAULT_PATH
)
find_library(Termcap_LIBRARY
NAMES tinfo termcap ncursesw ncurses cursesw curses
)
if(Readline_INCLUDE_DIR AND Readline_LIBRARY)
set(READLINE_FOUND TRUE)
else(Readline_INCLUDE_DIR AND Readline_LIBRARY)
FIND_LIBRARY(Readline_LIBRARY NAMES readline PATHS Readline_ROOT_DIR)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Readline DEFAULT_MSG Readline_INCLUDE_DIR Readline_LIBRARY )
MARK_AS_ADVANCED(Readline_INCLUDE_DIR Readline_LIBRARY)
endif(Readline_INCLUDE_DIR AND Readline_LIBRARY)
mark_as_advanced(
Readline_ROOT_DIR
Readline_INCLUDE_DIR
Readline_LIBRARY
)
set(CMAKE_REQUIRED_INCLUDES ${Readline_INCLUDE_DIR})
set(CMAKE_REQUIRED_LIBRARIES ${Readline_LIBRARY})
include(CheckFunctionExists)
check_function_exists(rl_copy_text HAVE_COPY_TEXT)
check_function_exists(rl_filename_completion_function HAVE_COMPLETION_FUNCTION)
if(NOT HAVE_COMPLETION_FUNCTION)
if (Readline_LIBRARY)
set(CMAKE_REQUIRED_LIBRARIES ${Readline_LIBRARY} ${Termcap_LIBRARY})
endif(Readline_LIBRARY)
check_function_exists(rl_copy_text HAVE_COPY_TEXT_TC)
check_function_exists(rl_filename_completion_function HAVE_COMPLETION_FUNCTION_TC)
set(HAVE_COMPLETION_FUNCTION ${HAVE_COMPLETION_FUNCTION_TC})
set(HAVE_COPY_TEXT ${HAVE_COPY_TEXT_TC})
if(HAVE_COMPLETION_FUNCTION)
set(Readline_LIBRARY ${Readline_LIBRARY} ${Termcap_LIBRARY})
endif(HAVE_COMPLETION_FUNCTION)
endif(NOT HAVE_COMPLETION_FUNCTION)
set(LIBEDIT_LIBRARY "")
set(GNU_READLINE_LIBRARY "")
if(HAVE_COMPLETION_FUNCTION AND HAVE_COPY_TEXT)
set(GNU_READLINE_FOUND TRUE)
set(GNU_READLINE_LIBRARY ${Readline_LIBRARY})
elseif(READLINE_FOUND AND NOT HAVE_COPY_TEXT)
set(LIBEDIT_FOUND TRUE)
set(LIBEDIT_LIBRARY ${Readline_LIBRARY})
endif(HAVE_COMPLETION_FUNCTION AND HAVE_COPY_TEXT)

40
cmake/FindUnbound.cmake Normal file
View File

@@ -0,0 +1,40 @@
# 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.
MESSAGE(STATUS "Looking for libunbound")
FIND_PATH(UNBOUND_INCLUDE_DIR
NAMES unbound.h
PATH_SUFFIXES include/ include/unbound/
PATHS "${PROJECT_SOURCE_DIR}"
${UNBOUND_ROOT}
$ENV{UNBOUND_ROOT}
/usr/local/
/usr/
)
find_library(UNBOUND_LIBRARIES unbound)

22
cmake/FindZBar0.cmake Normal file
View 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}")

68
cmake/GenVersion.cmake Normal file
View File

@@ -0,0 +1,68 @@
# 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
# Check what commit we're on
execute_process(COMMAND "${GIT}" rev-parse --short=9 HEAD RESULT_VARIABLE RET OUTPUT_VARIABLE COMMIT OUTPUT_STRIP_TRAILING_WHITESPACE)
if(RET)
# Something went wrong, set the version tag to -unknown
message(WARNING "Cannot determine current commit. Make sure that you are building either from a Git working tree or from a source archive.")
set(VERSIONTAG "unknown")
set(VERSION_IS_RELEASE "false")
configure_file("monero/src/version.cpp.in" "${TO}")
else()
string(SUBSTRING ${COMMIT} 0 9 COMMIT)
message(STATUS "You are currently on commit ${COMMIT}")
# Get all the tags
execute_process(COMMAND "${GIT}" rev-list --tags --max-count=1 --abbrev-commit RESULT_VARIABLE RET OUTPUT_VARIABLE TAGGEDCOMMIT OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT TAGGEDCOMMIT)
message(WARNING "Cannot determine most recent tag. Make sure that you are building either from a Git working tree or from a source archive.")
set(VERSIONTAG "${COMMIT}")
set(VERSION_IS_RELEASE "false")
else()
message(STATUS "The most recent tag was at ${TAGGEDCOMMIT}")
# Check if we're building that tagged commit or a different one
if(COMMIT STREQUAL TAGGEDCOMMIT)
message(STATUS "You are building a tagged release")
set(VERSIONTAG "release")
set(VERSION_IS_RELEASE "true")
else()
message(STATUS "You are ahead of or behind a tagged release")
set(VERSIONTAG "${COMMIT}")
set(VERSION_IS_RELEASE "false")
endif()
endif()
configure_file("monero/src/version.cpp.in" "${TO}")
endif()

64
cmake/GenVersionGui.cmake Normal file
View File

@@ -0,0 +1,64 @@
# 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
# Check what commit we're on
execute_process(COMMAND "${GIT}" rev-parse --short=9 HEAD RESULT_VARIABLE RET OUTPUT_VARIABLE COMMIT OUTPUT_STRIP_TRAILING_WHITESPACE)
if(RET)
# Something went wrong, set the version tag to -unknown
message(WARNING "Cannot determine current commit. Make sure that you are building either from a Git working tree or from a source archive.")
set(VERSIONTAG "unknown")
configure_file("src/version.js.in" "${TO}")
else()
string(SUBSTRING ${COMMIT} 0 9 COMMIT)
message(STATUS "You are currently on commit ${COMMIT}")
# Get all the tags
execute_process(COMMAND "${GIT}" rev-list --tags --max-count=1 --abbrev-commit RESULT_VARIABLE RET OUTPUT_VARIABLE TAGGEDCOMMIT OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT TAGGEDCOMMIT)
message(WARNING "Cannot determine most recent tag. Make sure that you are building either from a Git working tree or from a source archive.")
set(VERSIONTAG "${COMMIT}")
else()
message(STATUS "The most recent tag was at ${TAGGEDCOMMIT}")
# Check if we're building that tagged commit or a different one
if(COMMIT STREQUAL TAGGEDCOMMIT)
message(STATUS "You are building a tagged release")
set(VERSIONTAG "release")
else()
message(STATUS "You are ahead of or behind a tagged release")
set(VERSIONTAG "${COMMIT}")
endif()
endif()
configure_file("src/version.js.in" "${TO}")
endif()

81
cmake/Version.cmake Normal file
View File

@@ -0,0 +1,81 @@
# Copyright (c) 2014-2017, 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 hash)
set(VERSIONTAG "${hash}")
configure_file("${CMAKE_SOURCE_DIR}/monero/src/version.cpp.in" "${CMAKE_BINARY_DIR}/version.cpp")
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)
add_custom_command(
OUTPUT "${CMAKE_BINARY_DIR}/version.cpp"
COMMAND "${CMAKE_COMMAND}"
"-D" "GIT=${GIT_EXECUTABLE}"
"-D" "TO=${CMAKE_BINARY_DIR}/version.cpp"
"-P" "cmake/GenVersion.cmake"
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")
#message(STATUS "Found Git: ${GIT_EXECUTABLE}")
# COMMAND "${CMAKE_COMMAND}"
# "-D" "GIT=${GIT_EXECUTABLE}"
# "-D" "TO=${CMAKE_BINARY_DIR}/monero/version.cpp"
# "-P" "cmake/GenVersion.cmake"
# BYPRODUCTS "${CMAKE_BINARY_DIR}/monero/version.cpp"
# WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")
else()
message(STATUS "WARNING: Git was not found!")
write_static_version_header("unknown")
endif ()
add_custom_target(genversion ALL
DEPENDS "${CMAKE_BINARY_DIR}/version.cpp")
#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}")
# add_custom_command(
# OUTPUT "${CMAKE_BINARY_DIR}/version.cpp"
# COMMAND "${CMAKE_COMMAND}"
# "-D" "GIT=${GIT_EXECUTABLE}"
# "-D" "TO=${CMAKE_BINARY_DIR}/version.cpp"
# "-P" "cmake/GenVersion.cmake"
# WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")
#else()
# message(STATUS "WARNING: Git was not found!")
# write_static_version_header("unknown")
#endif ()
#add_custom_target(genversion ALL
# DEPENDS "${CMAKE_BINARY_DIR}/version.cpp")

52
cmake/VersionGui.cmake Normal file
View File

@@ -0,0 +1,52 @@
# 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 hash)
set(VERSIONTAG "${hash}")
configure_file("${CMAKE_SOURCE_DIR}/version.js.in" "${CMAKE_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}")
add_custom_command(
OUTPUT "${CMAKE_SOURCE_DIR}/version.js"
COMMAND "${CMAKE_COMMAND}"
"-D" "GIT=${GIT_EXECUTABLE}"
"-D" "TO=${CMAKE_SOURCE_DIR}/version.js"
"-P" "cmake/GenVersionGui.cmake"
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")
else()
message(STATUS "WARNING: Git was not found!")
write_static_version_header("unknown")
endif ()
add_custom_target(genversiongui ALL
DEPENDS "${CMAKE_SOURCE_DIR}/version.js")

View File

@@ -0,0 +1,52 @@
// 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.
#include <libusb.h>
#define UNUSED(expr) (void)(expr)
int main(int argc, char *argv[]) {
libusb_device **devs;
libusb_context *ctx = NULL;
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);
}

43
cmake/test-protobuf.cpp Normal file
View File

@@ -0,0 +1,43 @@
// 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.
#include <string>
#include <iostream>
#include <google/protobuf/message.h>
#include <google/protobuf/unknown_field_set.h>
#include "test-protobuf.pb.h"
int main(int argc, char *argv[]) {
google::protobuf::UnknownFieldSet ufs;
ufs.ClearAndFreeMemory();
Success sc;
sc.set_message("test");
sc.SerializeToOstream(&std::cerr);
return 0;
}

View File

@@ -0,0 +1,7 @@
syntax = "proto2";
import "google/protobuf/descriptor.proto";
message Success {
optional string message = 1;
}

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project
// Copyright (c) 2014-2019, The Monero Project
//
// All rights reserved.
//
@@ -26,15 +26,9 @@
// 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.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.2
import QtGraphicalEffects 1.0
#include <assert.h>
import "components"
Rectangle {
id: root
width: 330
color: "#FFFFFF"
static_assert(1, "FAIL");
int main(int argc, char *argv[]) {
return 0;
}

View File

@@ -0,0 +1,34 @@
// 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.
#include <assert.h>
static_assert(1, "FAIL");
int main(int argc, char *argv[]) {
return 0;
}

View File

@@ -1,198 +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.0
import moneroComponents.Clipboard 1.0
import "../js/TxUtils.js" as TxUtils
ListView {
id: listView
clip: true
boundsBehavior: ListView.StopAtBounds
property bool selectAndSend: false
footer: Rectangle {
height: 127
width: listView.width
color: "transparent"
Text {
anchors.centerIn: parent
font.family: "Arial"
font.pixelSize: 14
color: "#808080"
text: qsTr("No more results") + translationManager.emptyString
}
}
property var previousItem
delegate: Rectangle {
id: delegate
height: 64
width: listView.width
color: "transparent"
z: listView.count - index
function collapseDropdown() { dropdown.expanded = false }
function doSend() {
console.log("Sending to: ", address +" "+ paymentId);
middlePanel.sendTo(address, paymentId, description);
leftPanel.selectItem(middlePanel.state)
}
Text {
id: descriptionText
anchors.left: parent.left
anchors.top: parent.top
anchors.topMargin: 12
width: text.length ? (descriptionArea.containsMouse ? 139 : 139) : 0
font.family: "Arial"
font.bold: true
font.pixelSize: 19
color: "#ffffff"
elide: Text.ElideRight
text: description
MouseArea {
id: descriptionArea
anchors.fill: parent
hoverEnabled: true
}
}
TextEdit {
id: addressText
selectByMouse: true
anchors.bottom: descriptionText.bottom
anchors.left: descriptionText.right
anchors.right: dropdown.left
anchors.leftMargin: description.length > 0 ? 12 : 0
anchors.rightMargin: 40
font.family: "Arial"
font.pixelSize: 16
color: "#ffffff"
text: {
if(isMobile){
TxUtils.addressTruncate(address, 6);
} else {
return TxUtils.addressTruncate(address, 10);
}
}
readOnly: true
}
Text {
id: paymentLabel
anchors.left: parent.left
anchors.bottom: parent.bottom
anchors.bottomMargin: 12
width: 139
font.family: "Arial"
font.pixelSize: 12
color: "#ffffff"
text: qsTr("Payment ID:") + translationManager.emptyString
}
TextEdit {
selectByMouse: true;
anchors.bottom: paymentLabel.bottom
anchors.left: paymentLabel.right
anchors.leftMargin: 12
anchors.rightMargin: 12
anchors.right: dropdown.left
readOnly: true
font.family: "Arial"
font.pixelSize: 13
color: "#545454"
text: {
if(isMobile){
TxUtils.addressTruncate(paymentId, 6);
} else {
return TxUtils.addressTruncate(paymentId, 10);
}
}
}
ListModel {
id: dropModel
ListElement { name: "<b>Copy address to clipboard</b>"; icon: "../images/dropdownCopy.png" }
ListElement { name: "<b>Send to this address</b>"; icon: "../images/dropdownSend.png" }
// ListElement { name: "<b>Find similar transactions</b>"; icon: "../images/dropdownSearch.png" }
ListElement { name: "<b>Remove from address book</b>"; icon: "../images/dropdownDel.png" }
}
Clipboard { id: clipboard }
TableDropdown {
id: dropdown
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
anchors.rightMargin: 5
dataModel: dropModel
visible: !listView.selectAndSend
z: 1
onExpandedChanged: {
if(expanded) {
listView.previousItem = delegate
listView.currentIndex = index
}
}
onOptionClicked: {
// Ensure tooltip is closed
appWindow.toolTip.visible = false;
if(option === 0) {
clipboard.setText(address)
appWindow.showStatusMessage(qsTr("Address copied to clipboard"),3)
}
else if(option === 1){
doSend()
} else if(option === 2){
console.log("Delete: ", rowId);
currentWallet.addressBookModel.deleteRow(rowId);
}
}
}
Rectangle {
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
height: 1
color: "#404040"
}
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
visible: listView.selectAndSend
onClicked: {
doSend();
}
}
}
}

47
components/CMakeLists.txt Normal file
View 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()

View File

@@ -26,35 +26,43 @@
// 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.0
import QtQuick 2.9
import QtQuick.Layouts 1.1
import FontAwesome 1.0
import "../components" as MoneroComponents
import "." as MoneroComponents
import "effects/" as MoneroEffects
Item {
id: checkBox
property alias text: label.text
property string checkedIcon: "../images/checkedIcon-black.png"
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
property int fontSize: 14 * scaleRatio
property int fontSize: 14
property alias fontColor: label.color
property bool iconOnTheLeft: true
signal clicked()
height: 25 * scaleRatio
height: 25
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) * scaleRatio
spacing: 10
Item {
id: checkMark
@@ -63,6 +71,7 @@ Item {
Rectangle {
id: backgroundRect
visible: checkBox.border
anchors.fill: parent
radius: 3
color: "transparent"
@@ -72,22 +81,28 @@ Item {
} else {
return MoneroComponents.Style.inputBorderColorInActive;
}
visible: checkBox.border
}
Image {
MoneroEffects.ImageMask {
id: img
visible: checkBox.checked || checkBox.uncheckedIcon != ""
anchors.centerIn: parent
source: {
if (checkBox.checked || checkBox.uncheckedIcon == "") {
width: checkBox.imgWidth
height: checkBox.imgHeight
color: MoneroComponents.Style.defaultFontColor
fontAwesomeFallbackIcon: checkBox.fontAwesomeIcons ? getIcon() : FontAwesome.plus
fontAwesomeFallbackSize: 14
image: checkBox.fontAwesomeIcons ? "" : getIcon()
function getIcon() {
if (checkBox.checked || checkBox.uncheckedIcon == "")
return checkBox.checkedIcon;
}
return checkBox.uncheckedIcon;
}
visible: checkBox.checked || checkBox.uncheckedIcon != ""
}
}
Text {
MoneroComponents.TextPlain {
id: label
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: checkBox.fontSize

View File

@@ -26,24 +26,24 @@
// 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.0
import QtQuick 2.9
import QtQuick.Layouts 1.1
import QtGraphicalEffects 1.0
import FontAwesome 1.0
import "." 1.0
import "." as MoneroComponents
import "effects/" as MoneroEffects
RowLayout {
id: checkBox
property alias text: label.text
property string checkedIcon: "../images/checkedIcon-black.png"
property string uncheckedIcon
property bool checked: false
property string background: "backgroundRect.color"
property int fontSize: 14 * scaleRatio
property int fontSize: 14
property alias fontColor: label.color
property int textMargin: 8 * scaleRatio
property bool darkDropIndicator: false
property int textMargin: 8
signal clicked()
height: 25 * scaleRatio
height: 25
function toggle(){
checkBox.checked = !checkBox.checked
@@ -58,7 +58,7 @@ RowLayout {
width: (label.width + indicatorRect.width + checkBox.textMargin)
color: "transparent"
Text {
MoneroComponents.TextPlain {
id: label
font.family: Style.fontLight.name
font.pixelSize: checkBox.fontSize
@@ -75,23 +75,29 @@ RowLayout {
anchors.left: label.right
anchors.leftMargin: textMargin
color: "transparent"
rotation: checkBox.checked ? 180 * scaleRatio : 0
rotation: checkBox.checked ? 180 : 0
Image {
MoneroEffects.ImageMask {
id: indicatorImage
anchors.centerIn: parent
source: "../images/whiteDropIndicator.png"
visible: !darkDropIndicator
}
ColorOverlay {
anchors.fill: indicatorImage
source: indicatorImage
color: "#FF000000"
visible: darkDropIndicator
width: 12
height: 8
image: "qrc:///images/whiteDropIndicator.png"
color: MoneroComponents.Style.defaultFontColor
opacity: MoneroComponents.Style.blackTheme ? 1 : 0.75
fontAwesomeFallbackIcon: FontAwesome.arrowDown
fontAwesomeFallbackSize: 14
MoneroEffects.ColorTransition {
targetObj: indicatorImage
blackColor: "white"
whiteColor: "black"
duration: 500
}
}
}
MouseArea{
MouseArea {
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
@@ -100,7 +106,5 @@ RowLayout {
}
}
}
}
}

View 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
}
}
}

View 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
}
}
}

View File

@@ -1,207 +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.0
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 "../components" as MoneroComponents
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 gradient
Image {
anchors.fill: parent
source: "../images/middlePanelBg.jpg"
}
// 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 * scaleRatio
anchors.margins: 35 * scaleRatio
spacing: 20 * scaleRatio
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 * scaleRatio
color: MoneroComponents.Style.defaultFontColor
selectionColor: MoneroComponents.Style.dimmedFontColor
wrapMode: TextEdit.Wrap
readOnly: true
function logCommand(msg){
msg = log_color(msg, "lime");
textArea.append(msg);
}
function logMessage(msg){
msg = msg.trim();
var color = "white";
if(msg.toLowerCase().indexOf('error') >= 0){
color = "red";
} else if (msg.toLowerCase().indexOf('warning') >= 0){
color = "yellow";
}
// 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
}
}

View File

@@ -26,7 +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 QtQuick 2.0
import QtQuick 2.9
import QtQuick.Controls 1.4
import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.1
@@ -89,12 +89,14 @@ Window {
}
}
Text {
text: qsTr("Starting local node in %1 seconds").arg(countDown);
MoneroComponents.TextPlain {
text: qsTr("Starting local node in %1 seconds").arg(countDown) + translationManager.emptyString;
font.pixelSize: 18
Layout.alignment: Qt.AlignHCenter
Layout.fillWidth: true
horizontalAlignment: Text.AlignHCenter
themeTransition: false
color: "black"
}
}
@@ -108,7 +110,7 @@ Window {
id: okButton
visible:false
fontSize: 14
text: qsTr("Start daemon (%1)").arg(countDown)
text: qsTr("Start daemon (%1)").arg(countDown) + translationManager.emptyString
KeyNavigation.tab: cancelButton
onClicked: {
timer.stop();
@@ -121,7 +123,7 @@ Window {
MoneroComponents.StandardButton {
id: cancelButton
fontSize: 14
text: qsTr("Use custom settings")
text: qsTr("Use custom settings") + translationManager.emptyString
onClicked: {
timer.stop();

View File

@@ -26,18 +26,22 @@
// 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.2
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
import "../components" as MoneroComponents
import "." as MoneroComponents
import "effects/" as MoneroEffects
Item {
id: datePicker
property bool expanded: false
readonly property alias expanded: popup.visible
property date currentDate
property bool showCurrentDate: true
property color backgroundColor : "#404040"
property color backgroundColor : MoneroComponents.Style.appWindowBorderColor
property color errorColor : "red"
property bool error: false
property alias inputLabel: inputLabel
@@ -48,26 +52,13 @@ 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"
height: 22
width: parent.width
Text {
MoneroComponents.TextPlain {
id: inputLabel
anchors.top: parent.top
anchors.topMargin: 2
@@ -77,6 +68,7 @@ Item {
font.bold: false
textFormat: Text.RichText
color: MoneroComponents.Style.defaultFontColor
themeTransition: false
MouseArea {
anchors.fill: parent
@@ -89,7 +81,7 @@ Item {
Item {
id: head
anchors.top: inputLabelRect.bottom
anchors.topMargin: 6 * scaleRatio
anchors.topMargin: 6
anchors.left: parent.left
anchors.right: parent.right
height: 28
@@ -106,45 +98,14 @@ Item {
color: datePicker.backgroundColor
}
Item {
id: buttonItem
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.margins: 4
width: height
Image {
id: button
anchors.centerIn: parent
source: "../images/whiteDropIndicator.png"
rotation: datePicker.expanded ? 180 : 0
}
MouseArea {
anchors.fill: parent
onClicked: datePicker.expanded = !datePicker.expanded
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
}
}
Rectangle {
id: separator
anchors.verticalCenter: parent.verticalCenter
anchors.right: buttonItem.left
anchors.rightMargin: 4
height: 16
width: 1
color: "#808080"
visible: datePicker.expanded
}
Row {
RowLayout {
id: dateInput
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 10
anchors.leftMargin: 2
anchors.right: parent.right
property string headerFontColor: MoneroComponents.Style.blackTheme ? "#e6e6e6" : "#333333"
spacing: 0
function setDate(date) {
var day = date.getDate()
@@ -164,12 +125,14 @@ Item {
TextInput {
id: dayInput
readOnly: true
width: 22
Layout.preferredWidth: childrenRect.width + 40
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 14
color: datePicker.error ? errorColor : MoneroComponents.Style.defaultFontColor
maximumLength: 2
color: datePicker.error ? errorColor : parent.headerFontColor
selectionColor: MoneroComponents.Style.dimmedFontColor
selectByMouse: true
horizontalAlignment: TextInput.AlignHCenter
maximumLength: 2
validator: IntValidator{bottom: 01; top: 31;}
KeyNavigation.tab: monthInput
@@ -187,22 +150,25 @@ Item {
}
}
Text {
MoneroComponents.TextPlain {
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 14
color: datePicker.error ? errorColor : MoneroComponents.Style.defaultFontColor
text: "-"
themeTransition: false
}
TextInput {
id: monthInput
readOnly: true
width: 22
Layout.preferredWidth: childrenRect.width + 40
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 14
color: datePicker.error ? errorColor : MoneroComponents.Style.defaultFontColor
maximumLength: 2
color: datePicker.error ? errorColor : parent.headerFontColor
selectionColor: MoneroComponents.Style.dimmedFontColor
selectByMouse: true
horizontalAlignment: TextInput.AlignHCenter
maximumLength: 2
validator: IntValidator{bottom: 01; top: 12;}
KeyNavigation.tab: yearInput
text: {
@@ -219,23 +185,27 @@ Item {
}
}
Text {
MoneroComponents.TextPlain {
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 14
color: datePicker.error ? errorColor : MoneroComponents.Style.defaultFontColor
text: "-"
themeTransition: false
}
TextInput {
id: yearInput
width: 44
Layout.preferredWidth: childrenRect.width + 60
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 14
color: datePicker.error ? errorColor : MoneroComponents.Style.defaultFontColor
maximumLength: 4
color: datePicker.error ? errorColor : parent.headerFontColor
selectionColor: MoneroComponents.Style.dimmedFontColor
selectByMouse: true
horizontalAlignment: TextInput.AlignHCenter
maximumLength: 4
validator: IntValidator{bottom: 1000; top: 9999;}
text: if(datePicker.showCurrentDate) datePicker.currentDate.getFullYear()
onFocusChanged: {
if(focus === false) {
var d = new Date()
@@ -245,153 +215,238 @@ Item {
}
}
}
Rectangle {
Layout.preferredHeight: parent.height
Layout.fillWidth: true
color: "transparent"
Image {
id: button
anchors.right: parent.right
anchors.rightMargin: 10
anchors.verticalCenter: parent.verticalCenter
source: "qrc:///images/whiteDropIndicator.png"
visible: false
}
ColorOverlay {
source: button
anchors.fill: button
color: MoneroComponents.Style.defaultFontColor
rotation: datePicker.expanded ? 180 : 0
opacity: 1
}
MouseArea {
anchors.fill: parent
onClicked: datePicker.expanded ? popup.close() : popup.open()
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
}
}
}
}
Rectangle {
id: calendarRect
anchors.left: parent.left
anchors.right: parent.right
anchors.top: head.bottom
color: "#FFFFFF"
border.width: 1
border.color: "#DBDBDB"
height: datePicker.expanded ? calendar.height + 2 : 0
clip: true
//radius: 4
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: "#FFFFFF"
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
height: 180
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: "transparent" }
dayDelegate: Item {
z: parent.z + 1
implicitHeight: implicitWidth
implicitWidth: calendar.width / 7
Behavior on height {
NumberAnimation { duration: 100; easing.type: Easing.InQuad }
}
Rectangle {
anchors.fill: parent
radius: parent.implicitHeight / 2
color: dayArea.pressed && styleData.visibleMonth ? "#FF6C3B" : "transparent"
}
MouseArea {
anchors.fill: parent
}
Text {
anchors.centerIn: parent
font.family: "Arial"
font.pixelSize: 12
font.bold: dayArea.pressed
text: styleData.date.getDate()
color: {
if(!styleData.visibleMonth) return "#DBDBDB"
if(dayArea.pressed) return "#FFFFFF"
if(styleData.today) return "#FF6C3B"
return "#4A4848"
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();
}
}
}
MouseArea {
id: dayArea
anchors.fill: parent
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()
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
}
dateChanged();
}
}
}
ColorOverlay {
source: prevMonthIcon
anchors.fill: prevMonthIcon
color: MoneroComponents.Style.defaultFontColor
opacity: 0.5
}
dayOfWeekDelegate: Item {
implicitHeight: 20
implicitWidth: calendar.width / 7
Text {
anchors.centerIn: parent
elide: Text.ElideRight
font.family: "Arial"
font.pixelSize: 9
color: "#535353"
text: {
var locale = Qt.locale()
return locale.dayName(styleData.dayOfWeek, Locale.ShortFormat)
}
}
}
navigationBar: Rectangle {
implicitWidth: calendar.width
implicitHeight: 30
Text {
anchors.centerIn: parent
font.family: "Arial"
font.pixelSize: 12
color: "#4A4646"
text: styleData.title
}
Item {
anchors.left: parent.left
anchors.top: parent.top
anchors.bottom: parent.bottom
width: height
Image {
anchors.centerIn: parent
source: "../images/prevMonth.png"
MouseArea {
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
anchors.fill: parent
onClicked: calendar.showPreviousMonth()
}
}
MouseArea {
anchors.fill: parent
onClicked: calendar.showPreviousMonth()
}
}
Item {
anchors.right: parent.right
anchors.rightMargin: 4
anchors.top: parent.top
anchors.bottom: parent.bottom
width: height
Item {
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
width: height
Image {
id: nextMonthIcon
anchors.centerIn: parent
source: "qrc:///images/prevMonth.png"
visible: false
}
Image {
anchors.centerIn: parent
source: "../images/prevMonth.png"
transformOrigin: Item.Center
rotation: 180
}
ColorOverlay {
source: nextMonthIcon
anchors.fill: nextMonthIcon
color: MoneroComponents.Style.defaultFontColor
opacity: 0.5
rotation: 180
}
MouseArea {
anchors.fill: parent
onClicked: calendar.showNextMonth()
MouseArea {
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
anchors.fill: parent
onClicked: calendar.showNextMonth()
}
}
}
}

View File

@@ -1,506 +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.0
import moneroComponents.Clipboard 1.0
import moneroComponents.AddressBookModel 1.0
import "../components" as MoneroComponents
import "../js/TxUtils.js" as TxUtils
ListView {
id: listView
clip: true
boundsBehavior: ListView.StopAtBounds
property var previousItem
property int rowSpacing: 12
property var addressBookModel: null
function buildTxDetailsString(tx_id, paymentId, tx_key,tx_note, destinations, rings, address, address_label) {
var trStart = '<tr><td width="85" style="padding-top:5px"><b>',
trMiddle = '</b></td><td style="padding-left:10px;padding-top:5px;">',
trEnd = "</td></tr>";
return '<table border="0">'
+ (tx_id ? trStart + qsTr("Tx ID:") + trMiddle + tx_id + trEnd : "")
+ (address_label ? trStart + qsTr("Address label:") + trMiddle + address_label + trEnd : "")
+ (address ? trStart + qsTr("Address:") + trMiddle + address + trEnd : "")
+ (paymentId ? trStart + qsTr("Payment ID:") + trMiddle + paymentId + trEnd : "")
+ (tx_key ? trStart + qsTr("Tx key:") + trMiddle + tx_key + trEnd : "")
+ (tx_note ? trStart + qsTr("Tx note:") + trMiddle + tx_note + trEnd : "")
+ (destinations ? trStart + qsTr("Destinations:") + trMiddle + destinations + trEnd : "")
+ (rings ? trStart + qsTr("Rings:") + trMiddle + rings + trEnd : "")
+ "</table>"
+ translationManager.emptyString;
}
function lookupPaymentID(paymentId) {
if (!addressBookModel)
return ""
var idx = addressBookModel.lookupPaymentID(paymentId)
if (idx < 0)
return ""
idx = addressBookModel.index(idx, 0)
return addressBookModel.data(idx, AddressBookModel.AddressBookDescriptionRole)
}
footer: Rectangle {
height: 127 * scaleRatio
width: listView.width
color: "transparent"
Text {
anchors.centerIn: parent
font.family: "Arial"
font.pixelSize: 14
color: "#545454"
text: qsTr("No more results") + translationManager.emptyString
}
}
delegate: Rectangle {
id: delegate
property bool collapsed: index ? false : true
height: collapsed ? 180 * scaleRatio : 70 * scaleRatio
width: listView.width
color: "transparent"
function collapse(){
delegate.height = 180 * scaleRatio;
}
// borders
Rectangle{
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
width: 1
color: "#404040"
}
Rectangle{
anchors.left: parent.left
anchors.top: parent.top
anchors.bottom: parent.bottom
width: collapsed ? 2 : 1
color: collapsed ? "#BBBBBB" : "#404040"
}
Rectangle{
anchors.right: parent.right
anchors.bottom: parent.top
anchors.left: parent.left
height: 1
color: "#404040"
}
Rectangle{
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.left: parent.left
height: 1
color: "#404040"
}
Rectangle {
id: row1
anchors.left: parent.left
anchors.leftMargin: 20 * scaleRatio
anchors.right: parent.right
anchors.rightMargin: 20 * scaleRatio
anchors.top: parent.top
anchors.topMargin: 15 * scaleRatio
height: 40 * scaleRatio
color: "transparent"
Image {
id: arrowImage
source: isOut ? "../images/downArrow.png" : confirmationsRequired === 60 ? "../images/miningxmr.png" : "../images/upArrow-green.png"
height: 18 * scaleRatio
width: (confirmationsRequired === 60 ? 18 : 12) * scaleRatio
anchors.top: parent.top
anchors.topMargin: 12 * scaleRatio
}
Text {
id: txrxLabel
anchors.left: arrowImage.right
anchors.leftMargin: 18 * scaleRatio
font.family: MoneroComponents.Style.fontLight.name
font.pixelSize: 14 * scaleRatio
text: isOut ? qsTr("Sent") + translationManager.emptyString : qsTr("Received") + translationManager.emptyString
color: "#808080"
}
Text {
id: amountLabel
anchors.left: arrowImage.right
anchors.leftMargin: 18 * scaleRatio
anchors.top: txrxLabel.bottom
anchors.topMargin: 0 * scaleRatio
font.family: MoneroComponents.Style.fontBold.name
font.pixelSize: 18 * scaleRatio
font.bold: true
text: {
var _amount = amount;
if(_amount === 0){
// *sometimes* amount is 0, while the 'destinations string'
// has the correct amount, so we try to fetch it from that instead.
_amount = TxUtils.destinationsToAmount(destinations);
_amount = (_amount *1);
}
return _amount + " XMR";
}
color: isOut ? MoneroComponents.Style.white : MoneroComponents.Style.green
MouseArea {
hoverEnabled: true
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onEntered: {
parent.color = MoneroComponents.Style.orange
}
onExited: {
parent.color = isOut ? MoneroComponents.Style.white : MoneroComponents.Style.green }
onClicked: {
console.log("Copied to clipboard");
clipboard.setText(parent.text.split(" ")[0]);
appWindow.showStatusMessage(qsTr("Copied to clipboard"),3)
}
}
}
Rectangle {
anchors.right: parent.right
width: 300 * scaleRatio
height: parent.height
color: "transparent"
Text {
id: dateLabel
anchors.left: parent.left
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 14 * scaleRatio
text: date
color: "#808080"
}
Text {
id: timeLabel
anchors.left: dateLabel.right
anchors.leftMargin: 7 * scaleRatio
anchors.top: parent.top
anchors.topMargin: 1 * scaleRatio
font.pixelSize: 12 * scaleRatio
text: time
color: "#808080"
}
Text {
id: toLabel
property string address: ""
color: "#BBBBBB"
anchors.left: parent.left
anchors.top: dateLabel.bottom
anchors.topMargin: 0
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 16 * scaleRatio
text: {
if(isOut){
address = TxUtils.destinationsToAddress(destinations);
if(address){
var truncated = TxUtils.addressTruncate(address);
return qsTr("To ") + translationManager.emptyString + truncated;
} else {
return "Unknown recipient";
}
}
return "";
}
MouseArea{
visible: parent.address !== undefined
hoverEnabled: true
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onEntered: {
toLabel.color = "white";
}
onExited: {
toLabel.color = "#BBBBBB";
}
onClicked: {
if(parent.address){
console.log("Address copied to clipboard");
clipboard.setText(parent.address);
appWindow.showStatusMessage(qsTr("Address copied to clipboard"),3)
}
}
}
}
Rectangle {
height: 24 * scaleRatio
width: 24 * scaleRatio
color: "transparent"
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
Image {
id: dropdownImage
height: 8 * scaleRatio
width: 12 * scaleRatio
source: "../images/whiteDropIndicator.png"
rotation: delegate.collapsed ? 180 : 0
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
}
MouseArea{
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: {
delegate.collapsed = !delegate.collapsed;
}
}
}
}
}
Rectangle {
id: row2
anchors.left: parent.left
anchors.leftMargin: 20 * scaleRatio
anchors.right: parent.right
anchors.rightMargin: 20 * scaleRatio
anchors.top: row1.bottom
anchors.topMargin: 15 * scaleRatio
height: 40 * scaleRatio
color: "transparent"
visible: delegate.collapsed
// left column
MoneroComponents.HistoryTableInnerColumn{
anchors.left: parent.left
anchors.leftMargin: 30 * scaleRatio
labelHeader: qsTr("Transaction ID") + translationManager.emptyString
labelValue: hash.substring(0, 18) + "..."
copyValue: hash
}
// right column
MoneroComponents.HistoryTableInnerColumn{
anchors.right: parent.right
anchors.rightMargin: 100 * scaleRatio
width: 200 * scaleRatio
height: parent.height
color: "transparent"
labelHeader: qsTr("Fee")
labelValue: {
if(!isOut && !fee){
return "-";
} else if(isOut && fee){
return fee + " XMR";
} else {
return "Unknown"
}
}
copyValue: {
if(isOut && fee){ return fee }
else { return "" }
}
}
}
Rectangle {
id: row3
anchors.left: parent.left
anchors.leftMargin: 20 * scaleRatio
anchors.right: parent.right
anchors.rightMargin: 20 * scaleRatio
anchors.top: row2.bottom
anchors.topMargin: 15 * scaleRatio
height: 40 * scaleRatio
color: "transparent"
visible: delegate.collapsed
// left column
MoneroComponents.HistoryTableInnerColumn{
anchors.left: parent.left
anchors.leftMargin: 30 * scaleRatio
labelHeader: qsTr("Blockheight")
labelValue: {
if (!isPending)
if(confirmations < confirmationsRequired)
return blockHeight + " " + qsTr("(%1/%2 confirmations)").arg(confirmations).arg(confirmationsRequired);
else
return blockHeight;
if (!isOut)
return qsTr("UNCONFIRMED") + translationManager.emptyString
if (isFailed)
return qsTr("FAILED") + translationManager.emptyString
return qsTr("PENDING") + translationManager.emptyString
}
copyValue: labelValue
}
// right column
MoneroComponents.HistoryTableInnerColumn {
anchors.right: parent.right
anchors.rightMargin: 80 * scaleRatio
width: 220 * scaleRatio
height: parent.height
color: "transparent"
hashValue: hash
labelHeader: qsTr("Description") + translationManager.emptyString
labelHeaderIconImageSource: "../images/editIcon.png"
labelValue: {
var note = currentWallet.getUserNote(hash);
if(note){
if(note.length > 28) {
return note.substring(0, 28) + "...";
} else {
return note;
}
} else {
return qsTr("None") + translationManager.emptyString;
}
}
copyValue: {
return currentWallet.getUserNote(hash);
}
}
Rectangle {
id: proofButton
visible: isOut
color: "#404040"
height: 24 * scaleRatio
width: 24 * scaleRatio
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.bottomMargin: 36
radius: 20 * scaleRatio
MouseArea {
id: proofButtonMouseArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: {
var address = TxUtils.destinationsToAddress(destinations);
if(address === undefined){
console.log('getProof: Error fetching address')
return;
}
var checked = (TxUtils.checkTxID(hash) && TxUtils.checkAddress(address, appWindow.persistentSettings.nettype));
if(!checked){
console.log('getProof: Error checking TxId and/or address');
}
console.log("getProof: Generate clicked: txid " + hash + ", address " + address);
root.getProofClicked(hash, address, '');
}
onEntered: {
proofButton.color = "#656565";
}
onExited: {
proofButton.color = "#404040";
}
}
Text {
color: MoneroComponents.Style.defaultFontColor
text: "P"
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
font.pixelSize: 14 * scaleRatio
}
}
Rectangle {
id: detailsButton
color: "#404040"
height: 24 * scaleRatio
width: 24 * scaleRatio
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.bottomMargin: 6
radius: 20 * scaleRatio
MouseArea {
id: detailsButtonMouseArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: {
var tx_key = currentWallet.getTxKey(hash)
var tx_note = currentWallet.getUserNote(hash)
var rings = currentWallet.getRings(hash)
var address_label = subaddrIndex == 0 ? qsTr("Primary address") : currentWallet.getSubaddressLabel(subaddrAccount, subaddrIndex)
var address = currentWallet.address(subaddrAccount, subaddrIndex)
if (rings)
rings = rings.replace(/\|/g, '\n')
informationPopup.title = "Transaction details";
informationPopup.content = buildTxDetailsString(hash,paymentId,tx_key,tx_note,destinations, rings, address, address_label);
informationPopup.onCloseCallback = null
informationPopup.open();
}
onEntered: {
detailsButton.color = "#656565";
}
onExited: {
detailsButton.color = "#404040";
}
}
Text {
color: MoneroComponents.Style.defaultFontColor
text: "?"
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
font.pixelSize: 14 * scaleRatio
}
}
}
}
Clipboard { id: clipboard }
}

View File

@@ -1,124 +0,0 @@
// Copyright (c) 2014-2015, 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.0
import QtQuick.Layouts 1.1
import QtQuick.Dialogs 1.2
import moneroComponents.Clipboard 1.0
import moneroComponents.PendingTransaction 1.0
import moneroComponents.Wallet 1.0
import "." as MoneroComponents
Rectangle{
Clipboard { id: clipboard }
width: label1.width > label2.width ? label1.width : label2.width
height: label1.height + label2.height
color: "transparent"
property string copyValue: ""
property string hashValue: ""
property alias labelHeader: label1.text
property alias labelValue: label2.text
property alias labelHeaderIcon: icon
property alias labelHeaderIconImageSource: icon.imageSource
ColumnLayout {
Layout.fillWidth: true
spacing: 2 * scaleRatio
RowLayout {
Layout.fillWidth: true
Text {
id: label1
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 14 * scaleRatio
text: labelHeader
color: MoneroComponents.Style.dimmedFontColor
}
MoneroComponents.IconButton {
id: icon
visible: imageSource !== ""
Layout.leftMargin: 8 * scaleRatio
width: image.width
height: image.height
onClicked: {
editDescription(hashValue);
}
}
}
Text {
id: label2
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 14 * scaleRatio
text: labelValue
color: MoneroComponents.Style.dimmedFontColor
MouseArea {
hoverEnabled: true
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onEntered: {
label1.color = MoneroComponents.Style.defaultFontColor;
label2.color = MoneroComponents.Style.defaultFontColor;
}
onExited: {
label1.color = MoneroComponents.Style.dimmedFontColor;
label2.color = MoneroComponents.Style.dimmedFontColor;
}
onClicked: {
if(copyValue){
console.log("Copied to clipboard");
clipboard.setText(copyValue);
appWindow.showStatusMessage(qsTr("Copied to clipboard"),3)
}
}
}
}
}
function editDescription(_hash){
inputDialog.labelText = qsTr("Set description:") + translationManager.emptyString;
inputDialog.onAcceptedCallback = function() {
appWindow.currentWallet.setUserNote(_hash, inputDialog.inputText);
appWindow.showStatusMessage(qsTr("Updated description."),3);
middlePanel.historyView.update();
}
inputDialog.onRejectedCallback = null;
inputDialog.open()
}
}

View File

@@ -1,222 +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.0
import QtQuick.Layouts 1.1
import moneroComponents.Clipboard 1.0
import moneroComponents.AddressBookModel 1.0
import "../components" as MoneroComponents
ListView {
id: listView
clip: true
boundsBehavior: ListView.StopAtBounds
property var previousItem
property var addressBookModel: null
function buildTxDetailsString(tx_id, paymentId, tx_key,tx_note, destinations, rings) {
var trStart = '<tr><td width="85" style="padding-top:5px"><b>',
trMiddle = '</b></td><td style="padding-left:10px;padding-top:5px;">',
trEnd = "</td></tr>";
return '<table border="0">'
+ (tx_id ? trStart + qsTr("Tx ID:") + trMiddle + tx_id + trEnd : "")
+ (paymentId ? trStart + qsTr("Payment ID:") + trMiddle + paymentId + trEnd : "")
+ (tx_key ? trStart + qsTr("Tx key:") + trMiddle + tx_key + trEnd : "")
+ (tx_note ? trStart + qsTr("Tx note:") + trMiddle + tx_note + trEnd : "")
+ (destinations ? trStart + qsTr("Destinations:") + trMiddle + destinations + trEnd : "")
+ (rings ? trStart + qsTr("Rings:") + trMiddle + rings + trEnd : "")
+ "</table>"
+ translationManager.emptyString;
}
function lookupPaymentID(paymentId) {
if (!addressBookModel)
return ""
var idx = addressBookModel.lookupPaymentID(paymentId)
if (idx < 0)
return ""
idx = addressBookModel.index(idx, 0)
return addressBookModel.data(idx, AddressBookModel.AddressBookDescriptionRole)
}
footer: Rectangle {
height: 127 * scaleRatio
width: listView.width
color: "transparent"
Text {
anchors.centerIn: parent
font.family: "Arial"
font.pixelSize: 14 * scaleRatio
color: "#545454"
text: qsTr("No more results") + translationManager.emptyString
}
}
delegate: Rectangle {
id: delegate
height: tableContent.height + 20 * scaleRatio
width: listView.width
color: "transparent"
Layout.leftMargin: 10 * scaleRatio
z: listView.count - index
function collapseDropdown() { dropdown.expanded = false }
Rectangle{
anchors.left: parent.left
anchors.top: parent.top
anchors.bottom: parent.bottom
width: 1
color: "#404040"
}
Rectangle{
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.top: parent.top
width: 1
color: "#404040"
}
Rectangle{
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.left: parent.left
height: 1
color: "#404040"
}
MouseArea {
anchors.fill: parent
onClicked: {
var tx_key = currentWallet.getTxKey(hash)
var tx_note = currentWallet.getUserNote(hash)
var rings = currentWallet.getRings(hash)
if (rings)
rings = rings.replace(/\|/g, '\n')
informationPopup.title = "Transaction details";
informationPopup.text = buildTxDetailsString(hash,paymentId,tx_key,tx_note,destinations, rings);
informationPopup.open();
informationPopup.onCloseCallback = null
}
}
Rectangle {
anchors.right: parent.right
anchors.rightMargin: 15 * scaleRatio
anchors.top: parent.top
anchors.topMargin: parent.height/2 - this.height/2
width: 30 * scaleRatio; height: 30 * scaleRatio
radius: 25
color: "#404040"
Image {
width: 20 * scaleRatio
height: 20 * scaleRatio
fillMode: Image.PreserveAspectFit
anchors.centerIn: parent
source: "qrc:///images/nextPage.png"
}
}
ColumnLayout {
id: tableContent
// Date
RowLayout {
Layout.topMargin: 20 * scaleRatio
Layout.leftMargin: 10 * scaleRatio
Text {
font.family: MoneroComponents.Style.fontMedium.name
font.pixelSize: 14 * scaleRatio
color: MoneroComponents.Style.defaultFontColor
text: date
}
Text {
font.family: Style.fontRegular.name
font.pixelSize: 14 * scaleRatio
color: MoneroComponents.Style.dimmedFontColor
text: time
}
// Show confirmations
Text {
visible: confirmations < confirmationsRequired || isPending
Layout.leftMargin: 5 * scaleRatio
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 14 * scaleRatio
color: (confirmations < confirmationsRequired)? "#FF6C3C" : "#545454"
text: {
if (!isPending)
if(confirmations < confirmationsRequired)
return qsTr("(%1/%2 confirmations)").arg(confirmations).arg(confirmationsRequired)
if (!isOut)
return qsTr("UNCONFIRMED") + translationManager.emptyString
if (isFailed)
return qsTr("FAILED") + translationManager.emptyString
return qsTr("PENDING") + translationManager.emptyString
}
}
}
// Amount & confirmations
RowLayout {
Layout.leftMargin: 10 * scaleRatio
spacing: 2
Text {
font.family: "Arial"
font.pixelSize: 14 * scaleRatio
color: isOut ? MoneroComponents.Style.defaultFontColor : "#2eb358"
text: isOut ? "↓" : "↑"
}
Text {
id: amountText
font.family: "Arial"
font.pixelSize: 18 * scaleRatio
color: isOut ? MoneroComponents.Style.defaultFontColor : "#2eb358"
text: displayAmount
}
}
}
}
ListModel {
id: dropModel
ListElement { name: "<b>Copy address to clipboard</b>"; icon: "../images/dropdownCopy.png" }
ListElement { name: "<b>Add to address book</b>"; icon: "../images/dropdownAdd.png" }
ListElement { name: "<b>Send to this address</b>"; icon: "../images/dropdownSend.png" }
ListElement { name: "<b>Find similar transactions</b>"; icon: "../images/dropdownSearch.png" }
}
Clipboard { id: clipboard }
}

View File

@@ -26,55 +26,33 @@
// 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 "../components" as MoneroComponents
import "../components/effects" as MoneroEffects
import QtQuick 2.0
Item {
property alias image : buttonImage
property alias imageSource : buttonImage.source
MoneroEffects.ImageMask {
id: button
z: 666
color: MoneroComponents.Style.defaultFontColor
image: ""
signal clicked(var mouse)
id: button
width: parent.height
height: parent.height
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
Image {
id: buttonImage
source: ""
x : (parent.width - width) / 2
y : (parent.height - height) / 2
z: 100
}
MouseArea {
id: buttonArea
anchors.fill: buttonImage
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onPressed: {
buttonImage.x = buttonImage.x + 2
buttonImage.y = buttonImage.y + 2
}
onReleased: {
buttonImage.x = (parent.width - width) / 2
buttonImage.y = (parent.height - height) / 2
onEntered: {
button.width = button.width + 2
button.height = button.height + 2
}
onExited: {
if (pressed) {
buttonImage.x = (parent.width - width) / 2
buttonImage.y = (parent.height - height) / 2
}
button.width = button.width - 2
button.height = button.height - 2
}
onClicked: {
parent.clicked(mouse)
}
onClicked: button.clicked(mouse)
}
}

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2015, The Monero Project
// Copyright (c) 2014-2019, The Monero Project
//
// All rights reserved.
//
@@ -26,10 +26,12 @@
// 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.0
import QtQuick 2.9
import QtQuick.Layouts 1.1
import QtGraphicalEffects 1.0
import "../components" as MoneroComponents
import "." as MoneroComponents
import "./effects/" as MoneroEffects
Item {
id: inlineButton
@@ -43,11 +45,13 @@ Item {
property string pressedColor: "#FF4304"
property string releasedColor: "#FF6C3C"
property string icon: ""
property string textColor: "#FFFFFF"
property int fontSize: small ? 14 * scaleRatio : 16 * scaleRatio
property int rectHeight: small ? 24 * scaleRatio : 28 * scaleRatio
property int rectHMargin: small ? 16 * scaleRatio : 22 * scaleRatio
property string textColor: MoneroComponents.Style.inlineButtonTextColor
property int fontSize: small ? 14 : 16
property int rectHeight: small ? 24 : 24
property int rectHMargin: small ? 16 : 22
property alias text: inlineText.text
property alias fontPixelSize: inlineText.font.pixelSize
property alias fontFamily: inlineText.font.family
property alias buttonColor: rect.color
signal clicked()
@@ -59,23 +63,30 @@ Item {
Rectangle{
id: rect
color: MoneroComponents.Style.buttonBackgroundColorDisabled
border.color: "black"
height: 28 * scaleRatio
width: inlineText.text ? (inlineText.width + 22) * scaleRatio : inlineButton.icon ? (inlineImage.width + 16) * scaleRatio : rect.height
color: MoneroComponents.Style.buttonInlineBackgroundColor
height: 24
width: inlineText.text ? (inlineText.width + 16) : inlineButton.icon ? (inlineImage.width + 16) : rect.height
radius: 4
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: 4
Text {
MoneroComponents.TextPlain {
id: inlineText
font.family: MoneroComponents.Style.fontBold.name
font.bold: true
font.pixelSize: inlineButton.fontSize
color: "black"
color: inlineButton.textColor
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
themeTransition: false
MoneroEffects.ColorTransition {
targetObj: inlineText
blackColor: MoneroComponents.Style._b_inlineButtonTextColor
whiteColor: MoneroComponents.Style._w_inlineButtonTextColor
}
}
Image {
@@ -102,6 +113,20 @@ Item {
}
}
DropShadow {
visible: !MoneroComponents.Style.blackTheme
anchors.fill: rect
horizontalOffset: 2
verticalOffset: 2
radius: 7.0
samples: 10
color: "#1B000000"
cached: true
source: rect
}
Keys.enabled: inlineButton.visible
Keys.onSpacePressed: doClick()
Keys.onEnterPressed: Keys.onReturnPressed(event)
Keys.onReturnPressed: doClick()
}

View File

@@ -27,21 +27,30 @@
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick.Controls 2.0
import QtQuick 2.7
import QtQuick 2.9
import "../components" as MoneroComponents
TextField {
id: textField
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 18 * scaleRatio
font.pixelSize: 18
font.bold: true
horizontalAlignment: TextInput.AlignLeft
selectByMouse: true
color: MoneroComponents.Style.defaultFontColor
selectionColor: MoneroComponents.Style.dimmedFontColor
selectedTextColor: MoneroComponents.Style.defaultFontColor
selectionColor: MoneroComponents.Style.textSelectionColor
selectedTextColor: MoneroComponents.Style.textSelectedColor
background: Rectangle {
color: "transparent"
}
MoneroComponents.ContextMenu {
cursorShape: Qt.IBeamCursor
onPaste: {
textField.clear();
textField.paste();
}
}
}

View File

@@ -26,7 +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 QtQuick 2.7
import QtQuick 2.9
import QtQuick.Controls 2.0
import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.1
@@ -45,22 +45,19 @@ Item {
signal accepted()
signal rejected()
function open() {
inactiveOverlay.visible = true
function open(prepopulate) {
leftPanel.enabled = false
middlePanel.enabled = false
titleBar.enabled = false
show()
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.enabled = true
titleBar.state = "default"
root.visible = false;
}
@@ -75,19 +72,19 @@ Item {
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
Layout.maximumWidth: 400 * scaleRatio
Layout.maximumWidth: 400
Label {
id: label
Layout.fillWidth: true
font.pixelSize: 16 * scaleRatio
font.pixelSize: 16
font.family: MoneroComponents.Style.fontLight.name
color: MoneroComponents.Style.defaultFontColor
}
TextField {
MoneroComponents.Input {
id : input
focus: true
Layout.topMargin: 6
@@ -95,22 +92,24 @@ Item {
horizontalAlignment: TextInput.AlignLeft
verticalAlignment: TextInput.AlignVCenter
font.family: MoneroComponents.Style.fontLight.name
font.pixelSize: 24 * scaleRatio
font.pixelSize: 24
KeyNavigation.tab: okButton
bottomPadding: 10
leftPadding: 10
topPadding: 10
color: MoneroComponents.Style.defaultFontColor
selectionColor: MoneroComponents.Style.dimmedFontColor
selectedTextColor: MoneroComponents.Style.defaultFontColor
selectionColor: MoneroComponents.Style.textSelectionColor
selectedTextColor: MoneroComponents.Style.textSelectedColor
background: Rectangle {
radius: 2
border.color: Qt.rgba(255, 255, 255, 0.35)
border.color: MoneroComponents.Style.inputBorderColorActive
border.width: 1
color: "black"
color: MoneroComponents.Style.blackTheme ? "black" : "#A9FFFFFF"
}
Keys.enabled: root.visible
Keys.onEnterPressed: Keys.onReturnPressed(event)
Keys.onReturnPressed: {
root.close()
root.accepted()
@@ -124,7 +123,7 @@ Item {
// Ok/Cancel buttons
RowLayout {
id: buttons
spacing: 16 * scaleRatio
spacing: 16
Layout.topMargin: 16
Layout.alignment: Qt.AlignRight
@@ -145,7 +144,7 @@ Item {
small: true
width: 120
fontSize: 14
text: qsTr("Ok")
text: qsTr("Ok") + translationManager.emptyString
KeyNavigation.tab: cancelButton
onClicked: {
root.close()

View File

@@ -27,13 +27,13 @@
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick.Controls 2.0
import QtQuick 2.7
import QtQuick 2.9
import "../js/TxUtils.js" as TxUtils
import "../components" as MoneroComponents
TextArea {
property int fontSize: 18 * scaleRatio
property int fontSize: 18
property bool fontBold: false
property string fontColor: MoneroComponents.Style.defaultFontColor
@@ -48,15 +48,19 @@ TextArea {
font.bold: fontBold
horizontalAlignment: TextInput.AlignLeft
selectByMouse: mouseSelection
selectionColor: MoneroComponents.Style.dimmedFontColor
selectedTextColor: MoneroComponents.Style.defaultFontColor
selectionColor: MoneroComponents.Style.textSelectionColor
selectedTextColor: MoneroComponents.Style.textSelectedColor
property int minimumHeight: 100 * scaleRatio
property int minimumHeight: 100
height: contentHeight > minimumHeight ? contentHeight : minimumHeight
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();
}
}
}

View File

@@ -26,7 +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 QtQuick 2.5
import QtQuick 2.9
import QtQuick.Layouts 1.1
import "../components" as MoneroComponents
@@ -37,24 +37,25 @@ Item {
property alias color: label.color
property int textFormat: Text.PlainText
property string tipText: ""
property int fontSize: 16 * scaleRatio
property int fontSize: 16
property bool fontBold: false
property string fontColor: MoneroComponents.Style.defaultFontColor
property string fontFamily: ""
property alias wrapMode: label.wrapMode
property alias horizontalAlignment: label.horizontalAlignment
property alias hoveredLink: label.hoveredLink
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 * scaleRatio
width: label.width * scaleRatio
Layout.topMargin: 10 * scaleRatio
height: label.height
width: label.width
Layout.topMargin: 10
Text {
MoneroComponents.TextPlain {
id: label
anchors.bottom: parent.bottom
anchors.bottomMargin: 2 * scaleRatio
anchors.bottomMargin: 2
anchors.left: parent.left
font.family: {
if(fontFamily){
@@ -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
}
}
}

View File

@@ -26,7 +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 QtQuick 2.0
import QtQuick 2.9
import QtQuick.Layouts 1.1
import "../components" as MoneroComponents
@@ -37,14 +37,14 @@ Rectangle {
property alias text: labelButtonText.text
id: labelButton
color: "#808080"
color: MoneroComponents.Style.buttonBackgroundColorDisabled
radius: 3
height: 20
width: labelButtonText.width + 14
anchors.right: copyButton.left
anchors.rightMargin: 6
Text {
MoneroComponents.TextPlain {
id: labelButtonText
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
@@ -52,7 +52,7 @@ Rectangle {
font.pixelSize: 12
font.bold: true
text: ""
color: "black"
color: MoneroComponents.Style.inlineButtonTextColor
}
MouseArea {
@@ -61,11 +61,11 @@ Rectangle {
hoverEnabled: true
onClicked: labelButton.clicked()
onEntered: {
labelButton.color = "#707070";
labelButton.color = MoneroComponents.Style.buttonBackgroundColorDisabledHover;
labelButtonText.opacity = 0.8;
}
onExited: {
labelButton.color = "#808080";
labelButton.color = MoneroComponents.Style.buttonBackgroundColorDisabled;
labelButtonText.opacity = 1.0;
}
}

View File

@@ -26,13 +26,14 @@
// 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.0
import QtQuick 2.9
import "../components" as MoneroComponents
import "../components/effects/" as MoneroEffects
Label {
id: item
fontSize: 18 * scaleRatio
fontSize: 18
Rectangle {
anchors.top: item.bottom
@@ -40,13 +41,12 @@ Label {
anchors.left: parent.left
anchors.right: parent.right
height: 2
color: MoneroComponents.Style.dividerColor
opacity: MoneroComponents.Style.dividerOpacity
}
color: MoneroComponents.Style.appWindowBorderColor
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.NoButton
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
MoneroEffects.ColorTransition {
targetObj: parent
blackColor: MoneroComponents.Style._b_appWindowBorderColor
whiteColor: MoneroComponents.Style._w_appWindowBorderColor
}
}
}

View File

@@ -28,7 +28,7 @@
import "../components" as MoneroComponents
import QtQuick 2.7
import QtQuick 2.9
import QtQuick.XmlListModel 2.0
import QtQuick.Layouts 1.2
import QtQuick.Controls 2.0
@@ -48,7 +48,7 @@ Drawer {
isOpened = true;
}
width: 240 * scaleRatio
width: 240
height: parent.height - (persistentSettings.customDecorations ? 50 : 0)
y: titleBar.height
@@ -77,13 +77,13 @@ Drawer {
id: item
color: "transparent"
width: sideBar.width
height: 32 * scaleRatio
height: 32
Text {
MoneroComponents.TextPlain {
anchors.left: parent.left
anchors.leftMargin: 16 * scaleRatio
anchors.leftMargin: 16
font.bold: true
font.pixelSize: 14 * scaleRatio
font.pixelSize: 14
color: MoneroComponents.Style.defaultFontColor
text: display_name
anchors.verticalCenter: parent.verticalCenter
@@ -101,7 +101,7 @@ Drawer {
// button gradient while checked
Image {
anchors.fill: parent
source: "../images/menuButtonGradient.png"
source: "qrc:///images/menuButtonGradient.png"
opacity: 0.65
visible: true

View File

@@ -26,19 +26,21 @@
// 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.0
import QtQuick 2.9
import QtGraphicalEffects 1.0
import "../components" as MoneroComponents
Item {
id: item
property alias input: input
property alias text: input.text
property alias placeholderText: placeholderLabel.text
property bool placeholderCenter: false
property string placeholderFontFamily: MoneroComponents.Style.fontRegular.name
property bool placeholderFontBold: false
property int placeholderFontSize: 18 * scaleRatio
property int placeholderFontSize: 18
property string placeholderColor: MoneroComponents.Style.defaultFontColor
property real placeholderOpacity: 0.35
@@ -51,6 +53,8 @@ Item {
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: {
@@ -63,7 +67,7 @@ Item {
}
}
property int fontSize: 18 * scaleRatio
property int fontSize: 18
property bool fontBold: false
property alias fontColor: input.color
property bool error: false
@@ -72,19 +76,19 @@ Item {
property alias labelTextFormat: inputLabel.textFormat
property string backgroundColor: "transparent"
property string tipText: ""
property int labelFontSize: 16 * scaleRatio
property int labelFontSize: 16
property bool labelFontBold: false
property alias labelWrapMode: inputLabel.wrapMode
property alias labelHorizontalAlignment: inputLabel.horizontalAlignment
property bool showingHeader: inputLabel.text !== "" || copyButton
property int inputHeight: 42 * scaleRatio
property int inputHeight: 42
signal labelLinkActivated(); // input label, rich text <a> signal
signal editingFinished();
signal accepted();
signal textUpdated();
height: showingHeader ? (inputLabel.height + inputItem.height + 2) * scaleRatio : 42 * scaleRatio
height: showingHeader ? (inputLabel.height + inputItem.height + 2) : 42
onTextUpdated: {
// check to remove placeholder text when there is content
@@ -105,7 +109,7 @@ Item {
}
}
Text {
MoneroComponents.TextPlain {
id: inputLabel
anchors.top: parent.top
anchors.left: parent.left
@@ -125,7 +129,7 @@ Item {
MoneroComponents.LabelButton {
id: copyButtonId
text: qsTr("Copy")
text: qsTr("Copy") + translationManager.emptyString
anchors.right: parent.right
onClicked: {
if (input.text.length > 0) {
@@ -139,13 +143,13 @@ Item {
Item{
id: inputItem
height: inputHeight * scaleRatio
height: inputHeight
anchors.top: showingHeader ? inputLabel.bottom : parent.top
anchors.topMargin: showingHeader ? 12 * scaleRatio : 2 * scaleRatio
anchors.topMargin: showingHeader ? 12 : 2
width: parent.width
clip: true
Text {
MoneroComponents.TextPlain {
id: placeholderLabel
visible: input.text ? false : true
anchors.verticalCenter: parent.verticalCenter
@@ -155,14 +159,14 @@ Item {
if(placeholderCenter){
return undefined;
}
else if(inlineIcon.visible){ return 50 * scaleRatio; }
else { return 10 * scaleRatio; }
else if(inlineIcon.visible){ return 50; }
else { return 10; }
}
opacity: item.placeholderOpacity
color: item.placeholderColor
font.family: item.placeholderFontFamily
font.pixelSize: placeholderFontSize * scaleRatio
font.pixelSize: placeholderFontSize
font.bold: item.placeholderFontBold
text: ""
z: 3
@@ -170,7 +174,7 @@ Item {
Rectangle {
anchors.fill: parent
anchors.topMargin: 1 * scaleRatio
anchors.topMargin: 1
color: "transparent"
}
@@ -185,34 +189,34 @@ Item {
Image {
id: inlineIcon
width: 26 * scaleRatio
height: 26 * scaleRatio
width: 26
height: 26
anchors.top: parent.top
anchors.topMargin: 8 * scaleRatio
anchors.topMargin: 8
anchors.left: parent.left
anchors.leftMargin: 12 * scaleRatio
source: "../images/moneroIcon-28x28.png"
anchors.leftMargin: 12
source: "qrc:///images/moneroIcon-28x28.png"
visible: false
}
MoneroComponents.Input {
id: input
anchors.fill: parent
anchors.leftMargin: inlineIcon.visible ? 44 * scaleRatio : 0
anchors.leftMargin: inlineIcon.visible ? 44 : 0
font.pixelSize: item.fontSize
font.bold: item.fontBold
onEditingFinished: item.editingFinished()
onAccepted: item.accepted();
onTextChanged: item.textUpdated()
topPadding: 10 * scaleRatio
bottomPadding: 10 * scaleRatio
topPadding: 10
bottomPadding: 10
}
MoneroComponents.InlineButton {
id: inlineButtonId
visible: item.inlineButtonText ? true : false
anchors.right: parent.right
anchors.rightMargin: 8 * scaleRatio
anchors.rightMargin: 8
}
}
}

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2015, The Monero Project
// Copyright (c) 2014-2019, The Monero Project
//
// All rights reserved.
//
@@ -26,7 +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 QtQuick 2.0
import QtQuick 2.9
import QtQuick.Layouts 1.1
import "../components" as MoneroComponents
@@ -41,16 +41,16 @@ ColumnLayout {
property alias labelButtonText: labelButton.text
property alias placeholderText: placeholderLabel.text
property int inputPaddingLeft: 10 * scaleRatio
property int inputPaddingRight: 10 * scaleRatio
property int inputPaddingTop: 10 * scaleRatio
property int inputPaddingBottom: 10 * scaleRatio
property int inputPaddingLeft: 10
property int inputPaddingRight: 10
property int inputPaddingTop: 10
property int inputPaddingBottom: 10
property int inputRadius: 4
property bool placeholderCenter: false
property string placeholderFontFamily: MoneroComponents.Style.fontRegular.name
property bool placeholderFontBold: false
property int placeholderFontSize: 18 * scaleRatio
property int placeholderFontSize: 18
property string placeholderColor: MoneroComponents.Style.defaultFontColor
property real placeholderOpacity: 0.35
@@ -69,20 +69,17 @@ ColumnLayout {
property string labelFontColor: MoneroComponents.Style.defaultFontColor
property bool labelFontBold: false
property int labelFontSize: 16 * scaleRatio
property int labelFontSize: 16
property bool labelButtonVisible: false
property string fontColor: "white"
property string fontColor: MoneroComponents.Style.defaultFontColor
property bool fontBold: false
property int fontSize: 16 * scaleRatio
property int fontSize: 16
property bool mouseSelection: true
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
@@ -100,10 +97,10 @@ ColumnLayout {
id: inputLabelRect
color: "transparent"
Layout.fillWidth: true
height: (inputLabel.height + 10) * scaleRatio
height: (inputLabel.height + 10)
visible: showingHeader ? true : false
Text {
MoneroComponents.TextPlain {
id: inputLabel
anchors.top: parent.top
anchors.left: parent.left
@@ -123,7 +120,7 @@ ColumnLayout {
RowLayout {
anchors.right: parent.right
spacing: 16 * scaleRatio
spacing: 16
MoneroComponents.LabelButton {
id: labelButton
@@ -134,7 +131,7 @@ ColumnLayout {
MoneroComponents.LabelButton {
id: copyButtonId
visible: copyButton && input.text !== ""
text: qsTr("Copy")
text: qsTr("Copy") + translationManager.emptyString
onClicked: {
if (input.text.length > 0) {
console.log("Copied to clipboard");
@@ -146,8 +143,11 @@ ColumnLayout {
MoneroComponents.LabelButton {
id: pasteButtonId
onClicked: item.onPaste(clipboard.text())
text: qsTr("Paste")
onClicked: {
input.clear();
input.paste();
}
text: qsTr("Paste") + translationManager.emptyString
visible: pasteButton
}
}
@@ -172,12 +172,12 @@ ColumnLayout {
onEditingFinished: item.editingFinished()
error: item.error
Text {
MoneroComponents.TextPlain {
id: placeholderLabel
visible: input.text ? false : true
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 10 * scaleRatio
anchors.leftMargin: 10
opacity: item.placeholderOpacity
color: item.placeholderColor
font.family: item.placeholderFontFamily
@@ -200,9 +200,7 @@ ColumnLayout {
id: inlineButtonId
visible: (inlineButtonId.text || inlineButtonId.icon) && inlineButtonVisible ? true : false
anchors.right: parent.right
anchors.rightMargin: 8 * scaleRatio
anchors.top: parent.top
anchors.topMargin: 4 * scaleRatio
anchors.rightMargin: 8
}
}
}

View File

@@ -26,15 +26,16 @@
// 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.5
import QtQuick 2.9
import QtGraphicalEffects 1.0
import "../components" as MoneroComponents
import "effects/" as MoneroEffects
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
@@ -46,12 +47,11 @@ Rectangle {
clicked();
}
function getOffset() {
var offset = 0
var item = button
while (item.under) {
offset += 20 * scaleRatio
offset += 20
item = item.under
}
return offset
@@ -59,77 +59,76 @@ Rectangle {
color: "transparent"
property bool present: !under || under.checked || checked || under.numSelectedChildren > 0
height: present ? ((appWindow.height >= 800) ? 44 * scaleRatio : 38 * scaleRatio ) : 0
height: present ? ((appWindow.height >= 800) ? 44 : 38 ) : 0
// button gradient while checked
Image {
LinearGradient {
visible: isOpenGL && button.checked || numSelectedChildren > 0
height: parent.height
width: 260
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: -20
anchors.leftMargin: parent.getOffset()
source: "../images/menuButtonGradient.png"
visible: button.checked
start: Qt.point(width, 0)
end: Qt.point(0, 0)
gradient: Gradient {
GradientStop { position: 0.0; color: MoneroComponents.Style.menuButtonGradientStart }
GradientStop { position: 1.0; color: MoneroComponents.Style.menuButtonGradientStop }
}
}
// fallback hover effect when opengl is not available
Rectangle {
visible: !isOpenGL && button.checked
anchors.fill: parent
color: MoneroComponents.Style.menuButtonFallbackBackgroundColor
}
// button decorations that are subject to leftMargin offsets
Rectangle {
anchors.left: parent.left
anchors.leftMargin: parent.getOffset() + 20 * scaleRatio
anchors.leftMargin: 20
height: parent.height
width: button.checked ? 20: 10
color: "#00000000"
// dot if unchecked
Rectangle {
id: dot
anchors.centerIn: parent
width: button.checked ? 20 * scaleRatio : 8 * scaleRatio
height: button.checked ? 20 * scaleRatio : 8 * scaleRatio
radius: button.checked ? 20 * scaleRatio : 4 * scaleRatio
color: button.dotColor
// arrow if checked
Image {
anchors.centerIn: parent
anchors.left: parent.left
source: "../images/arrow-right-medium-white.png"
visible: button.checked
}
}
width: 2
color: button.checked ? MoneroComponents.Style.buttonBackgroundColor : "transparent"
// button text
Text {
MoneroComponents.TextPlain {
id: label
color: MoneroComponents.Style.menuButtonTextColor
themeTransitionBlackColor: MoneroComponents.Style._b_menuButtonTextColor
themeTransitionWhiteColor: MoneroComponents.Style._w_menuButtonTextColor
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.right
anchors.leftMargin: 8 * scaleRatio
font.family: MoneroComponents.Style.fontMedium.name
anchors.leftMargin: button.getOffset() + 8
font.bold: true
font.pixelSize: 16 * scaleRatio
color: "#FFFFFF"
font.pixelSize: 14
}
}
// menu button right arrow
Image {
MoneroEffects.ImageMask {
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: 20 * scaleRatio
anchors.leftMargin: parent.getOffset()
source: "../images/right.png"
opacity: button.checked ? 1.0 : 0.4
anchors.right: parent.right
anchors.rightMargin: 20
height: 14
width: 8
image: MoneroComponents.Style.menuButtonImageRightSource
color: button.checked ? MoneroComponents.Style.menuButtonImageRightColorActive : MoneroComponents.Style.menuButtonImageRightColor
opacity: button.checked ? 0.8 : 0.25
}
Text {
MoneroComponents.TextPlain {
id: symbolText
anchors.right: parent.right
anchors.rightMargin: 44 * scaleRatio
anchors.rightMargin: 44
anchors.verticalCenter: parent.verticalCenter
font.pixelSize: 12 * scaleRatio
font.pixelSize: 12
font.bold: true
color: button.checked || buttonArea.containsMouse ? "#FFFFFF" : dot.color
color: MoneroComponents.Style.menuButtonTextColor
visible: appWindow.ctrlPressed
themeTransition: false
}
MouseArea {

View File

@@ -0,0 +1,15 @@
import QtQuick 2.9
import "." as MoneroComponents
import "effects/" as MoneroEffects
Rectangle {
color: MoneroComponents.Style.appWindowBorderColor
height: 1
MoneroEffects.ColorTransition {
targetObj: parent
blackColor: MoneroComponents.Style._b_appWindowBorderColor
whiteColor: MoneroComponents.Style._w_appWindowBorderColor
}
}

View File

@@ -1,118 +0,0 @@
import QtQuick 2.2
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 * scaleRatio
color: "#FFFFFF"
Image {
id: logo
visible: appWindow.width > 460 * scaleRatio
anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenterOffset: -5
anchors.left: parent.left
anchors.leftMargin: 50 * scaleRatio
source: "../images/moneroLogo2.png"
}
Image {
id: icon
visible: !logo.visible
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 40 * scaleRatio
source: "../images/moneroIcon.png"
}
Grid {
anchors.verticalCenter: parent.verticalCenter
anchors.top: parent.top
anchors.right: parent.right
anchors.topMargin: 10 * scaleRatio
width: 256 * scaleRatio
columns: 3
Text {
id: balanceLabel
width: 116 * scaleRatio
height: 20 * scaleRatio
font.family: "Arial"
font.pixelSize: 12 * scaleRatio
font.letterSpacing: -1
elide: Text.ElideRight
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignBottom
color: "#535353"
text: leftPanel.balanceLabelText + ":"
}
Text {
id: balanceText
width: 110 * scaleRatio
height: 20 * scaleRatio
font.family: "Arial"
font.pixelSize: 18 * scaleRatio
font.letterSpacing: -1
elide: Text.ElideRight
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignBottom
color: "#000000"
text: leftPanel.balanceText
}
Item {
height: 20 * scaleRatio
width: 20 * scaleRatio
Image {
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
source: "../images/lockIcon.png"
}
}
Text {
width: 116 * scaleRatio
height: 20 * scaleRatio
font.family: "Arial"
font.pixelSize: 12 * scaleRatio
font.letterSpacing: -1
elide: Text.ElideRight
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignBottom
color: "#535353"
text: qsTr("Unlocked Balance:")
}
Text {
id: availableBalanceText
width: 110 * scaleRatio
height: 20 * scaleRatio
font.family: "Arial"
font.pixelSize: 14 * scaleRatio
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"
}
}

View File

@@ -26,9 +26,10 @@
// 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.0
import QtQuick 2.9
import QtQuick.Layouts 1.1
import FontAwesome 1.0
import moneroComponents.Wallet 1.0
import "../components" as MoneroComponents
@@ -41,7 +42,7 @@ Rectangle {
if (status == Wallet.ConnectionStatus_Connected) {
if(!appWindow.daemonSynced)
return qsTr("Synchronizing")
if(appWindow.remoteNodeConnected)
if(persistentSettings.useRemoteNode)
return qsTr("Remote node")
return appWindow.isMining ? qsTr("Connected") + " + " + qsTr("Mining"): qsTr("Connected")
}
@@ -58,12 +59,12 @@ Rectangle {
}
RowLayout {
Layout.preferredHeight: 40 * scaleRatio
Layout.preferredHeight: 40
Item {
id: iconItem
width: 40 * scaleRatio
height: 40 * scaleRatio
width: 40
height: 40
opacity: {
if(item.connected == Wallet.ConnectionStatus_Connected){
return 1
@@ -74,20 +75,21 @@ Rectangle {
Image {
anchors.top: parent.top
anchors.topMargin: !appWindow.isMining ? 6 * scaleRatio : 4 * scaleRatio
anchors.topMargin: !appWindow.isMining ? 6 : 4
anchors.right: parent.right
anchors.rightMargin: !appWindow.isMining ? 11 * scaleRatio : 0
anchors.rightMargin: !appWindow.isMining ? 11 : 0
source: {
if(appWindow.isMining) {
return "../images/miningxmr.png"
return "qrc:///images/miningxmr.png"
} else if(item.connected == Wallet.ConnectionStatus_Connected) {
return "../images/lightning.png"
return "qrc:///images/lightning.png"
} else {
return "../images/lightning-white.png"
return "qrc:///images/lightning-white.png"
}
}
MouseArea {
anchors.fill: parent
visible: appWindow.walletMode >= 2
cursorShape: Qt.PointingHandCursor
onClicked: {
if(!appWindow.isMining) {
@@ -102,33 +104,38 @@ Rectangle {
}
Item {
height: 40 * scaleRatio
width: 260 * scaleRatio
height: 40
width: 260
Text {
MoneroComponents.TextPlain {
id: statusText
anchors.left: parent.left
anchors.top: parent.top
anchors.topMargin: 0
font.family: MoneroComponents.Style.fontMedium.name
font.bold: true
font.pixelSize: 13 * scaleRatio
color: "white"
opacity: 0.5
font.pixelSize: 13
color: MoneroComponents.Style.dimmedFontColor
opacity: MoneroComponents.Style.blackTheme ? 0.65 : 0.5
text: qsTr("Network status") + translationManager.emptyString
themeTransition: false
}
Text {
MoneroComponents.TextPlain {
id: statusTextVal
anchors.left: parent.left
anchors.top: parent.top
anchors.topMargin: 14
font.family: MoneroComponents.Style.fontMedium.name
font.pixelSize: 20 * scaleRatio
color: "white"
font.pixelSize: 20
color: MoneroComponents.Style.defaultFontColor
text: getConnectionStatusString(item.connected) + translationManager.emptyString
opacity: MoneroComponents.Style.blackTheme ? 1.0 : 0.7
themeTransition: false
MouseArea {
anchors.fill: parent
visible: appWindow.walletMode >= 2
cursorShape: Qt.PointingHandCursor
onClicked: {
if(!appWindow.isMining) {
@@ -140,6 +147,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: (
item.connected != Wallet.ConnectionStatus_Disconnected &&
!persistentSettings.useRemoteNode &&
persistentSettings.bootstrapNodeAddress == "auto"
)
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);
}
}
}
}
}
}

View File

@@ -1,295 +0,0 @@
// Copyright (c) 2017, 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.7
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.0
import "../components" as MoneroComponents
Item {
id: root
visible: false
z: parent.z + 2
property bool isHidden: true
property alias password: passwordInput1.text
// same signals as Dialog has
signal accepted()
signal rejected()
signal closeCallback()
function open() {
inactiveOverlay.visible = true
leftPanel.enabled = false
middlePanel.enabled = false
titleBar.enabled = false
show();
root.visible = true;
passwordInput1.text = "";
passwordInput2.text = "";
passwordInput1.focus = true
}
function close() {
inactiveOverlay.visible = false
leftPanel.enabled = true
middlePanel.enabled = true
titleBar.enabled = true
root.visible = false;
closeCallback();
}
function toggleIsHidden() {
passwordInput1.echoMode = isHidden ? TextInput.Normal : TextInput.Password;
passwordInput2.echoMode = isHidden ? TextInput.Normal : TextInput.Password;
isHidden = !isHidden;
}
// TODO: implement without hardcoding sizes
width: 480
height: 360
// 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 {
z: inactiveOverlay.z + 1
id: mainLayout
spacing: 10
anchors { fill: parent; margins: 35 * scaleRatio }
ColumnLayout {
id: column
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
Layout.maximumWidth: 400 * scaleRatio
Label {
text: qsTr("Please enter new password")
Layout.fillWidth: true
font.pixelSize: 16 * scaleRatio
font.family: MoneroComponents.Style.fontLight.name
color: MoneroComponents.Style.defaultFontColor
}
TextField {
id : passwordInput1
Layout.topMargin: 6
Layout.fillWidth: true
horizontalAlignment: TextInput.AlignLeft
verticalAlignment: TextInput.AlignVCenter
font.family: MoneroComponents.Style.fontLight.name
font.pixelSize: 24 * scaleRatio
echoMode: TextInput.Password
bottomPadding: 10
leftPadding: 10
topPadding: 10
color: MoneroComponents.Style.defaultFontColor
selectionColor: MoneroComponents.Style.dimmedFontColor
selectedTextColor: MoneroComponents.Style.defaultFontColor
KeyNavigation.tab: passwordInput2
background: Rectangle {
radius: 2
border.color: Qt.rgba(255, 255, 255, 0.35)
border.width: 1
color: "black"
Image {
width: 26 * scaleRatio
height: 26 * scaleRatio
opacity: 0.7
fillMode: Image.PreserveAspectFit
source: isHidden ? "../images/eyeShow.png" : "../images/eyeHide.png"
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: 20
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
hoverEnabled: true
onClicked: {
toggleIsHidden()
}
onEntered: {
parent.opacity = 0.9
parent.width = 28 * scaleRatio
parent.height = 28 * scaleRatio
}
onExited: {
parent.opacity = 0.7
parent.width = 26 * scaleRatio
parent.height = 26 * scaleRatio
}
}
}
}
Keys.onEscapePressed: {
root.close()
root.rejected()
}
}
// padding
Rectangle {
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
height: 10
opacity: 0
color: "black"
}
Label {
text: qsTr("Please confirm new password")
Layout.fillWidth: true
font.pixelSize: 16 * scaleRatio
font.family: MoneroComponents.Style.fontLight.name
color: MoneroComponents.Style.defaultFontColor
}
TextField {
id : passwordInput2
Layout.topMargin: 6
Layout.fillWidth: true
horizontalAlignment: TextInput.AlignLeft
verticalAlignment: TextInput.AlignVCenter
font.family: MoneroComponents.Style.fontLight.name
font.pixelSize: 24 * scaleRatio
echoMode: TextInput.Password
KeyNavigation.tab: okButton
bottomPadding: 10
leftPadding: 10
topPadding: 10
color: MoneroComponents.Style.defaultFontColor
selectionColor: MoneroComponents.Style.dimmedFontColor
selectedTextColor: MoneroComponents.Style.defaultFontColor
background: Rectangle {
radius: 2
border.color: Qt.rgba(255, 255, 255, 0.35)
border.width: 1
color: "black"
Image {
width: 26 * scaleRatio
height: 26 * scaleRatio
opacity: 0.7
fillMode: Image.PreserveAspectFit
source: isHidden ? "../images/eyeShow.png" : "../images/eyeHide.png"
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: 20
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
hoverEnabled: true
onClicked: {
toggleIsHidden()
}
onEntered: {
parent.opacity = 0.9
parent.width = 28 * scaleRatio
parent.height = 28 * scaleRatio
}
onExited: {
parent.opacity = 0.7
parent.width = 26 * scaleRatio
parent.height = 26 * scaleRatio
}
}
}
}
Keys.onReturnPressed: {
if (passwordInput1.text === passwordInput2.text) {
root.close()
root.accepted()
}
}
Keys.onEscapePressed: {
root.close()
root.rejected()
}
}
// padding
Rectangle {
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
height: 10
opacity: 0
color: "black"
}
// Ok/Cancel buttons
RowLayout {
id: buttons
spacing: 16 * scaleRatio
Layout.topMargin: 16
Layout.alignment: Qt.AlignRight
MoneroComponents.StandardButton {
id: cancelButton
text: qsTr("Cancel") + translationManager.emptyString
KeyNavigation.tab: passwordInput1
onClicked: {
root.close()
root.rejected()
}
}
MoneroComponents.StandardButton {
id: okButton
text: qsTr("Continue")
KeyNavigation.tab: cancelButton
enabled: passwordInput1.text === passwordInput2.text
onClicked: {
root.close()
root.accepted()
}
}
}
}
}
}

View File

@@ -26,16 +26,17 @@
// 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.0
import QtQuick 2.9
import QtQuick.Controls 1.4
import moneroComponents.Wallet 1.0
import "." as MoneroComponents
Item {
id: item
property string message: ""
property bool active: false
height: 120
width: 240
height: 180
width: 320
property int margin: 15
x: parent.width - width - margin
y: parent.height - height * scale.yScale - margin * scale.yScale
@@ -51,11 +52,12 @@ Item {
backgroundVisible: false
textFormat: TextEdit.AutoText
anchors.fill: parent
font.family: "Arial"
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 12
textMargin: 20
textColor: "white"
text: item.message
wrapMode: Text.WrapAnywhere
}
}
@@ -70,7 +72,7 @@ Item {
Timer {
id: hider
interval: 12000; running: false; repeat: false
interval: 30000; running: false; repeat: false
onTriggered: { item.active = false }
}

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project
// Copyright (c) 2014-2019, The Monero Project
//
// All rights reserved.
//
@@ -26,14 +26,17 @@
// 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.7
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.0
import FontAwesome 1.0
import "../components" as MoneroComponents
import "." as MoneroComponents
import "effects/" as MoneroEffects
import "../js/Utils.js" as Utils
Item {
id: root
@@ -41,176 +44,386 @@ Item {
z: parent.z + 2
property bool isHidden: true
property alias password: passwordInput.text
property alias password: passwordInput1.text
property string walletName
property string errorText
property bool passwordDialogMode
property bool passphraseDialogMode
property bool newPasswordDialogMode
// same signals as Dialog has
signal accepted()
signal acceptedNewPassword()
signal acceptedPassphrase()
signal rejected()
signal rejectedNewPassword()
signal rejectedPassphrase()
signal closeCallback()
function open(walletName, errorText) {
inactiveOverlay.visible = true // draw appwindow inactive
function _openInit(walletName, errorText) {
isHidden = true
capsLockTextLabel.visible = oshelper.isCapsLock();
passwordInput1.echoMode = TextInput.Password
passwordInput2.echoMode = TextInput.Password
passwordInput1.text = ""
passwordInput2.text = ""
passwordInput1.forceActiveFocus();
root.walletName = walletName ? walletName : ""
root.errorText = errorText ? errorText : "";
errorTextLabel.text = errorText ? errorText : "";
leftPanel.enabled = false
middlePanel.enabled = false
titleBar.enabled = false
show()
wizard.enabled = false
titleBar.state = "essentials"
root.visible = true;
passwordInput.forceActiveFocus();
passwordInput.text = ""
appWindow.hideBalanceForced = true;
appWindow.updateBalance();
}
function open(walletName, errorText) {
passwordDialogMode = true;
passphraseDialogMode = false;
newPasswordDialogMode = false;
_openInit(walletName, errorText);
}
function openPassphraseDialog() {
passwordDialogMode = false;
passphraseDialogMode = true;
newPasswordDialogMode = false;
_openInit("", "");
}
function openNewPasswordDialog() {
passwordDialogMode = false;
passphraseDialogMode = false;
newPasswordDialogMode = true;
_openInit("", "");
}
function showError(errorText) {
open(root.walletName, errorText);
}
function close() {
inactiveOverlay.visible = false
leftPanel.enabled = true
middlePanel.enabled = true
titleBar.enabled = true
wizard.enabled = true
titleBar.state = "default"
root.visible = false;
appWindow.hideBalanceForced = false;
appWindow.updateBalance();
closeCallback();
}
function toggleIsHidden() {
passwordInput1.echoMode = isHidden ? TextInput.Normal : TextInput.Password;
passwordInput2.echoMode = isHidden ? TextInput.Normal : TextInput.Password;
isHidden = !isHidden;
}
ColumnLayout {
z: inactiveOverlay.z + 1
id: mainLayout
spacing: 10
anchors { fill: parent; margins: 35 * scaleRatio }
anchors { fill: parent; margins: 35 }
ColumnLayout {
id: column
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
Layout.maximumWidth: 400 * scaleRatio
Layout.maximumWidth: 400
Label {
text: root.walletName.length > 0 ? qsTr("Please enter wallet password for: ") + root.walletName : qsTr("Please enter wallet password")
text: {
if (newPasswordDialogMode) {
return qsTr("Please enter new wallet password") + translationManager.emptyString;
} else {
var device = passwordDialogMode ? qsTr("wallet password") : qsTr("wallet device passphrase");
return (root.walletName.length > 0 ? qsTr("Please enter %1 for: ").arg(device) + root.walletName : qsTr("Please enter %1").arg(device)) + translationManager.emptyString;
}
}
Layout.fillWidth: true
font.pixelSize: 16 * scaleRatio
font.pixelSize: 16
font.family: MoneroComponents.Style.fontLight.name
color: MoneroComponents.Style.defaultFontColor
}
Label {
text: root.errorText
visible: root.errorText
text: qsTr("Warning: passphrase entry on host is a security risk as it can be captured by malware. It is advised to prefer device-based passphrase entry.") + translationManager.emptyString
visible: passphraseDialogMode
Layout.fillWidth: true
wrapMode: Text.Wrap
font.pixelSize: 14
font.family: MoneroComponents.Style.fontLight.name
color: MoneroComponents.Style.warningColor
}
Label {
id: errorTextLabel
visible: root.errorText || text !== ""
color: MoneroComponents.Style.errorColor
font.pixelSize: 16 * scaleRatio
font.family: MoneroComponents.Style.fontLight.name
font.pixelSize: 16
font.family: MoneroComponents.Style.fontLight.name
Layout.fillWidth: true
wrapMode: Text.Wrap
}
TextField {
id : passwordInput
Label {
id: capsLockTextLabel
visible: false
color: MoneroComponents.Style.errorColor
font.pixelSize: 16
font.family: MoneroComponents.Style.fontLight.name
Layout.fillWidth: true
wrapMode: Text.Wrap
text: qsTr("CAPSLOCKS IS ON.") + translationManager.emptyString;
}
MoneroComponents.Input {
id: passwordInput1
Layout.topMargin: 6
Layout.fillWidth: true
horizontalAlignment: TextInput.AlignLeft
verticalAlignment: TextInput.AlignVCenter
font.family: MoneroComponents.Style.fontLight.name
font.pixelSize: 24 * scaleRatio
font.pixelSize: 24
echoMode: TextInput.Password
KeyNavigation.tab: okButton
KeyNavigation.tab: {
if (passwordDialogMode) {
return okButton
} else {
return passwordInput2
}
}
implicitHeight: 50
bottomPadding: 10
leftPadding: 10
topPadding: 10
color: MoneroComponents.Style.defaultFontColor
selectionColor: MoneroComponents.Style.dimmedFontColor
selectedTextColor: MoneroComponents.Style.defaultFontColor
selectionColor: MoneroComponents.Style.textSelectionColor
selectedTextColor: MoneroComponents.Style.textSelectedColor
onTextChanged: capsLockTextLabel.visible = oshelper.isCapsLock();
background: Rectangle {
radius: 2
border.color: Qt.rgba(255, 255, 255, 0.35)
color: MoneroComponents.Style.blackTheme ? "black" : "#A9FFFFFF"
border.color: MoneroComponents.Style.inputBorderColorInActive
border.width: 1
color: "black"
Image {
width: 26 * scaleRatio
height: 26 * scaleRatio
MoneroEffects.ColorTransition {
targetObj: parent
blackColor: "black"
whiteColor: "#A9FFFFFF"
}
MoneroComponents.Label {
fontSize: 20
text: isHidden ? FontAwesome.eye : FontAwesome.eyeSlash
opacity: 0.7
fillMode: Image.PreserveAspectFit
source: isHidden ? "../images/eyeShow.png" : "../images/eyeHide.png"
anchors.verticalCenter: parent.verticalCenter
fontFamily: FontAwesome.fontFamily
anchors.right: parent.right
anchors.rightMargin: 20
anchors.rightMargin: 15
anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenterOffset: 1
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
hoverEnabled: true
onClicked: {
passwordInput.echoMode = isHidden ? TextInput.Normal : TextInput.Password;
isHidden = !isHidden;
toggleIsHidden();
}
onEntered: {
parent.opacity = 0.9
parent.width = 28 * scaleRatio
parent.height = 28 * scaleRatio
parent.fontSize = 24
}
onExited: {
parent.opacity = 0.7
parent.width = 26 * scaleRatio
parent.height = 26 * scaleRatio
parent.fontSize = 20
}
}
}
}
Keys.enabled: root.visible
Keys.onEnterPressed: Keys.onReturnPressed(event)
Keys.onReturnPressed: {
root.close()
root.accepted()
if (passwordDialogMode) {
root.accepted()
} else if (newPasswordDialogMode) {
root.acceptedNewPassword()
} else if (passphraseDialogMode) {
root.acceptedPassphrase()
}
}
Keys.onEscapePressed: {
root.close()
root.rejected()
if (passwordDialogMode) {
root.rejected()
} else if (newPasswordDialogMode) {
root.rejectedNewPassword()
} else if (passphraseDialogMode) {
root.rejectedPassphrase()
}
}
}
// padding
Rectangle {
visible: !passwordDialogMode
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
height: 10
opacity: 0
color: "black"
}
Label {
visible: !passwordDialogMode
text: newPasswordDialogMode ? qsTr("Please confirm new password") : qsTr("Please confirm wallet device passphrase") + translationManager.emptyString
Layout.fillWidth: true
font.pixelSize: 16
font.family: MoneroComponents.Style.fontLight.name
color: MoneroComponents.Style.defaultFontColor
}
MoneroComponents.Input {
id: passwordInput2
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
implicitHeight: 50
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.enabled: root.visible
Keys.onEnterPressed: Keys.onReturnPressed(event)
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()
}
}
}
// padding
Rectangle {
visible: !passwordDialogMode
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
height: 10
opacity: 0
color: "black"
}
// Ok/Cancel buttons
RowLayout {
id: buttons
spacing: 16 * scaleRatio
spacing: 16
Layout.topMargin: 16
Layout.alignment: Qt.AlignRight
MoneroComponents.StandardButton {
id: cancelButton
small: true
text: root.walletName.length > 0 ? qsTr("Change wallet") + translationManager.emptyString : qsTr("Cancel") + translationManager.emptyString
KeyNavigation.tab: passwordInput
text: qsTr("Cancel") + translationManager.emptyString
KeyNavigation.tab: passwordInput1
onClicked: {
root.close()
root.rejected()
if (passwordDialogMode) {
root.rejected()
} else if (newPasswordDialogMode) {
root.rejectedNewPassword()
} else if (passphraseDialogMode) {
root.rejectedPassphrase()
}
}
}
MoneroComponents.StandardButton {
id: okButton
small: true
text: qsTr("Continue")
text: qsTr("Ok") + translationManager.emptyString
KeyNavigation.tab: cancelButton
enabled: (passwordDialogMode == true) ? true : passwordInput1.text === passwordInput2.text
onClicked: {
root.close()
root.accepted()
if (passwordDialogMode) {
root.accepted()
} else if (newPasswordDialogMode) {
root.acceptedNewPassword()
} else if (passphraseDialogMode) {
root.acceptedPassphrase()
}
}
}
}
}
}
}

View File

@@ -1,193 +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.
// @TODO: Remove component after wizard redesign
import QtQuick 2.0
Item {
id: item
property alias interactive: mouseArea.enabled
property alias background: bar.color
property int fillLevel: 0
height: 40
clip: true
onFillLevelChanged: {
if (!interactive) {
//print("fillLevel: " + fillLevel)
fillRect.width = ruler.positions[fillLevel].currentX + ruler.x
}
}
Rectangle {
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
height: 24
//radius: 4
color: "#DBDBDB"
}
Rectangle {
id: bar
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
anchors.topMargin: 1
height: 24
//radius: 4
color: "#FFFFFF"
Rectangle {
id: fillRect
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.margins: 4
//radius: 2
width: ruler.x
color: "#FF6C3C"
Timer {
interval: 500
running: true
repeat: false
onTriggered: fillRect.loaded = true
}
property bool loaded: false
Behavior on width {
enabled: fillRect.loaded
NumberAnimation { duration: 100; easing.type: Easing.InQuad }
}
}
Text {
anchors.verticalCenter: parent.verticalCenter
font.family: "Arial"
font.pixelSize: 15
color: "#000000"
x: ruler.x + (ruler.positions[0] !== undefined ? ruler.positions[0].currentX - 3 : 0) - width
text: qsTr("Low") + translationManager.emptyString
}
Text {
anchors.verticalCenter: parent.verticalCenter
font.family: "Arial"
font.pixelSize: 15
color: "#000000"
x: ruler.x + (ruler.positions[4] !== undefined ? ruler.positions[4].currentX - 3 : 0) - width
text: qsTr("Medium") + translationManager.emptyString
}
Text {
anchors.verticalCenter: parent.verticalCenter
font.family: "Arial"
font.pixelSize: 15
color: "#000000"
x: ruler.x + (ruler.positions[13] !== undefined ? ruler.positions[13].currentX - 3 : 0) - width
text: qsTr("High") + translationManager.emptyString
}
MouseArea {
id: mouseArea
anchors.fill: parent
function positionBar() {
var xDiff = 999999
var index = -1
for(var i = 0; i < 14; ++i) {
var tmp = Math.abs(ruler.positions[i].currentX + ruler.x - mouseX)
if(tmp < xDiff) {
xDiff = tmp
index = i
}
}
if(index !== -1) {
fillRect.width = Qt.binding(function(){ return ruler.positions[index].currentX + ruler.x })
item.fillLevel = index
print ("fillLevel: " + item.fillLevel)
}
}
onClicked: positionBar()
onMouseXChanged: positionBar()
}
}
Row {
id: ruler
anchors.right: bar.right
anchors.rightMargin: 8
anchors.top: bar.bottom
anchors.topMargin: 5
property var positions: []
Row {
id: row2
spacing: ((bar.width - 8) / 2.23) / 4
Repeater {
model: 4
delegate: Rectangle {
id: delegateItem2
property int currentX: x + row2.x
height: 8
width: 1
color: "#DBDBDB"
Component.onCompleted: {
ruler.positions[index] = delegateItem2
}
}
}
}
Row {
id: row1
spacing: ((bar.width - 8) / 2.23) / 10
Repeater {
model: 10
delegate: Rectangle {
id: delegateItem1
property int currentX: x + row1.x
height: index === 4 ? 8 : 4
width: 1
color: "#DBDBDB"
Component.onCompleted: {
ruler.positions[index + 4] = delegateItem1
}
}
}
}
}
}

View File

@@ -26,21 +26,23 @@
// 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.0
import QtQuick 2.9
import QtQuick.Window 2.1
import QtQuick.Controls 1.4
import QtQuick.Layouts 1.1
import "../components" as MoneroComponents
Rectangle {
id: root
color: "white"
color: MoneroComponents.Style.blackTheme ? "white" : "transparent"
visible: false
z:11
z: 11
property alias messageText: messageTitle.text
property alias heightProgressText : heightProgress.text
width: 200 * scaleRatio
height: 100 * scaleRatio
width: 200
height: 100
opacity: 0.7
function show() {
@@ -58,34 +60,40 @@ Rectangle {
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
anchors.leftMargin: 30 * scaleRatio
anchors.rightMargin: 30 * scaleRatio
anchors.leftMargin: 30
anchors.rightMargin: 30
spacing: 12
BusyIndicator {
running: parent.visible
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
}
Text {
MoneroComponents.TextPlain {
id: messageTitle
text: "Please wait..."
font {
pixelSize: 22 * scaleRatio
pixelSize: 22
}
horizontalAlignment: Text.AlignHCenter
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
Layout.fillWidth: true
themeTransition: false
color: "black"
}
Text {
MoneroComponents.TextPlain {
id: heightProgress
font {
pixelSize: 18 * scaleRatio
pixelSize: 18
}
horizontalAlignment: Text.AlignHCenter
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
Layout.fillWidth: true
themeTransition: false
color: "black"
}
}
}

View File

@@ -26,7 +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 QtQuick 2.0
import QtQuick 2.9
import moneroComponents.Wallet 1.0
import "../components" as MoneroComponents
@@ -46,53 +46,71 @@ Rectangle {
fillLevel = progressLevel
if(typeof statusTxt != "undefined" && statusTxt != "") {
progressText.text = statusTxt;
progressTextValue.text = "";
} else {
progressText.text = syncText + remaining.toFixed(0);
progressText.text = syncText;
progressTextValue.text = remaining.toFixed(0);
}
}
}
Item {
anchors.top: item.top
anchors.topMargin: 10 * scaleRatio
anchors.leftMargin: 15 * scaleRatio
anchors.rightMargin: 15 * scaleRatio
anchors.topMargin: 10
anchors.leftMargin: 15
anchors.rightMargin: 15
anchors.fill: parent
Text {
MoneroComponents.TextPlain {
id: progressText
anchors.top: parent.top
anchors.topMargin: 6
font.family: MoneroComponents.Style.fontMedium.name
font.pixelSize: 13 * scaleRatio
font.bold: true
color: "white"
font.pixelSize: 13
font.bold: MoneroComponents.Style.progressBarProgressTextBold
color: MoneroComponents.Style.defaultFontColor
text: qsTr("Synchronizing %1").arg(syncType) + translationManager.emptyString
height: 18 * scaleRatio
height: 18
}
Text {
MoneroComponents.TextPlain {
id: progressTextValue
anchors.top: parent.top
anchors.topMargin: 6
anchors.right: parent.right
font.family: MoneroComponents.Style.fontMedium.name
font.pixelSize: 13 * scaleRatio
font.bold: true
color: "white"
height:18 * scaleRatio
font.pixelSize: 13
font.bold: MoneroComponents.Style.progressBarProgressTextBold
color: MoneroComponents.Style.defaultFontColor
height:18
}
Rectangle {
id: bar
anchors.left: parent.left
anchors.right: parent.right
anchors.top: progressText.bottom
anchors.topMargin: 4
height: 8 * scaleRatio
radius: 8 * scaleRatio
color: "#333333" // progressbar bg
height: 8
radius: 8
color: MoneroComponents.Style.progressBarBackgroundColor
states: [
State {
name: "black";
when: MoneroComponents.Style.blackTheme
PropertyChanges { target: bar; color: MoneroComponents.Style._b_progressBarBackgroundColor}
}, State {
name: "white";
when: !MoneroComponents.Style.blackTheme
PropertyChanges { target: bar; color: MoneroComponents.Style._w_progressBarBackgroundColor}
}
]
transitions: Transition {
enabled: appWindow.themeTransition
ColorAnimation { properties: "color"; easing.type: Easing.InOutQuad; duration: 300 }
}
Rectangle {
id: fillRect
@@ -100,10 +118,9 @@ Rectangle {
anchors.bottom: parent.bottom
anchors.left: parent.left
height: bar.height
property int maxWidth: bar.width * scaleRatio
property int maxWidth: bar.width
width: (maxWidth * fillLevel) / 100
radius: 8
// could change color based on progressbar status; if(item.fillLevel < 99 )
color: "#FA6800"
}
@@ -111,12 +128,9 @@ Rectangle {
color:"#333"
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.leftMargin: 8 * scaleRatio
anchors.leftMargin: 8
}
}
}
}

View File

@@ -26,7 +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 QtQuick 2.0
import QtQuick 2.9
import QtMultimedia 5.4
import QtQuick.Dialogs 1.2
import moneroComponents.QRCodeScanner 1.0

View File

@@ -26,7 +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 QtQuick 2.0
import QtQuick 2.9
import QtQuick.Layouts 1.1
import "../components" as MoneroComponents
@@ -35,14 +35,14 @@ Item {
id: radioButton
property alias text: label.text
property bool checked: false
property int fontSize: 14 * scaleRatio
property int fontSize: 14
property alias fontColor: label.color
signal clicked()
height: 26 * scaleRatio
height: 26
width: layout.width
// legacy properties
property var checkedColor: "white"
property var borderColor: checked ? Qt.rgba(1, 1, 1, 0.35) : Qt.rgba(1, 1, 1, 0.25)
property var checkedColor: MoneroComponents.Style.blackTheme ? "white" : "#666666"
property var borderColor: checked ? MoneroComponents.Style.inputBorderColorActive : MoneroComponents.Style.inputBorderColorInActive
function toggle(){
radioButton.checked = !radioButton.checked
@@ -65,16 +65,16 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
color: checkedColor
width: 10 * scaleRatio
height: 10 * scaleRatio
width: 10
height: 10
radius: 10
opacity: 0.8
}
}
Text {
MoneroComponents.TextPlain {
id: label
Layout.leftMargin: (!isMobile ? 10 : 8) * scaleRatio
Layout.leftMargin: 10
color: MoneroComponents.Style.defaultFontColor
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: radioButton.fontSize

View File

@@ -28,14 +28,14 @@
import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.2
import QtQuick 2.2
import QtQuick 2.9
import QtQuick.Layouts 1.1
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
@@ -47,16 +47,16 @@ GridLayout {
// the wizards get redesigned to the black-theme
property string placeholderFontFamily: MoneroComponents.Style.fontRegular.name
property bool placeholderFontBold: false
property int placeholderFontSize: 18 * scaleRatio
property int placeholderFontSize: 15
property string placeholderColor: MoneroComponents.Style.defaultFontColor
property real placeholderOpacity: 0.35
property int labelFontSize: 14
property string lineEditBorderColor: Qt.rgba(0, 0, 0, 0.15)
property string lineEditBackgroundColor: "white"
property string lineEditFontColor: "black"
property int lineEditFontSize: 18 * scaleRatio
property int labelFontSize: 16 * scaleRatio
property bool lineEditFontBold: true
property string lineEditBackgroundColor: "transparent"
property string lineEditBorderColor: MoneroComponents.Style.inputBorderColorInActive
property string lineEditFontColor: MoneroComponents.Style.defaultFontColor
property bool lineEditFontBold: false
property int lineEditFontSize: 15
signal editingFinished()
signal textChanged()

View File

@@ -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.0
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
}
}
}
}

View File

@@ -0,0 +1,65 @@
import QtQuick 2.9
import QtQuick.Layouts 1.1
import "../components" as MoneroComponents
ColumnLayout {
property alias buttonText: button.text
property alias description: description.text
property alias title: title.text
signal clicked()
id: settingsListItem
Layout.fillWidth: true
spacing: 0
Rectangle {
// divider
Layout.preferredHeight: 1
Layout.fillWidth: true
Layout.bottomMargin: 8
color: MoneroComponents.Style.dividerColor
opacity: MoneroComponents.Style.dividerOpacity
}
RowLayout {
Layout.fillWidth: true
spacing: 0
ColumnLayout {
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter
spacing: 0
MoneroComponents.TextPlain {
id: title
Layout.fillWidth: true
Layout.preferredHeight: 20
Layout.topMargin: 8
color: MoneroComponents.Style.defaultFontColor
opacity: MoneroComponents.Style.blackTheme ? 1.0 : 0.8
font.bold: true
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 16
}
MoneroComponents.TextPlainArea {
id: description
color: MoneroComponents.Style.dimmedFontColor
colorBlackTheme: MoneroComponents.Style._b_dimmedFontColor
colorWhiteTheme: MoneroComponents.Style._w_dimmedFontColor
Layout.fillWidth: true
horizontalAlignment: TextInput.AlignLeft
}
}
MoneroComponents.StandardButton {
id: button
small: true
onClicked: {
settingsListItem.clicked()
}
width: 135
}
}
}

View File

@@ -26,7 +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 QtQuick 2.0
import QtQuick 2.9
import QtQuick.Layouts 1.1
import "../components" as MoneroComponents
@@ -39,18 +39,18 @@ Item {
property bool small: false
property alias text: label.text
property int fontSize: {
if(small) return 14 * scaleRatio;
else return 16 * scaleRatio;
if(small) return 14;
else return 16;
}
property alias label: label
signal clicked()
height: small ? 30 * scaleRatio : 36 * scaleRatio
width: buttonLayout.width + 22 * scaleRatio
height: small ? 30 : 36
width: buttonLayout.width + 22
implicitHeight: height
implicitWidth: width
function doClick() {
// Android workaround
function doClick(){
releaseFocus();
clicked();
}
@@ -63,6 +63,7 @@ Item {
state: button.enabled ? "active" : "disabled"
Component.onCompleted: state = state
states: [
State {
name: "hover"
@@ -89,7 +90,9 @@ Item {
}
}
]
transitions: Transition {
enabled: appWindow.themeTransition
ColorAnimation { duration: 100 }
}
}
@@ -97,18 +100,19 @@ Item {
RowLayout {
id: buttonLayout
height: button.height
spacing: 11 * scaleRatio
spacing: 11
anchors.centerIn: parent
Text {
MoneroComponents.TextPlain {
id: label
font.family: MoneroComponents.Style.fontBold.name
font.bold: true
font.pixelSize: button.fontSize
color: !buttonArea.pressed ? button.textColor : "transparent"
visible: text !== ""
themeTransition: false
Text {
MoneroComponents.TextPlain {
anchors.centerIn: parent
color: button.textColor
font.bold: label.font.bold
@@ -116,14 +120,15 @@ Item {
font.pixelSize: label.font.pixelSize - 1
text: label.text
opacity: buttonArea.pressed ? 1 : 0
themeTransition: false
}
}
Image {
visible: button.rightIcon !== ""
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
width: button.small ? 16 * scaleRatio : 20 * scaleRatio
height: button.small ? 16 * scaleRatio : 20 * scaleRatio
width: button.small ? 16 : 20
height: button.small ? 16 : 20
source: {
if(button.rightIconInactive !== "" && !button.enabled) {
return button.rightIconInactive;
@@ -141,6 +146,8 @@ Item {
cursorShape: Qt.PointingHandCursor
}
Keys.enabled: button.visible
Keys.onSpacePressed: doClick()
Keys.onEnterPressed: Keys.onReturnPressed(event)
Keys.onReturnPressed: doClick()
}

View File

@@ -26,7 +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 QtQuick 2.0
import QtQuick 2.9
import QtQuick.Controls 2.0
import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.1
@@ -34,6 +34,7 @@ import QtQuick.Controls.Styles 1.4
import QtQuick.Window 2.0
import "../components" as MoneroComponents
import "effects/" as MoneroEffects
Rectangle {
id: root
@@ -56,12 +57,18 @@ Rectangle {
signal rejected()
signal closeCallback();
Image {
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
source: "../images/middlePanelBg.jpg"
// 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
@@ -75,11 +82,8 @@ Rectangle {
function open() {
// Center
if(!isMobile) {
root.x = parent.width/2 - root.width/2
root.y = 100
}
show()
root.x = parent.width/2 - root.width/2
root.y = 100
root.z = 11
root.visible = true;
}
@@ -90,23 +94,23 @@ Rectangle {
}
// TODO: implement without hardcoding sizes
width: isMobile ? screenWidth : 520 * scaleRatio
height: isMobile ? screenHeight : 380 * scaleRatio
width: 520
height: 380
ColumnLayout {
id: mainLayout
spacing: 10 * scaleRatio
spacing: 10
anchors.fill: parent
anchors.margins: (isMobile? 17 : 20) * scaleRatio
anchors.margins: 20
RowLayout {
id: column
Layout.topMargin: 14 * scaleRatio
Layout.topMargin: 14
Layout.fillWidth: true
MoneroComponents.Label {
id: dialogTitle
fontSize: 18 * scaleRatio
fontSize: 18
fontFamily: "Arial"
color: MoneroComponents.Style.defaultFontColor
}
@@ -115,12 +119,15 @@ Rectangle {
Item {
Layout.fillHeight: true
Layout.fillWidth: true
Layout.preferredHeight: 240 * scaleRatio
Layout.preferredHeight: 240
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
@@ -130,7 +137,7 @@ Rectangle {
font.family: MoneroComponents.Style.fontLight.name
textFormat: TextEdit.AutoText
readOnly: true
font.pixelSize: 14 * scaleRatio
font.pixelSize: 14
selectByMouse: false
wrapMode: TextEdit.Wrap
color: MoneroComponents.Style.defaultFontColor
@@ -155,7 +162,7 @@ Rectangle {
// Ok/Cancel buttons
RowLayout {
id: buttons
spacing: 60 * scaleRatio
spacing: 60
Layout.alignment: Qt.AlignHCenter
MoneroComponents.StandardButton {
@@ -184,15 +191,17 @@ Rectangle {
id: closeButton
anchors.top: parent.top
anchors.right: parent.right
width: 48 * scaleRatio
height: 48 * scaleRatio
width: 48
height: 48
color: "transparent"
Image {
MoneroEffects.ImageMask {
anchors.centerIn: parent
width: 16 * scaleRatio
height: 16 * scaleRatio
source: "../images/close.png"
width: 16
height: 16
image: MoneroComponents.Style.titleBarCloseSource
color: MoneroComponents.Style.defaultFontColor
opacity: 0.75
}
MouseArea {
@@ -209,7 +218,7 @@ Rectangle {
// window borders
Rectangle{
width: 1 * scaleRatio
width: 1
color: MoneroComponents.Style.grey
anchors.left: parent.left
anchors.top: parent.top
@@ -217,7 +226,7 @@ Rectangle {
}
Rectangle{
width: 1 * scaleRatio
width: 1
color: MoneroComponents.Style.grey
anchors.right: parent.right
anchors.top: parent.top
@@ -225,7 +234,7 @@ Rectangle {
}
Rectangle{
height: 1 * scaleRatio
height: 1
color: MoneroComponents.Style.grey
anchors.left: parent.left
anchors.top: parent.top
@@ -233,7 +242,7 @@ Rectangle {
}
Rectangle{
height: 1 * scaleRatio
height: 1
color: MoneroComponents.Style.grey
anchors.left: parent.left
anchors.bottom: parent.bottom

View File

@@ -26,9 +26,12 @@
// 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.0
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtGraphicalEffects 1.0
import "../components" as MoneroComponents
import "../components/effects/" as MoneroEffects
Item {
id: dropdown
@@ -36,14 +39,14 @@ Item {
property alias dataModel: repeater.model
property string shadowPressedColor
property string shadowReleasedColor
property string pressedColor
property string releasedColor
property string textColor: "#FFFFFF"
property string pressedColor: MoneroComponents.Style.appWindowBorderColor
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 * scaleRatio
property int fontItemSize: 14 * scaleRatio
property int fontHeaderSize: 16
property int fontItemSize: 14
property string colorBorder: MoneroComponents.Style.inputBorderColorInActive
property string colorHeaderBackground: "transparent"
property bool headerBorder: true
@@ -54,18 +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() {
@@ -81,23 +72,23 @@ Item {
height: dropdown.dropdownHeight
Rectangle {
color: dropdown.colorHeaderBackground
color: "transparent"
border.width: dropdown.headerBorder ? 1 : 0
border.color: dropdown.colorBorder
radius: 4
anchors.fill: parent
}
Text {
MoneroComponents.TextPlain {
id: firstColText
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 12 * scaleRatio
anchors.leftMargin: 12
elide: Text.ElideRight
font.family: MoneroComponents.Style.fontRegular.name
font.bold: dropdown.headerFontBold
font.pixelSize: dropdown.fontHeaderSize
color: "#FFFFFF"
color: dropdown.textColor
}
Item {
@@ -105,131 +96,140 @@ Item {
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.right: parent.right
width: 32 * scaleRatio
width: 32
Image {
id: dropdownIcon
anchors.centerIn: parent
source: "../images/whiteDropIndicator.png"
rotation: dropdown.expanded ? 180 * scaleRatio : 0
source: "qrc:///images/whiteDropIndicator.png"
visible: false
}
ColorOverlay {
source: dropdownIcon
anchors.fill: dropdownIcon
color: MoneroComponents.Style.defaultFontColor
rotation: dropdown.expanded ? 180 : 0
opacity: 1
}
}
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
//radius: 4
Popup {
id: popup
padding: 0
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent
Rectangle {
anchors.left: parent.left
anchors.top: parent.top
width: 3 * scaleRatio; height: 3 * scaleRatio
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 * scaleRatio; height: 3 * scaleRatio
color: dropdown.pressedColor
}
Rectangle {
anchors.left: parent.left
anchors.top: parent.top
width: 3; height: 3
color: dropdown.pressedColor
}
Behavior on height {
NumberAnimation { duration: 100; easing.type: Easing.InQuad }
}
Rectangle {
anchors.right: parent.right
anchors.top: parent.top
width: 3; height: 3
color: dropdown.pressedColor
}
Column {
id: columnid
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
property int currentIndex: 0
Behavior on height {
NumberAnimation { duration: 100; easing.type: Easing.InQuad }
}
Repeater {
id: repeater
Column {
id: columnid
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
property int currentIndex: 0
// 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
Repeater {
id: repeater
delegate: Rectangle {
anchors.left: parent.left
anchors.right: parent.right
height: (dropdown.dropdownHeight * 0.75) * scaleRatio
//radius: index === repeater.count - 1 ? 4 : 0
color: itemArea.containsMouse || index === columnid.currentIndex || itemArea.containsMouse ? dropdown.releasedColor : dropdown.pressedColor
// 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
Text {
id: col1Text
anchors.verticalCenter: parent.verticalCenter
delegate: Rectangle {
anchors.left: parent.left
anchors.right: col2Text.left
anchors.leftMargin: 12 * scaleRatio
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
}
Text {
id: col2Text
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: 45 * scaleRatio
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 14 * scaleRatio
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 * scaleRatio; height: 3 * scaleRatio
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 * scaleRatio; height: 3 * scaleRatio
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();
dropdown.update()
}
}
}
}

View File

@@ -3,35 +3,189 @@ pragma Singleton
import QtQuick 2.5
QtObject {
property bool blackTheme: true
property QtObject fontMedium: FontLoader { id: _fontMedium; source: "qrc:/fonts/Roboto-Medium.ttf"; }
property QtObject fontBold: FontLoader { id: _fontBold; source: "qrc:/fonts/Roboto-Bold.ttf"; }
property QtObject fontLight: FontLoader { id: _fontLight; source: "qrc:/fonts/Roboto-Light.ttf"; }
property QtObject fontRegular: FontLoader { id: _fontRegular; source: "qrc:/fonts/Roboto-Regular.ttf"; }
property QtObject fontMonoMedium: FontLoader { id: _fontMonoMedium; source: "qrc:/fonts/RobotoMono-Medium.ttf"; }
property QtObject fontMonoBold: FontLoader { id: _fontMonoBold; source: "qrc:/fonts/RobotoMono-Bold.ttf"; }
property QtObject fontMonoLight: FontLoader { id: _fontMonoLight; source: "qrc:/fonts/RobotoMono-Light.ttf"; }
property QtObject fontMonoRegular: FontLoader { id: _fontMonoRegular; source: "qrc:/fonts/RobotoMono-Regular.ttf"; }
property string grey: "#404040"
property string orange: "#FF6C3C"
property string white: "#FFFFFF"
property string green: "#2EB358"
property string moneroGrey: "#4C4C4C"
property string warningColor: "orange"
property string defaultFontColor: "white"
property string dimmedFontColor: "#BBBBBB"
property string lightGreyFontColor: "#DFDFDF"
property string errorColor: "#FA6800"
property string inputBoxBackground: "black"
property string inputBoxBackgroundError: "#FFDDDD"
property string inputBoxColor: "white"
property string legacy_placeholderFontColor: "#BABABA"
property string inputBorderColorActive: Qt.rgba(255, 255, 255, 0.38)
property string inputBorderColorInActive: Qt.rgba(255, 255, 255, 0.32)
property string inputBorderColorInvalid: Qt.rgba(255, 0, 0, 0.40)
property string defaultFontColor: blackTheme ? _b_defaultFontColor : _w_defaultFontColor
property string dimmedFontColor: blackTheme ? _b_dimmedFontColor : _w_dimmedFontColor
property string lightGreyFontColor: blackTheme ? _b_lightGreyFontColor : _w_lightGreyFontColor
property string errorColor: blackTheme ? _b_errorColor : _w_errorColor
property string textSelectionColor: blackTheme ? _b_textSelectionColor : _w_textSelectionColor
property string textSelectedColor: blackTheme ? _b_textSelectedColor : _w_textSelectedColor
property string buttonBackgroundColor: "#FA6800"
property string buttonBackgroundColorHover: "#E65E00"
property string buttonBackgroundColorDisabled: "#707070"
property string buttonBackgroundColorDisabledHover: "#808080"
property string buttonTextColor: "white"
property string buttonTextColorDisabled: "black"
property string dividerColor: "white"
property real dividerOpacity: 0.20
property string inputBoxBackground: blackTheme ? _b_inputBoxBackground : _w_inputBoxBackground
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
property string inputBorderColorActive: blackTheme ? _b_inputBorderColorActive : _w_inputBorderColorActive
property string inputBorderColorInActive: blackTheme ? _b_inputBorderColorInActive : _w_inputBorderColorInActive
property string inputBorderColorInvalid: blackTheme ? _b_inputBorderColorInvalid : _w_inputBorderColorInvalid
property string buttonBackgroundColor: blackTheme ? _b_buttonBackgroundColor : _w_buttonBackgroundColor
property string buttonBackgroundColorHover: blackTheme ? _b_buttonBackgroundColorHover : _w_buttonBackgroundColorHover
property string buttonBackgroundColorDisabled: blackTheme ? _b_buttonBackgroundColorDisabled : _w_buttonBackgroundColorDisabled
property string buttonBackgroundColorDisabledHover: blackTheme ? _b_buttonBackgroundColorDisabledHover : _w_buttonBackgroundColorDisabledHover
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 dividerColor: blackTheme ? _b_dividerColor : _w_dividerColor
property real dividerOpacity: blackTheme ? _b_dividerOpacity : _w_dividerOpacity
property string titleBarBackgroundGradientStart: blackTheme ? _b_titleBarBackgroundGradientStart : _w_titleBarBackgroundGradientStart
property string titleBarBackgroundGradientStop: blackTheme ? _b_titleBarBackgroundGradientStop : _w_titleBarBackgroundGradientStop
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 titleBarFullscreenSource: blackTheme ? _b_titleBarFullscreenSource : _w_titleBarFullscreenSource
property string titleBarCloseSource: blackTheme ? _b_titleBarCloseSource : _w_titleBarCloseSource
property string titleBarButtonHoverColor: blackTheme ? _b_titleBarButtonHoverColor : _w_titleBarButtonHoverColor
property string wizardBackgroundGradientStart: blackTheme ? _b_wizardBackgroundGradientStart : _w_wizardBackgroundGradientStart
property string middlePanelBackgroundGradientStart: blackTheme ? _b_middlePanelBackgroundGradientStart : _w_middlePanelBackgroundGradientStart
property string middlePanelBackgroundGradientStop: blackTheme ? _b_middlePanelBackgroundGradientStop : _w_middlePanelBackgroundGradientStop
property string middlePanelBackgroundColor: blackTheme ? _b_middlePanelBackgroundColor : _w_middlePanelBackgroundColor
property string menuButtonFallbackBackgroundColor: blackTheme ? _b_menuButtonFallbackBackgroundColor : _w_menuButtonFallbackBackgroundColor
property string menuButtonGradientStart: blackTheme ? _b_menuButtonGradientStart : _w_menuButtonGradientStart
property string menuButtonGradientStop: blackTheme ? _b_menuButtonGradientStop : _w_menuButtonGradientStop
property string menuButtonTextColor: blackTheme ? _b_menuButtonTextColor : _w_menuButtonTextColor
property string menuButtonImageRightColorActive: blackTheme ? _b_menuButtonImageRightColorActive : _w_menuButtonImageRightColorActive
property string menuButtonImageRightColor: blackTheme ? _b_menuButtonImageRightColor : _w_menuButtonImageRightColor
property string menuButtonImageRightSource: blackTheme ? _b_menuButtonImageRightSource : _w_menuButtonImageRightSource
property string menuButtonImageDotArrowSource: blackTheme ? _b_menuButtonImageDotArrowSource : _w_menuButtonImageDotArrowSource
property string inlineButtonTextColor: blackTheme ? _b_inlineButtonTextColor : _w_inlineButtonTextColor
property string inlineButtonBorderColor: blackTheme ? _b_inlineButtonBorderColor : _w_inlineButtonBorderColor
property string appWindowBackgroundColor: blackTheme ? _b_appWindowBackgroundColor : _w_appWindowBackgroundColor
property string appWindowBorderColor: blackTheme ? _b_appWindowBorderColor : _w_appWindowBorderColor
property bool progressBarProgressTextBold: blackTheme ? _b_progressBarProgressTextBold : _w_progressBarProgressTextBold
property string progressBarBackgroundColor: blackTheme ? _b_progressBarBackgroundColor : _w_progressBarBackgroundColor
property string leftPanelBackgroundGradientStart: blackTheme ? _b_leftPanelBackgroundGradientStart : _w_leftPanelBackgroundGradientStart
property string leftPanelBackgroundGradientStop: blackTheme ? _b_leftPanelBackgroundGradientStop : _w_leftPanelBackgroundGradientStop
property string historyHeaderTextColor: blackTheme ? _b_historyHeaderTextColor : _w_historyHeaderTextColor
property string _b_defaultFontColor: "white"
property string _b_dimmedFontColor: "#BBBBBB"
property string _b_lightGreyFontColor: "#DFDFDF"
property string _b_errorColor: "#FA6800"
property string _b_textSelectionColor: "#BBBBBB"
property string _b_textSelectedColor: "white"
property string _b_inputBoxBackground: "black"
property string _b_inputBoxBackgroundError: "#FFDDDD"
property string _b_inputBoxColor: "white"
property string _b_legacy_placeholderFontColor: "#BABABA"
property string _b_inputBorderColorActive: Qt.rgba(255, 255, 255, 0.38)
property string _b_inputBorderColorInActive: Qt.rgba(255, 255, 255, 0.32)
property string _b_inputBorderColorInvalid: Qt.rgba(255, 0, 0, 0.40)
property string _b_buttonBackgroundColor: "#FA6800"
property string _b_buttonBackgroundColorHover: "#E65E00"
property string _b_buttonBackgroundColorDisabled: "#707070"
property string _b_buttonBackgroundColorDisabledHover: "#808080"
property string _b_buttonInlineBackgroundColor: "#707070"
property string _b_buttonTextColor: "white"
property string _b_buttonTextColorDisabled: "black"
property string _b_dividerColor: "white"
property real _b_dividerOpacity: 0.20
property string _b_titleBarBackgroundGradientStart: "#262626";
property string _b_titleBarBackgroundGradientStop: "#191919"
property string _b_titleBarBackgroundBorderColor: "#2f2f2f"
property string _b_titleBarLogoSource: "qrc:///images/titlebarLogo.png"
property string _b_titleBarMinimizeSource: "qrc:///images/minimize.svg"
property string _b_titleBarFullscreenSource: "qrc:///images/fullscreen.svg"
property string _b_titleBarCloseSource: "qrc:///images/close.svg"
property string _b_titleBarButtonHoverColor: "#10FFFFFF"
property string _b_wizardBackgroundGradientStart: "#1e1e1e"
property string _b_middlePanelBackgroundGradientStart: "#232323"
property string _b_middlePanelBackgroundGradientStop: "#101010"
property string _b_middlePanelBackgroundColor: "#181818"
property string _b_menuButtonFallbackBackgroundColor: "#09FFFFFF"
property string _b_menuButtonGradientStart: "#11FFFFFF"
property string _b_menuButtonGradientStop: "#00000000"
property string _b_menuButtonTextColor: "white"
property string _b_menuButtonImageRightColorActive: "white"
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_inlineButtonBorderColor: "black"
property string _b_appWindowBackgroundColor: "white"
property string _b_appWindowBorderColor: "#313131"
property bool _b_progressBarProgressTextBold: true
property string _b_progressBarBackgroundColor: "#24FFFFFF"
property string _b_leftPanelBackgroundGradientStart: "#222222"
property string _b_leftPanelBackgroundGradientStop: "#1a1a1a"
property string _b_historyHeaderTextColor: "#C0C0C0"
property string _w_defaultFontColor: "black"
property string _w_dimmedFontColor: "#3f3f3f"
property string _w_lightGreyFontColor: "#515151"
property string _w_errorColor: "#FA6800"
property string _w_textSelectionColor: "#BBBBBB"
property string _w_textSelectedColor: "black"
property string _w_inputBoxBackground: "white"
property string _w_inputBoxBackgroundError: "#FFDDDD"
property string _w_inputBoxColor: "black"
property string _w_legacy_placeholderFontColor: "#BABABA"
property string _w_inputBorderColorActive: Qt.rgba(0, 0, 0, 0.30)
property string _w_inputBorderColorInActive: Qt.rgba(0, 0, 0, 0.16)
property string _w_inputBorderColorInvalid: Qt.rgba(255, 0, 0, 0.50)
property string _w_buttonBackgroundColor: "#FA6800"
property string _w_buttonBackgroundColorHover: "#E65E00"
property string _w_buttonBackgroundColorDisabled: "#bbbbbb"
property string _w_buttonBackgroundColorDisabledHover: "#D1D1D1"
property string _w_buttonInlineBackgroundColor: "#bbbbbb"
property string _w_buttonTextColor: "white"
property string _w_buttonTextColorDisabled: "black"
property string _w_dividerColor: "black"
property real _w_dividerOpacity: 0.20
property string _w_titleBarBackgroundGradientStart: "#fcfcfc"
property string _w_titleBarBackgroundGradientStop: "#FBFBFB"
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_titleBarFullscreenSource: "qrc:///images/themes/white/fullscreen.svg"
property string _w_titleBarCloseSource: "qrc:///images/themes/white/close.svg"
property string _w_titleBarButtonHoverColor: "#11000000"
property string _w_wizardBackgroundGradientStart: "white"
property string _w_middlePanelBackgroundGradientStart: "white"
property string _w_middlePanelBackgroundGradientStop: "#ededed"
property string _w_middlePanelBackgroundColor: "#f5f5f5"
property string _w_menuButtonFallbackBackgroundColor: "#09000000"
property string _w_menuButtonGradientStart: "#08000000"
property string _w_menuButtonGradientStop: "#10FFFFFF"
property string _w_menuButtonTextColor: "#787878"
property string _w_menuButtonImageRightSource: "qrc:///images/right.svg"
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_inlineButtonBorderColor: "transparent"
property string _w_appWindowBackgroundColor: "black"
property string _w_appWindowBorderColor: "#dedede"
property bool _w_progressBarProgressTextBold: false
property string _w_progressBarBackgroundColor: "#24000000"
property string _w_leftPanelBackgroundGradientStart: "white"
property string _w_leftPanelBackgroundGradientStop: "#f5f5f5"
property string _w_historyHeaderTextColor: "#515151"
}

View File

@@ -1,237 +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.0
Item {
id: dropdown
property bool expanded: false
property alias dataModel: repeater.model
signal collapsed()
signal optionClicked(int option)
width: 72
height: 37
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 + dropArea.height)
return false
return true
}
Item {
id: head
anchors.fill: parent
Rectangle {
anchors.left: parent.left
anchors.right: parent.right
height: parent.height - 1
y: dropdown.expanded || dropArea.height > 0 ? 0 : 1
//radius: 3
color: dropdown.expanded || dropArea.height > 0 ? "#888888" : "#DBDBDB"
}
Rectangle {
anchors.left: parent.left
anchors.right: parent.right
height: parent.height - 1
y: dropdown.expanded || dropArea.height > 0 ? 1 : 0
//radius: 3
color: dropdown.expanded || dropArea.height > 0 ? "#DBDBDB" : "#F0EEEE"
}
Rectangle {
anchors.left: parent.left
anchors.bottom: parent.bottom
height: 3
width: 3
color: "#DBDBDB"
visible: dropdown.expanded || dropArea.height > 0
}
Rectangle {
anchors.right: parent.right
anchors.bottom: parent.bottom
height: 3
width: 3
color: "#DBDBDB"
visible: dropdown.expanded || dropArea.height > 0
}
Image {
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 10
source: "../images/tableOptions.png"
}
Rectangle {
anchors.centerIn: parent
anchors.horizontalCenterOffset: 1
height: 23
width: 1
color: dropdown.expanded || dropArea.height > 0 ? "#FFFFFF" : "#DBDBDB"
}
Image {
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: 10
source: "../images/dropIndicator.png"
}
}
Timer {
id: timer
interval: 50
repeat: true
running: false
onTriggered: {
if(((appWindow.toolTip.visible && !appWindow.toolTip.containsMouse) || !appWindow.toolTip.visible) && !mouseArea.containsMouse) {
appWindow.toolTip.visible = false
dropdown.expanded = false
currentIndex = -1
timer.stop()
}
}
}
MouseArea {
id: mouseArea
anchors.left: head.left
anchors.right: head.right
anchors.top: head.top
height: head.height + dropArea.height
hoverEnabled: true
onEntered: dropdown.expanded = true
property int currentIndex: -1
onMouseYChanged: {
if(mouseY > head.height) {
var posY = parseInt((mouseY - head.height) / 30)
currentIndex = posY
} else {
currentIndex = -1
}
}
onClicked: {
optionClicked(currentIndex)
}
onExited: timer.start()
preventStealing: true
z: 1
Item {
id: dropArea
anchors.left: parent.left
anchors.right: parent.right
y: head.height
height: dropdown.expanded ? column.height : 0
onHeightChanged: if(height === 0) dropdown.collapsed()
clip: true
Behavior on height {
NumberAnimation { duration: 100; easing.type: Easing.InQuad }
}
Column {
id: column
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
Repeater {
id: repeater
// Workaround for translations in listElements. All translated strings needs to be listed in this file.
property string stringCopy: qsTr("<b>Copy address to clipboard</b>") + translationManager.emptyString
property string stringSend: qsTr("<b>Send to this address</b>") + translationManager.emptyString
property string stringFind: qsTr("<b>Find similar transactions</b>") + translationManager.emptyString
property string stringRemove: qsTr("<b>Remove from address book</b>") + translationManager.emptyString
delegate: Rectangle {
id: delegate
property bool containsMouse: index === mouseArea.currentIndex
anchors.left: parent.left
anchors.right: parent.right
height: 30
color: containsMouse ? "#F0EEEE" : "#DBDBDB"
//radius: index === repeater.count - 1 ? 5 : 0
Rectangle {
anchors.left: parent.left
anchors.top: parent.top
width: 5
height: 5
color: delegate.color
}
Rectangle {
anchors.right: parent.right
anchors.top: parent.top
width: 5
height: 5
color: delegate.color
}
Image {
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 10
source: icon
}
onContainsMouseChanged: {
if(containsMouse) {
var pos = rootItem.mapFromItem(delegate, 30, -25)
appWindow.toolTip.text = qsTr(name) + translationManager.emptyString
appWindow.toolTip.x = pos.x - appWindow.toolTip.width
// if(appWindow.toolTip.height > 30)
// pos.y -= appWindow.toolTip.height - 30
appWindow.toolTip.y = pos.y
appWindow.toolTip.visible = true
appWindow.toolTip.z = 3
}
}
}
}
}
}
}
}

View File

@@ -1,11 +1,11 @@
import QtQuick 2.0
import QtQuick 2.9
import "../components" as MoneroComponents
TextEdit {
color: MoneroComponents.Style.defaultFontColor
font.family: MoneroComponents.Style.fontRegular.name
selectionColor: MoneroComponents.Style.dimmedFontColor
selectionColor: MoneroComponents.Style.textSelectionColor
wrapMode: Text.Wrap
readOnly: true
selectByMouse: true

28
components/TextPlain.qml Normal file
View File

@@ -0,0 +1,28 @@
import QtQuick 2.9
import "." as MoneroComponents
import "effects/" as MoneroEffects
Text {
// When using this component, please note that if you use a color different
// than `defaultFontColor`, you are required to also define `themeTransitionXColor`.
// If you do not set these the component will receive the wrong color after a transition.
// If you do not want to set these, use `themeTransition: false`.
id: root
property bool themeTransition: true
property string themeTransitionBlackColor: ""
property string themeTransitionWhiteColor: ""
font.family: MoneroComponents.Style.fontMedium.name
font.bold: false
font.pixelSize: 14
textFormat: Text.PlainText
MoneroEffects.ColorTransition {
enabled: root.themeTransition
themeTransition: root.themeTransition
targetObj: root
duration: 750
blackColor: root.themeTransitionBlackColor !== "" ? root.themeTransitionBlackColor : MoneroComponents.Style._b_defaultFontColor
whiteColor: root.themeTransitionWhiteColor !== "" ? root.themeTransitionWhiteColor : MoneroComponents.Style._w_defaultFontColor
}
}

View File

@@ -0,0 +1,48 @@
import QtQuick 2.9
import QtQuick.Controls 2.0
import "." as MoneroComponents
TextArea {
id: textArea
property bool themeTransition: true
property string colorWhiteTheme: ""
property string colorBlackTheme: ""
color: MoneroComponents.Style.defaultFontColor
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 14
selectByMouse: false
wrapMode: Text.WordWrap;
textMargin: 0
leftPadding: 0
topPadding: 0
readOnly: true
textFormat: TextEdit.PlainText
states: [
State {
name: "black";
when: textArea.themeTransition && MoneroComponents.Style.blackTheme
PropertyChanges {
target: textArea
color: {
return textArea.colorBlackTheme ? textArea.colorBlackTheme : MoneroComponents.Style._b_defaultFontColor
}
}
}, State {
name: "white";
when: textArea.themeTransition && !MoneroComponents.Style.blackTheme
PropertyChanges {
target: textArea
color: {
return textArea.colorWhiteTheme ? textArea.colorWhiteTheme : MoneroComponents.Style._w_defaultFontColor
}
}
}
]
transitions: Transition {
enabled: appWindow.themeTransition
ColorAnimation { properties: "color"; easing.type: Easing.InOutQuad; duration: 750 }
}
}

View File

@@ -26,9 +26,11 @@
// 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.2
import QtQuick 2.9
import QtQuick.Window 2.1
import "../components" as MoneroComponents
Window {
property alias text: content.text
property alias containsMouse: tipArea.containsMouse
@@ -55,10 +57,10 @@ Window {
anchors.top: parent.bottom
anchors.left: parent.left
anchors.leftMargin: 5
source: "../images/tip.png"
source: "qrc:///images/tip.png"
}
Text {
MoneroComponents.TextPlain {
id: content
anchors.horizontalCenter: parent.horizontalCenter
y: 6

View File

@@ -26,304 +26,337 @@
// 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.5
import QtQuick 2.9
import QtQuick.Window 2.0
import QtQuick.Layouts 1.1
import QtGraphicalEffects 1.0
import QtQuick.Layouts 1.2
import FontAwesome 1.0
import "." as MoneroComponents
import "effects/" as MoneroEffects
Rectangle {
id: titleBar
id: root
property int mouseX: 0
property bool customDecorations: persistentSettings.customDecorations
property bool showMinimizeButton: true
property bool showMaximizeButton: true
property bool showCloseButton: true
property string walletName: ""
height: {
if(!customDecorations || isMobile){
return 0;
}
if(small) return 38 * scaleRatio;
else return 50 * scaleRatio;
if(!persistentSettings.customDecorations) return 0;
return 50;
}
y: -height
z: 1
property string title
property int mouseX: 0
property bool containsMouse: false
property bool basicButtonVisible: false
property bool customDecorations: persistentSettings.customDecorations
property bool showWhatIsButton: true
property bool showMinimizeButton: false
property bool showMaximizeButton: false
property bool showCloseButton: true
property bool showMoneroLogo: false
property bool small: false
property alias titleBarGradientImageOpacity: titleBarGradientImage.opacity
property bool orange: false
property string buttonHoverColor: "#262626"
property string buttonHoverColorOrange: "#44FFFFFF"
z: 1
color: "transparent"
signal closeClicked
signal maximizeClicked
signal minimizeClicked
signal goToBasicVersion(bool yes)
signal languageClicked
signal closeWalletClicked
Item {
// Background gradient
width: parent.width
height: parent.height
z: parent.z + 1
Image {
id: titleBarGradientImage
visible: !titleBar.orange
anchors.fill: parent
height: titleBar.height
width: titleBar.width
source: "../images/titlebarGradient.jpg"
state: "default"
states: [
State {
name: "default";
PropertyChanges { target: btnCloseWallet; visible: true}
PropertyChanges { target: btnLanguageToggle; visible: true}
}, State {
// show only theme switcher and window controls
name: "essentials";
PropertyChanges { target: btnCloseWallet; visible: false}
PropertyChanges { target: btnLanguageToggle; visible: false}
}
]
Rectangle {
visible: titleBar.orange
width: parent.width
height: parent.height
color: "#ff6600"
}
}
Item {
id: titlebarlogo
width: 125
height: parent.height
anchors.centerIn: parent
visible: customDecorations
z: parent.z + 1
Image {
visible: !isMobile && showMoneroLogo && !titleBar.orange
anchors.left: parent.left
anchors.top: parent.top
anchors.topMargin: 11
width: 125
height: 28
source: "../images/titlebarLogo.png"
}
Image {
visible: !isMobile && showMoneroLogo && titleBar.orange
anchors.left: parent.left
anchors.top: parent.top
anchors.topMargin: 11
width: 132
height: 22
source: "../images/moneroLogo_white.png"
}
}
Label {
id: titleLabel
visible: !showMoneroLogo && customDecorations && titleBar.title !== ''
anchors.centerIn: parent
fontSize: 18
text: titleBar.title
z: parent.z + 1
MoneroEffects.GradientBackground {
anchors.fill: parent
duration: 300
fallBackColor: MoneroComponents.Style.middlePanelBackgroundColor
initialStartColor: MoneroComponents.Style.titleBarBackgroundGradientStart
initialStopColor: MoneroComponents.Style.titleBarBackgroundGradientStop
blackColorStart: MoneroComponents.Style._b_titleBarBackgroundGradientStart
blackColorStop: MoneroComponents.Style._b_titleBarBackgroundGradientStop
whiteColorStart: MoneroComponents.Style._w_titleBarBackgroundGradientStart
whiteColorStop: MoneroComponents.Style._w_titleBarBackgroundGradientStop
start: Qt.point(width, 0)
end: Qt.point(0, 0)
}
RowLayout {
anchors.left: parent.left
anchors.top: parent.top
width: 40
height: parent.height
spacing: 0
z: parent.z + 2
spacing: 0
anchors.fill: parent
// collapse sidebar
Rectangle {
id: btnCloseWallet
color: "transparent"
Layout.preferredWidth: parent.height
Layout.preferredHeight: parent.height
Layout.preferredWidth: Layout.preferredHeight
id: goToBasicVersionButton
property bool containsMouse: titleBar.mouseX >= x && titleBar.mouseX <= x + width
property bool checked: false
color: "transparent"
height: titleBar.height
width: height
visible: !titleBar.orange && titleBar.basicButtonVisible
Image {
width: 14
height: 14
anchors.centerIn: parent
source: "../images/expand.png"
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
opacity: 0.75
}
MouseArea {
id: basicMouseArea
hoverEnabled: true
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onEntered: { goToBasicVersionButton.color = titleBar.orange ? titleBar.buttonHoverColorOrange : titleBar.buttonHoverColor }
onExited: goToBasicVersionButton.color = "transparent";
onClicked: {
releaseFocus()
parent.checked = !parent.checked
titleBar.goToBasicVersion(leftPanel.visible)
}
onEntered: parent.color = MoneroComponents.Style.titleBarButtonHoverColor
onExited: parent.color = "transparent"
onClicked: root.closeWalletClicked(leftPanel.visible)
}
}
// language selection
Rectangle {
Layout.preferredHeight: parent.height
Layout.preferredWidth: Layout.preferredHeight
visible: !titleBar.orange && persistentSettings.customDecorations
id: languageSelection
property bool containsMouse: titleBar.mouseX >= x && titleBar.mouseX <= x + width
property bool checked: false
color: "transparent"
height: titleBar.height
width: height
z: parent.z + 2
Image {
width: 14
height: 14
anchors.centerIn: parent
source: "../images/langFlagGrey.png"
}
MouseArea {
hoverEnabled: true
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onEntered: parent.color = "#262626";
onExited: parent.color = "transparent";
onClicked: {
releaseFocus();
appWindow.toggleLanguageView();
}
}
}
}
Row {
id: row
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
visible: parent.customDecorations
z: parent.z + 2
Rectangle {
id: minimizeButton
visible: showMinimizeButton
anchors.top: parent.top
anchors.bottom: parent.bottom
width: 42
id: btnLanguageToggle
color: "transparent"
Layout.preferredWidth: parent.height
Layout.preferredHeight: parent.height
Image {
anchors.centerIn: parent
source: "../images/minimize.png"
Text {
text: FontAwesome.globe
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
}
MouseArea {
id: minimizeArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onEntered: {
if(titleBar.orange){
minimizeButton.color = titleBar.buttonHoverColorOrange;
} else {
minimizeButton.color = titleBar.buttonHoverColor;
}
}
onExited: minimizeButton.color = "transparent";
onClicked: minimizeClicked();
onEntered: parent.color = MoneroComponents.Style.titleBarButtonHoverColor
onExited: parent.color = "transparent"
onClicked: root.languageClicked()
}
}
// switch theme
Rectangle {
id: maximizeButton
visible: showMaximizeButton
anchors.top: parent.top
anchors.bottom: parent.bottom
width: 42
color: "transparent";
color: "transparent"
Layout.preferredWidth: parent.height
Layout.preferredHeight: parent.height
Image {
anchors.centerIn: parent
height: 16
width: 16
source: appWindow.visibility === Window.FullScreen ? "../images/backToWindowIcon.png" :
"../images/fullscreen.png"
Text {
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
opacity: 0.75
}
MouseArea {
id: maximizeArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onEntered: {
if(titleBar.orange){
maximizeButton.color = titleBar.buttonHoverColorOrange;
} else {
maximizeButton.color = titleBar.buttonHoverColor;
}
onEntered: parent.color = MoneroComponents.Style.titleBarButtonHoverColor
onExited: parent.color = "transparent"
onClicked: {
MoneroComponents.Style.blackTheme = !MoneroComponents.Style.blackTheme;
persistentSettings.blackTheme = MoneroComponents.Style.blackTheme;
}
onExited: maximizeButton.color = "transparent";
onClicked: maximizeClicked();
}
}
Rectangle {
id: closeButton
visible: showCloseButton
anchors.top: parent.top
anchors.bottom: parent.bottom
width: 42
color: containsMouse ? "#E04343" : "#00000000"
Item {
// make dummy space when hiding buttons when titlebar
// state is 'essentials' in order for the
// monero logo to still be centered
Layout.preferredWidth: parent.height * 2 // amount of buttons we hide
Layout.preferredHeight: parent.height
visible: root.state == "essentials"
}
// monero logo
Item {
visible: walletName.length === 0
Layout.fillWidth: true
Layout.preferredHeight: parent.height
Image {
anchors.centerIn: parent
width: 16
height: 16
source: "../images/close.png"
id: imgLogo
width: 125
height: 28
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
source: MoneroComponents.Style.titleBarLogoSource
visible: {
if(!isOpenGL) return true;
if(!MoneroComponents.Style.blackTheme) return true;
return false;
}
}
Colorize {
visible: isOpenGL && MoneroComponents.Style.blackTheme
anchors.fill: imgLogo
source: imgLogo
saturation: 0.0
}
}
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"
visible: root.showMinimizeButton
Layout.preferredWidth: parent.height
Layout.preferredHeight: parent.height
MoneroEffects.ImageMask {
anchors.bottom: parent.bottom
anchors.bottomMargin: 18
anchors.horizontalCenter: parent.horizontalCenter
height: 3
width: 15
image: MoneroComponents.Style.titleBarMinimizeSource
color: MoneroComponents.Style.defaultFontColor
fontAwesomeFallbackIcon: FontAwesome.minus
fontAwesomeFallbackSize: 18
fontAwesomeFallbackOpacity: MoneroComponents.Style.blackTheme ? 0.8 : 0.6
opacity: 0.75
}
MouseArea {
anchors.fill: parent
onClicked: closeClicked();
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onEntered: {
if(titleBar.orange){
closeButton.color = titleBar.buttonHoverColorOrange;
} else {
closeButton.color = titleBar.buttonHoverColor;
}
}
onExited: closeButton.color = "transparent";
onEntered: parent.color = MoneroComponents.Style.titleBarButtonHoverColor
onExited: parent.color = "transparent"
onClicked: root.minimizeClicked();
}
}
// maximize
Rectangle {
id: test
visible: root.showMaximizeButton
color: "transparent"
Layout.preferredWidth: parent.height
Layout.preferredHeight: parent.height
Image {
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
source: MoneroComponents.Style.titleBarFullscreenSource
sourceSize.width: 16
sourceSize.height: 16
smooth: true
mipmap: true
opacity: 0.75
rotation: appWindow.visibility === Window.FullScreen ? 180 : 0
}
MouseArea {
id: buttonArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onEntered: parent.color = MoneroComponents.Style.titleBarButtonHoverColor
onExited: parent.color = "transparent"
onClicked: root.maximizeClicked();
}
}
// close
Rectangle {
visible: root.showCloseButton
color: "transparent"
Layout.preferredWidth: parent.height
Layout.preferredHeight: parent.height
MoneroEffects.ImageMask {
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
height: 16
width: 16
image: MoneroComponents.Style.titleBarCloseSource
color: MoneroComponents.Style.defaultFontColor
fontAwesomeFallbackIcon: FontAwesome.timesRectangle
fontAwesomeFallbackSize: 18
fontAwesomeFallbackOpacity: MoneroComponents.Style.blackTheme ? 0.8 : 0.6
opacity: 0.75
}
MouseArea {
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onEntered: parent.color = MoneroComponents.Style.titleBarButtonHoverColor
onExited: parent.color = "transparent"
onClicked: root.closeClicked();
}
}
}
// window borders
Rectangle {
visible: !titleBar.orange
z: parent.z + 3
anchors.bottom: parent.bottom
anchors.right: parent.right
anchors.left: parent.left
height: 1
color: "#2F2F2F"
z: parent.z + 1
anchors.right: parent.right
height: MoneroComponents.Style.blackTheme ? 1 : 1
color: MoneroComponents.Style.titleBarBackgroundBorderColor
MoneroEffects.ColorTransition {
targetObj: parent
blackColor: MoneroComponents.Style._b_titleBarBackgroundBorderColor
whiteColor: MoneroComponents.Style._w_titleBarBackgroundBorderColor
}
}
Rectangle {
visible: titleBar.small && !titleBar.orange
anchors.top: parent.top
anchors.right: parent.right
anchors.left: parent.left
height: 1
color: "#2F2F2F"
z: parent.z + 1
MouseArea {
enabled: persistentSettings.customDecorations
property var previousPosition
anchors.fill: parent
propagateComposedEvents: true
onPressed: previousPosition = globalCursor.getPosition()
onPositionChanged: {
if (pressedButtons == Qt.LeftButton) {
var pos = globalCursor.getPosition()
var dx = pos.x - previousPosition.x
var dy = pos.y - previousPosition.y
appWindow.x += dx
appWindow.y += dy
previousPosition = pos
}
}
}
}

View File

@@ -1,4 +1,4 @@
import QtQuick 2.7
import QtQuick 2.9
import QtQuick.Layouts 1.1
import QtQuick.Controls 2.0
@@ -8,12 +8,12 @@ Rectangle {
id: root
property alias text: content.text
property alias textColor: content.color
property int fontSize: 15 * scaleRatio
property int fontSize: 15
Layout.fillWidth: true
Layout.preferredHeight: warningLayout.height
color: "#09FFFFFF"
color: MoneroComponents.Style.titleBarButtonHoverColor
radius: 4
border.color: MoneroComponents.Style.inputBorderColorInActive
border.width: 1
@@ -28,35 +28,35 @@ Rectangle {
Image {
Layout.alignment: Qt.AlignVCenter
Layout.preferredHeight: 33 * scaleRatio
Layout.preferredWidth: 33 * scaleRatio
Layout.rightMargin: 12 * scaleRatio
Layout.leftMargin: 18 * scaleRatio
Layout.topMargin: 12 * scaleRatio
Layout.bottomMargin: 12 * scaleRatio
source: "../images/warning.png"
Layout.preferredHeight: 33
Layout.preferredWidth: 33
Layout.rightMargin: 12
Layout.leftMargin: 18
Layout.topMargin: 12
Layout.bottomMargin: 12
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 * scaleRatio
rightPadding: 18 * scaleRatio
topPadding: 10 * scaleRatio
bottomPadding: 10 * scaleRatio
readOnly: true
leftPadding: 4
rightPadding: 18
topPadding: 10
bottomPadding: 10
onLinkActivated: root.linkActivated();
selectionColor: MoneroComponents.Style.dimmedFontColor
selectedTextColor: MoneroComponents.Style.defaultFontColor
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.NoButton
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
}
}
}
}

View File

@@ -0,0 +1,58 @@
// 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.
import QtQuick 2.9
import QtGraphicalEffects 1.0
import "../" as MoneroComponents
Item {
id: root
property var targetObj
property string blackColor: ""
property string whiteColor: ""
property int duration: 300
property bool themeTransition: true
states: [
State {
name: "black";
when: MoneroComponents.Style.blackTheme && root.themeTransition
PropertyChanges { target: root.targetObj; color: root.blackColor}
}, State {
name: "white";
when: !MoneroComponents.Style.blackTheme && root.themeTransition
PropertyChanges { target: root.targetObj; color: root.whiteColor}
}
]
transitions: Transition {
enabled: appWindow.themeTransition
ColorAnimation { properties: "color"; easing.type: Easing.InOutQuad; duration: root.duration }
}
}

View File

@@ -0,0 +1,107 @@
// 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.
import QtQuick 2.9
import QtGraphicalEffects 1.0
import "../" as MoneroComponents
Item {
id: root
property string fallBackColor: ""
property string blackColorStart: ""
property string blackColorStop: ""
property string whiteColorStart: ""
property string whiteColorStop: ""
property string initialStartColor: ""
property string initialStopColor: ""
property double posStart: 0.1
property double posStop: 1.0
property int duration: 300
property variant start
property variant end
anchors.fill: parent
// background software renderer
Rectangle {
visible: !isOpenGL
anchors.fill: parent
color: root.fallBackColor
}
// background opengl
LinearGradient {
visible: isOpenGL
anchors.fill: parent
start: root.start
end: root.end
gradient: Gradient {
GradientStop {
id: gradientStart
position: root.posStart
color: root.initialStartColor
}
GradientStop {
id: gradientStop
position: root.posStop
color: root.initialStopColor
}
}
states: [
State {
name: "black";
when: isOpenGL && MoneroComponents.Style.blackTheme
PropertyChanges {
target: gradientStart
color: root.blackColorStart
}
PropertyChanges {
target: gradientStop
color: root.blackColorStop
}
}, State {
name: "white";
when: isOpenGL && !MoneroComponents.Style.blackTheme
PropertyChanges {
target: gradientStart
color: root.whiteColorStart
}
PropertyChanges {
target: gradientStop
color: root.whiteColorStop
}
}
]
transitions: Transition {
enabled: appWindow.themeTransition
ColorAnimation { properties: "color"; easing.type: Easing.InOutQuad; duration: root.duration }
}
}
}

View File

@@ -0,0 +1,86 @@
// 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.
import QtQuick 2.9
import QtGraphicalEffects 1.0
import "../" as MoneroComponents
import FontAwesome 1.0
Item {
// Use this component to color+opacity change images with transparency (svg/png)
// Does not work in low graphics mode, use fontAwesome fallback option.
id: root
property string image: ""
property string color: ""
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
property alias fontAwesomeFallback: fontAwesomeFallback
property alias svgMask: svgMask
property alias imgMockColor: imgMockColor
width: 0
height: 0
Image {
id: svgMask
source: root.image
sourceSize.width: root.width
sourceSize.height: root.height
smooth: true
mipmap: true
visible: false
}
ColorOverlay {
id: imgMockColor
anchors.fill: root
source: svgMask
color: root.color
visible: image && isOpenGL
}
Text {
id: fontAwesomeFallback
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
opacity: root.fontAwesomeFallbackOpacity
}
}

0
empty
View File

1
fonts/CMakeLists.txt Normal file
View File

@@ -0,0 +1 @@
qt5_add_resources(RESOURCE_FILES *.otf)

View File

@@ -1,13 +1,26 @@
pragma Singleton
import QtQuick 2.0
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"
@@ -594,6 +607,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"

View File

@@ -1,4 +1,4 @@
import QtQuick 2.0
import QtQuick 2.9
QtObject {
id: object

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
fonts/RobotoMono-Bold.ttf Executable file

Binary file not shown.

BIN
fonts/RobotoMono-Light.ttf Executable file

Binary file not shown.

BIN
fonts/RobotoMono-Medium.ttf Executable file

Binary file not shown.

BIN
fonts/RobotoMono-Regular.ttf Executable file

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More