Commit e2db3ecf authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

bezier curve widget: adjust height to monitor resolution

parent a82db684
......@@ -20,6 +20,7 @@
#include <QKeyEvent>
#include <QMouseEvent>
#include <QResizeEvent>
#include <QFontInfo>
template <typename Curve_t>
AbstractCurveWidget<Curve_t>::AbstractCurveWidget(QWidget *parent)
......@@ -30,7 +31,7 @@ AbstractCurveWidget<Curve_t>::AbstractCurveWidget(QWidget *parent)
setMouseTracking(true);
setAutoFillBackground(false);
setAttribute(Qt::WA_OpaquePaintEvent);
setMinimumSize(150, 150);
setMinimumSize(150, QFontInfo(font()).pixelSize() * 12);
QSizePolicy sp(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding);
sp.setHeightForWidth(true); // force widget to have a height dependent on width;
setSizePolicy(sp);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment