Merge #15167: qt: Fix wallet selector size adjustment

ca91661adf Fix wallet selector size adjustment (Hennadii Stepanov)

Pull request description:

  This PR sets `QComboBox::AdjustToContents` instead of default `QComboBox::AdjustToContentsOnFirstShow` for wallet selectors.

  Before (in master):
  ![screenshot from 2019-01-14 20-47-22](https://user-images.githubusercontent.com/32963518/51133771-83d00d80-183e-11e9-812c-3a1119fa766e.png)

  After (with this PR):
  ![screenshot from 2019-01-14 20-48-43](https://user-images.githubusercontent.com/32963518/51133788-90546600-183e-11e9-8394-eb62a998b90f.png)

Tree-SHA512: c23ac91905bb31aaa32f2fccc02b01f5707d8b094020fe6a75a9e099e78f9191670474920234a01c46480f67d3d311f44ff46f1f4202cd50a4a6d4d09a8342ce
This commit is contained in:
Wladimir J. van der Laan 2019-01-21 17:39:30 +01:00
commit 0f1576ab32
No known key found for this signature in database
GPG key ID: 1E4AED62986CD25D
2 changed files with 4 additions and 0 deletions

View file

@ -484,6 +484,7 @@ void BitcoinGUI::createToolBars()
toolbar->addWidget(spacer);
m_wallet_selector = new QComboBox();
m_wallet_selector->setSizeAdjustPolicy(QComboBox::AdjustToContents);
connect(m_wallet_selector, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &BitcoinGUI::setCurrentWalletBySelectorIndex);
m_wallet_selector_label = new QLabel();

View file

@ -453,6 +453,9 @@
</item>
<item>
<widget class="QComboBox" name="WalletSelector">
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToContents</enum>
</property>
<item>
<property name="text">
<string>(none)</string>