Fix view size when using Fusion

This commit is contained in:
Craig Drummond
2017-06-21 22:33:04 +01:00
committed by Craig Drummond
parent c1a54e04a9
commit f343caf892
2 changed files with 14 additions and 10 deletions

View File

@@ -23,17 +23,22 @@
#include "sizewidget.h"
#include "toolbutton.h"
#include "icons.h"
#include "support/combobox.h"
#include <QHBoxLayout>
SizeWidget::SizeWidget(QWidget *parent)
: ComboBox(parent)
: QWidget(parent)
{
// #ifdef Q_OS_MAC
// // For some reason, using 0 pixles on Mac causes genre combo to overlap
// setFixedWidth(12);
// #else
setFixedWidth(0);
// #endif
QHBoxLayout *lay=new QHBoxLayout(this);
ComboBox *combo=new ComboBox(this);
ToolButton *btn=new ToolButton(this);
lay->setMargin(0);
lay->setSpacing(0);
combo->setFixedWidth(0);
btn->setFixedWidth(0);
lay->addWidget(combo);
lay->addWidget(btn);
}
void SizeWidget::paintEvent(QPaintEvent *e)

View File

@@ -25,9 +25,8 @@
#define SIZEWIDGET_H
#include <QWidget>
#include "support/combobox.h"
class SizeWidget : public ComboBox
class SizeWidget : public QWidget
{
public:
explicit SizeWidget(QWidget *parent = 0);