From 2f885abc5f0cb8c495cf24e60d8dc9e3b3fd5011 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Mon, 21 Jan 2019 17:39:30 +0100 Subject: [PATCH] Merge #15167: qt: Fix wallet selector size adjustment ca91661adf9fa22bf1c919d118de27bfac04e94c 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 --- src/qt/bitcoingui.cpp | 1 + src/qt/forms/debugwindow.ui | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 64a37cf699eb2..7baea4994d9fa 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -709,6 +709,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(&QComboBox::currentIndexChanged), this, &BitcoinGUI::setCurrentWalletBySelectorIndex); QVBoxLayout* walletSelectorLayout = new QVBoxLayout(this); diff --git a/src/qt/forms/debugwindow.ui b/src/qt/forms/debugwindow.ui index 825271e378f84..adc057e2a0e68 100644 --- a/src/qt/forms/debugwindow.ui +++ b/src/qt/forms/debugwindow.ui @@ -575,6 +575,9 @@ + + QComboBox::AdjustToContents + (none)