From c22047e146178eea70fd6bc0c7d11c06937782ed Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Thu, 21 Jan 2021 18:51:10 +0100 Subject: [PATCH 1/2] partial Merge bitcoin-core/gui#171: Use layout manager for Create Wallet dialog d4feb6812a2707ef85d75dda4372086ec62eb922 qt: Use layout manager for Create Wallet dialog (Hennadii Stepanov) Pull request description: On master (e75f91eae3936269b40b4bfdfe540d5526270936) not using layout manager causes problems with resizing: ![Screenshot from 2021-01-01 13-03-13](https://user-images.githubusercontent.com/32963518/103437728-ce1d4580-4c33-11eb-8915-1e9482775653.png) ![Screenshot from 2021-01-01 13-03-26](https://user-images.githubusercontent.com/32963518/103437730-d6758080-4c33-11eb-9e0f-87d0dd487fcb.png) Also text labels are not resized properly on some window managers (https://github.com/bitcoin/bitcoin/issues/20777), or if their lengths are changed (after translation). This PR introduces a standard layout manager for the "Create Wallet" dialog that fixes all layout issues (actually, the `createwalletdialog.ui` has been re-written from scratch): ![Screenshot from 2021-01-01 13-10-03](https://user-images.githubusercontent.com/32963518/103437822-d0cc6a80-4c34-11eb-84fd-fcb10a16d9ef.png) ![Screenshot from 2021-01-06 23-50-36](https://user-images.githubusercontent.com/32963518/103823090-0b416780-507a-11eb-89dd-3f48a358e168.png) Additional visual changes: - advanced options are grouped in `QGroupBox` (https://github.com/bitcoin-core/gui/pull/96#issuecomment-726337165) - enabled the [size grip](https://doc.qt.io/qt-5/qsizegrip.html#details) Fix https://github.com/bitcoin/bitcoin/issues/20777 ACKs for top commit: jarolrod: ACK d4feb6812a2707ef85d75dda4372086ec62eb922 Sjors: re-tACK d4feb6812a2707ef85d75dda4372086ec62eb922 promag: Tested ACK d4feb6812a2707ef85d75dda4372086ec62eb922 on macos. Tree-SHA512: 4c055962e49f88624900b880b33a866976d224628784593428b712d2e94563d77ddefddea3397134d20e72f738a8cf9aa885c1272fd9ffc90213c104435fb9f4 --- src/qt/forms/createwalletdialog.ui | 210 ++++++++++++++++------------- 1 file changed, 115 insertions(+), 95 deletions(-) diff --git a/src/qt/forms/createwalletdialog.ui b/src/qt/forms/createwalletdialog.ui index 1de5f937a9..0dc4a767e8 100644 --- a/src/qt/forms/createwalletdialog.ui +++ b/src/qt/forms/createwalletdialog.ui @@ -6,106 +6,126 @@ 0 0 - 364 - 195 + 407 + 348 Create Wallet - - - - 10 - 140 - 341 - 40 - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - 120 - 20 - 231 - 24 - - - - - - - 20 - 20 - 101 - 21 - - - - Wallet Name - - - - - - 20 - 60 - 171 - 22 - - - - Encrypt the wallet. The wallet will be encrypted with a passphrase of your choice. - - - Encrypt Wallet - - - true - - - - - false - - - - 20 - 90 - 171 - 22 - - - - Disable private keys for this wallet. Wallets with private keys disabled will have no private keys and cannot have an HD seed or imported private keys. This is ideal for watch-only wallets. - - - Disable Private Keys - - - - - - 20 - 120 - 171 - 22 - - - - Make a blank wallet. Blank wallets do not initially have private keys or scripts. Private keys and addresses can be imported, or an HD seed can be set, at a later time. - - - Make Blank Wallet - - + + true + + + + + + + + Wallet Name + + + + + + + + 262 + 0 + + + + Wallet + + + + + + + + + Encrypt the wallet. The wallet will be encrypted with a passphrase of your choice. + + + Encrypt Wallet + + + false + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 8 + + + + + + + + Advanced Options + + + + + + true + + + Disable private keys for this wallet. Wallets with private keys disabled will have no private keys and cannot have an HD seed or imported private keys. This is ideal for watch-only wallets. + + + Disable Private Keys + + + + + + + Make a blank wallet. Blank wallets do not initially have private keys or scripts. Private keys and addresses can be imported, or an HD seed can be set, at a later time. + + + Make Blank Wallet + + + + + + + + + + Qt::Vertical + + + + 20 + 0 + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + wallet_name_line_edit From f0f6423eb4215d377f781b2bc91e3ca92ad2954e Mon Sep 17 00:00:00 2001 From: Konstantin Akimov Date: Mon, 13 Mar 2023 23:32:09 +0700 Subject: [PATCH 2/2] decreased height of dialog due to missing checkbox (not backported yet) --- src/qt/forms/createwalletdialog.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qt/forms/createwalletdialog.ui b/src/qt/forms/createwalletdialog.ui index 0dc4a767e8..7002d1f6f0 100644 --- a/src/qt/forms/createwalletdialog.ui +++ b/src/qt/forms/createwalletdialog.ui @@ -7,7 +7,7 @@ 0 0 407 - 348 + 0