Update buttonArea after resize
This commit is contained in:
@@ -368,3 +368,7 @@ void ButtonHandler::updateScreenRegions(const QVector<QRect> &rects) {
|
||||
m_screenRegions += rect;
|
||||
}
|
||||
}
|
||||
|
||||
void ButtonHandler::updateScreenRegions(const QRect &rect) {
|
||||
m_screenRegions = QRegion(rect);
|
||||
}
|
||||
|
||||
@@ -38,12 +38,13 @@ public:
|
||||
bool buttonsAreInside() const;
|
||||
size_t size() const;
|
||||
|
||||
void updatePosition(const QRect &selection);
|
||||
void setButtons(const QVector<CaptureButton*>);
|
||||
bool contains(const QPoint &p) const;
|
||||
void updateScreenRegions(const QVector<QRect> &rects);
|
||||
void updateScreenRegions(const QRect &rect);
|
||||
|
||||
public slots:
|
||||
void updatePosition(const QRect &selection);
|
||||
void hide();
|
||||
void show();
|
||||
|
||||
|
||||
@@ -475,6 +475,9 @@ void CaptureWidget::resizeEvent(QResizeEvent *e) {
|
||||
QWidget::resizeEvent(e);
|
||||
m_context.widgetDimensions = rect();
|
||||
m_context.widgetOffset = mapToGlobal(QPoint(0,0));
|
||||
if (!m_context.fullscreen) {
|
||||
m_buttonHandler->updateScreenRegions(rect());
|
||||
}
|
||||
}
|
||||
|
||||
void CaptureWidget::moveEvent(QMoveEvent *e) {
|
||||
|
||||
Reference in New Issue
Block a user