Skip to content

Commit 0f1576a

Browse files
committed
Merge #15167: qt: Fix wallet selector size adjustment
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
2 parents 72506ed + ca91661 commit 0f1576a

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/qt/bitcoingui.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,7 @@ void BitcoinGUI::createToolBars()
484484
toolbar->addWidget(spacer);
485485

486486
m_wallet_selector = new QComboBox();
487+
m_wallet_selector->setSizeAdjustPolicy(QComboBox::AdjustToContents);
487488
connect(m_wallet_selector, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &BitcoinGUI::setCurrentWalletBySelectorIndex);
488489

489490
m_wallet_selector_label = new QLabel();

src/qt/forms/debugwindow.ui

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,9 @@
453453
</item>
454454
<item>
455455
<widget class="QComboBox" name="WalletSelector">
456+
<property name="sizeAdjustPolicy">
457+
<enum>QComboBox::AdjustToContents</enum>
458+
</property>
456459
<item>
457460
<property name="text">
458461
<string>(none)</string>

0 commit comments

Comments
 (0)