diff --git a/src/frontend/tab-pages/tabpage.cpp b/src/frontend/tab-pages/tabpage.cpp index d9fadc56..5cf5fe55 100644 --- a/src/frontend/tab-pages/tabpage.cpp +++ b/src/frontend/tab-pages/tabpage.cpp @@ -71,7 +71,9 @@ void TabPage::initUI() m_deviceLabel = new QLabel(m_deviceFrame); m_deviceLabel->setText(tr("Current Device")); m_deviceComboBox = new QComboBox(m_deviceFrame); - m_deviceComboBox->setFixedWidth(DEVICE_COMBOBOX_WIDTH); + m_deviceComboBox->setMinimumWidth(DEVICE_COMBOBOX_WIDTH); + m_deviceComboBox->setMaximumWidth(DEVICE_COMBOBOX_WIDTH_MAX); + m_deviceComboBox->setSizeAdjustPolicy(QComboBox::SizeAdjustPolicy::AdjustToContents); m_tipsLabel = new QLabel(m_deviceFrame); m_tipsLabel->setText(tr("Devices Closed!")); diff --git a/src/frontend/tab-pages/tabpage.h b/src/frontend/tab-pages/tabpage.h index 2a549a28..e3e24f77 100644 --- a/src/frontend/tab-pages/tabpage.h +++ b/src/frontend/tab-pages/tabpage.h @@ -50,6 +50,7 @@ using namespace kdk; #define TITLE_LAYOUT_MARGINS 24,0,24,0 #define DEVICE_LAYOUT_MARGINS 24,0,24,8 #define DEVICE_COMBOBOX_WIDTH 180 +#define DEVICE_COMBOBOX_WIDTH_MAX 230 #define ACTIVE_NET_LAYOUT_MARGINS 8,8,8,8 #define NET_LAYOUT_MARGINS 8,8,0,1 #define NET_LAYOUT_SPACING 8