Commit 8b418f1a authored by Karl Ove Hufthammer's avatar Karl Ove Hufthammer

Add size hints to tablet tester widget (for better dialogue size)

The tablet tester dialogue’s ‘preferred’ size is being overridden
by KoDialog, resulting in a very small dialogue box, with a tiny
painting area for testing the tablet. Now we add a sizeHint for this
area, so that the dialogue automatically gets a reasonable size.

The width and height values for the sizeHint was chosen so that
they correspond to the size the widget would have had if KoDialog
didn’t override the preferred window size.
parent c2608efd
......@@ -27,6 +27,11 @@ TabletTester::TabletTester(QWidget *parent)
{
}
QSize TabletTester::sizeHint() const
{
return QSize(356, 373);
}
void TabletTester::clear()
{
m_mousePath.clear();
......
......@@ -40,6 +40,8 @@ protected:
void mouseReleaseEvent(QMouseEvent *e) override;
void tabletEvent(QTabletEvent *e) override;
QSize sizeHint() const override;
private:
QPolygon m_mousePath;
QPolygon m_tabletPath;
......
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