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();
|
||||
}
|
||||
|
||||
int BasicWindowHelper::manualRoundingRadius() const {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void BasicWindowHelper::setBodyTitleArea(
|
||||
Fn<WindowTitleHitTestFlags(QPoint)> testMethod) {
|
||||
Expects(!_bodyTitleAreaTestMethod || testMethod);
|
||||
|
|
@ -524,6 +528,10 @@ void DefaultWindowHelper::setGeometry(QRect rect) {
|
|||
window()->setGeometry(rect.marginsAdded(bodyPadding()));
|
||||
}
|
||||
|
||||
int DefaultWindowHelper::manualRoundingRadius() const {
|
||||
return _roundingOverlay ? Radius() : 0;
|
||||
}
|
||||
|
||||
void DefaultWindowHelper::paintBorders(QPainter &p) {
|
||||
const auto titleBackground = window()->isActiveWindow()
|
||||
? _title->st()->bgActive
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ public:
|
|||
virtual void showNormal();
|
||||
virtual void close();
|
||||
|
||||
virtual int manualRoundingRadius() const;
|
||||
void setBodyTitleArea(Fn<WindowTitleHitTestFlags(QPoint)> testMethod);
|
||||
|
||||
protected:
|
||||
|
|
@ -91,6 +92,7 @@ public:
|
|||
void setMinimumSize(QSize size) override;
|
||||
void setFixedSize(QSize size) override;
|
||||
void setGeometry(QRect rect) override;
|
||||
int manualRoundingRadius() const override;
|
||||
|
||||
protected:
|
||||
bool eventFilter(QObject *obj, QEvent *e) override;
|
||||
|
|
|
|||
|
|
@ -99,4 +99,8 @@ void RpWindow::setBodyTitleArea(
|
|||
_helper->setBodyTitleArea(std::move(testMethod));
|
||||
}
|
||||
|
||||
int RpWindow::manualRoundingRadius() const {
|
||||
return _helper->manualRoundingRadius();
|
||||
}
|
||||
|
||||
} // namespace Ui
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ public:
|
|||
void showFullScreen();
|
||||
void showNormal();
|
||||
void close();
|
||||
[[nodiscard]] int manualRoundingRadius() const;
|
||||
void setBodyTitleArea(Fn<WindowTitleHitTestFlags(QPoint)> testMethod);
|
||||
|
||||
private:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue