Merge bitcoin-core/gui#439: Do not show unused widgets at startup

489060dcaf qt: Do not show unused widgets at startup (Hennadii Stepanov)

Pull request description:

  On master (8d83f9c1d1), when starting without wallets the `labelWalletEncryptionIcon` and
  `labelWalletHDStatusIcon` widgets are not used but still visible as empty space:

  ![Screenshot from 2021-09-29 21-59-22](https://user-images.githubusercontent.com/32963518/135332107-f02db936-3c3a-436b-9e78-c5721df8852b.png)

  If one opens any wallet then closes it, the widget layout becomes densed:

  ![Screenshot from 2021-09-29 22-05-31](https://user-images.githubusercontent.com/32963518/135332650-83787bc4-fa8e-417e-8d53-a9fdb1c8bfc9.png)

  This PR makes widget layout densed at startup.

  Fixes #428.

ACKs for top commit:
  jarolrod:
    ACK 489060dcaf
  promag:
    Code review ACK 489060dcaf.

Tree-SHA512: bda7195225ecd203bb3269ebe7fc264aaf7f57b922deb83a04127584a5d6123950741fb431161523e84630927c2f617e85c085bbbe75ad8559da7b2947de1bdd
This commit is contained in:
Hennadii Stepanov 2021-09-30 11:13:45 +03:00
commit f52929063f
No known key found for this signature in database
GPG Key ID: 410108112E7EA81F

View File

@ -171,7 +171,9 @@ BitcoinGUI::BitcoinGUI(interfaces::Node& node, const PlatformStyle *_platformSty
frameBlocksLayout->addWidget(unitDisplayControl);
frameBlocksLayout->addStretch();
frameBlocksLayout->addWidget(labelWalletEncryptionIcon);
labelWalletEncryptionIcon->hide();
frameBlocksLayout->addWidget(labelWalletHDStatusIcon);
labelWalletHDStatusIcon->hide();
}
frameBlocksLayout->addWidget(labelProxyIcon);
frameBlocksLayout->addStretch();