mirror of
https://github.com/tnodir/fort
synced 2024-11-15 06:46:41 +00:00
UI: Statistics: Expand traf units combobox
This commit is contained in:
parent
e66c2fe870
commit
9369484f00
@ -41,6 +41,7 @@ QSpinBox *ControlUtil::createSpinBox()
|
||||
QComboBox *ControlUtil::createComboBox(const QStringList &texts)
|
||||
{
|
||||
auto c = new ComboBox();
|
||||
c->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding);
|
||||
c->addItems(texts);
|
||||
return c;
|
||||
}
|
||||
|
@ -133,20 +133,15 @@ void TrafficPage::setupUi()
|
||||
|
||||
QLayout *TrafficPage::setupHeader()
|
||||
{
|
||||
auto layout = new QHBoxLayout();
|
||||
|
||||
m_btRefresh = ControlUtil::createFlatToolButton(
|
||||
":/icons/arrow_refresh_small.png", [&] { trafListModel()->reset(); });
|
||||
|
||||
setupClearMenu();
|
||||
setupTrafUnits();
|
||||
|
||||
layout->addWidget(m_btRefresh);
|
||||
layout->addWidget(m_btClear);
|
||||
layout->addWidget(ControlUtil::createVSeparator());
|
||||
layout->addWidget(m_traphUnits);
|
||||
layout->addWidget(m_comboTrafUnit);
|
||||
layout->addStretch();
|
||||
auto layout = ControlUtil::createHLayoutByWidgets({ m_btRefresh, m_btClear,
|
||||
ControlUtil::createVSeparator(), m_traphUnits, m_comboTrafUnit,
|
||||
/*stretch*/ nullptr });
|
||||
|
||||
return layout;
|
||||
}
|
||||
@ -196,6 +191,7 @@ void TrafficPage::setupTrafUnits()
|
||||
|
||||
confManager()->saveIniUser();
|
||||
});
|
||||
m_comboTrafUnit->setMinimumWidth(100);
|
||||
}
|
||||
|
||||
void TrafficPage::setupAppListView()
|
||||
|
Loading…
Reference in New Issue
Block a user