qt: Combo boxes are no longer cramped

This commit is contained in:
Cacodemon345
2022-02-10 01:37:41 +06:00
parent 30af69bfe9
commit 9a75453216

View File

@@ -16,6 +16,9 @@
*/
#include "qt_styleoverride.hpp"
#include <QComboBox>
#include <QAbstractItemView>
int StyleOverride::styleHint(
StyleHint hint,
const QStyleOption *option,
@@ -44,4 +47,9 @@ void StyleOverride::polish(QWidget* widget)
}
widget->setWindowFlag(Qt::WindowContextHelpButtonHint, false);
}
if (qobject_cast<QComboBox*>(widget)) {
widget->setMinimumWidth(widget->minimumSizeHint().width());
qobject_cast<QComboBox*>(widget)->view()->setMinimumWidth(widget->minimumSizeHint().width());
}
}