Skip to content

Commit

Permalink
Merge bitcoin#15167: qt: Fix wallet selector size adjustment
Browse files Browse the repository at this point in the history
ca91661 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
  • Loading branch information
laanwj authored and Munkybooty committed Aug 24, 2021
1 parent 53a6f62 commit 34c20dc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/qt/bitcoingui.cpp
Expand Up @@ -614,6 +614,7 @@ void BitcoinGUI::createToolBars()

#ifdef ENABLE_WALLET
m_wallet_selector = new QComboBox(this);
m_wallet_selector->setSizeAdjustPolicy(QComboBox::AdjustToContents);
connect(m_wallet_selector, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &BitcoinGUI::setCurrentWalletBySelectorIndex);

QVBoxLayout* walletSelectorLayout = new QVBoxLayout(this);
Expand Down
3 changes: 3 additions & 0 deletions src/qt/forms/debugwindow.ui
Expand Up @@ -604,6 +604,9 @@
</item>
<item>
<widget class="QComboBox" name="WalletSelector">
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToContents</enum>
</property>
<item>
<property name="text">
<string>(none)</string>
Expand Down

0 comments on commit 34c20dc

Please sign in to comment.