mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-19 00:42:14 -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)
|
||||
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:
|
||||
void closeEvent(QCloseEvent *event) override;
|
||||
void initStyleOption(QStyleOption *option) const override;
|
||||
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue