added double click to resize handle

This commit is contained in:
fourtf 2018-07-04 19:52:11 +02:00
parent 14f125ff87
commit 3303de18cd
2 changed files with 13 additions and 0 deletions

View file

@ -1148,4 +1148,16 @@ void SplitContainer::ResizeHandle::mouseMoveEvent(QMouseEvent *event)
} }
} }
void SplitContainer::ResizeHandle::mouseDoubleClickEvent(QMouseEvent *event)
{
event->accept();
for (auto &sibling : this->node->getParent()->getChildren()) {
sibling->flexH = 1;
sibling->flexV = 1;
}
this->parent->layout();
}
} // namespace chatterino } // namespace chatterino

View file

@ -156,6 +156,7 @@ private:
void mousePressEvent(QMouseEvent *event) override; void mousePressEvent(QMouseEvent *event) override;
void mouseReleaseEvent(QMouseEvent *event) override; void mouseReleaseEvent(QMouseEvent *event) override;
void mouseMoveEvent(QMouseEvent *event) override; void mouseMoveEvent(QMouseEvent *event) override;
void mouseDoubleClickEvent(QMouseEvent *event) override;
friend class SplitContainer; friend class SplitContainer;