mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-19 17:02:15 -07:00
implement feature
This commit is contained in:
parent
90564acaee
commit
9f95c731d1
2 changed files with 14 additions and 0 deletions
|
|
@ -333,3 +333,16 @@ void ZoneViewWidget::initStyleOption(QStyleOption *option) const
|
||||||
if (titleBar)
|
if (titleBar)
|
||||||
titleBar->icon = QPixmap("theme:cockatrice");
|
titleBar->icon = QPixmap("theme:cockatrice");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ZoneViewWidget::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
|
||||||
|
{
|
||||||
|
if (event->pos().y() <= 0) {
|
||||||
|
// expand window to full height and width if not currently at full height and width
|
||||||
|
// otherwise shrink window to initial max height
|
||||||
|
if (size().height() < maximumHeight() || size().width() < maximumWidth()) {
|
||||||
|
resize(maximumSize());
|
||||||
|
} else {
|
||||||
|
resizeToZoneContents();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -89,6 +89,7 @@ public:
|
||||||
protected:
|
protected:
|
||||||
void closeEvent(QCloseEvent *event) override;
|
void closeEvent(QCloseEvent *event) override;
|
||||||
void initStyleOption(QStyleOption *option) const override;
|
void initStyleOption(QStyleOption *option) const override;
|
||||||
|
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue