Allow querying manual rounding radius of RpWindow.
This commit is contained in:
parent
eb4d44ecd3
commit
3b69ec499c
4 changed files with 15 additions and 0 deletions
|
|
@ -188,6 +188,10 @@ void BasicWindowHelper::close() {
|
||||||
_window->close();
|
_window->close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int BasicWindowHelper::manualRoundingRadius() const {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
void BasicWindowHelper::setBodyTitleArea(
|
void BasicWindowHelper::setBodyTitleArea(
|
||||||
Fn<WindowTitleHitTestFlags(QPoint)> testMethod) {
|
Fn<WindowTitleHitTestFlags(QPoint)> testMethod) {
|
||||||
Expects(!_bodyTitleAreaTestMethod || testMethod);
|
Expects(!_bodyTitleAreaTestMethod || testMethod);
|
||||||
|
|
@ -524,6 +528,10 @@ void DefaultWindowHelper::setGeometry(QRect rect) {
|
||||||
window()->setGeometry(rect.marginsAdded(bodyPadding()));
|
window()->setGeometry(rect.marginsAdded(bodyPadding()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int DefaultWindowHelper::manualRoundingRadius() const {
|
||||||
|
return _roundingOverlay ? Radius() : 0;
|
||||||
|
}
|
||||||
|
|
||||||
void DefaultWindowHelper::paintBorders(QPainter &p) {
|
void DefaultWindowHelper::paintBorders(QPainter &p) {
|
||||||
const auto titleBackground = window()->isActiveWindow()
|
const auto titleBackground = window()->isActiveWindow()
|
||||||
? _title->st()->bgActive
|
? _title->st()->bgActive
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,7 @@ public:
|
||||||
virtual void showNormal();
|
virtual void showNormal();
|
||||||
virtual void close();
|
virtual void close();
|
||||||
|
|
||||||
|
virtual int manualRoundingRadius() const;
|
||||||
void setBodyTitleArea(Fn<WindowTitleHitTestFlags(QPoint)> testMethod);
|
void setBodyTitleArea(Fn<WindowTitleHitTestFlags(QPoint)> testMethod);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
@ -91,6 +92,7 @@ public:
|
||||||
void setMinimumSize(QSize size) override;
|
void setMinimumSize(QSize size) override;
|
||||||
void setFixedSize(QSize size) override;
|
void setFixedSize(QSize size) override;
|
||||||
void setGeometry(QRect rect) override;
|
void setGeometry(QRect rect) override;
|
||||||
|
int manualRoundingRadius() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool eventFilter(QObject *obj, QEvent *e) override;
|
bool eventFilter(QObject *obj, QEvent *e) override;
|
||||||
|
|
|
||||||
|
|
@ -99,4 +99,8 @@ void RpWindow::setBodyTitleArea(
|
||||||
_helper->setBodyTitleArea(std::move(testMethod));
|
_helper->setBodyTitleArea(std::move(testMethod));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int RpWindow::manualRoundingRadius() const {
|
||||||
|
return _helper->manualRoundingRadius();
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Ui
|
} // namespace Ui
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,7 @@ public:
|
||||||
void showFullScreen();
|
void showFullScreen();
|
||||||
void showNormal();
|
void showNormal();
|
||||||
void close();
|
void close();
|
||||||
|
[[nodiscard]] int manualRoundingRadius() const;
|
||||||
void setBodyTitleArea(Fn<WindowTitleHitTestFlags(QPoint)> testMethod);
|
void setBodyTitleArea(Fn<WindowTitleHitTestFlags(QPoint)> testMethod);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue