|
|
a290ac |
diff --git a/src/decoration/qgnomeplatformdecoration.cpp b/src/decoration/qgnomeplatformdecoration.cpp
|
|
|
a290ac |
index 1129b4f..be4ac21 100644
|
|
|
a290ac |
--- a/src/decoration/qgnomeplatformdecoration.cpp
|
|
|
a290ac |
+++ b/src/decoration/qgnomeplatformdecoration.cpp
|
|
|
a290ac |
@@ -178,7 +178,7 @@ QMargins QGnomePlatformDecoration::margins(MarginsType marginsType) const
|
|
|
a290ac |
#else
|
|
|
a290ac |
QMargins QGnomePlatformDecoration::margins() const
|
|
|
a290ac |
{
|
|
|
a290ac |
- if ((window()->windowStates() & Qt::WindowMaximized)) {
|
|
|
a290ac |
+ if ((waylandWindow()->windowStates() & Qt::WindowMaximized)) {
|
|
|
a290ac |
return QMargins(0, TITLEBAR_HEIGHT, 0, 0);
|
|
|
a290ac |
}
|
|
|
a290ac |
|
|
|
a290ac |
@@ -371,7 +371,7 @@ void QGnomePlatformDecoration::paint(QPaintDevice *device)
|
|
|
a290ac |
// * *
|
|
|
a290ac |
// ********************************
|
|
|
a290ac |
QPainterPath borderRect;
|
|
|
a290ac |
- if (!(window()->windowStates() & Qt::WindowMaximized)) {
|
|
|
a290ac |
+ if (!(waylandWindow()->windowStates() & Qt::WindowMaximized)) {
|
|
|
a290ac |
borderRect.addRoundedRect(0, 0, surfaceRect.width(), margins().top() + 8, 10, 10);
|
|
|
a290ac |
p.fillPath(borderRect.simplified(), borderColor);
|
|
|
a290ac |
}
|
|
|
a290ac |
@@ -389,7 +389,7 @@ void QGnomePlatformDecoration::paint(QPaintDevice *device)
|
|
|
a290ac |
// * *
|
|
|
a290ac |
// ********************************
|
|
|
a290ac |
QPainterPath roundedRect;
|
|
|
a290ac |
- if ((window()->windowStates() & Qt::WindowMaximized)) {
|
|
|
a290ac |
+ if ((waylandWindow()->windowStates() & Qt::WindowMaximized)) {
|
|
|
a290ac |
roundedRect.addRect(0, 0, surfaceRect.width(), margins().top() + 8);
|
|
|
a290ac |
} else {
|
|
|
a290ac |
roundedRect.addRoundedRect(WINDOW_BORDER_WIDTH, WINDOW_BORDER_WIDTH, surfaceRect.width() - margins().left() - margins().right(), margins().top() + 8, 8, 8);
|
|
|
a290ac |
@@ -412,7 +412,7 @@ void QGnomePlatformDecoration::paint(QPaintDevice *device)
|
|
|
a290ac |
// *| |*
|
|
|
a290ac |
// *------------------------------*
|
|
|
a290ac |
// ********************************
|
|
|
a290ac |
- if (!(window()->windowStates() & Qt::WindowMaximized)) {
|
|
|
a290ac |
+ if (!(waylandWindow()->windowStates() & Qt::WindowMaximized)) {
|
|
|
a290ac |
QPainterPath borderPath;
|
|
|
a290ac |
// Left
|
|
|
a290ac |
borderPath.addRect(0, margins().top(), margins().left(), surfaceRect.height() - margins().top() - WINDOW_BORDER_WIDTH);
|
|
|
a290ac |
@@ -522,7 +522,7 @@ void QGnomePlatformDecoration::paint(QPaintDevice *device)
|
|
|
a290ac |
Adwaita::Renderer::renderFlatRoundedButtonFrame(styleOptions);
|
|
|
a290ac |
}
|
|
|
a290ac |
decorationButtonStyle.setRect(QRect(static_cast<int>(rect.x()) + (BUTTON_WIDTH / 4), static_cast<int>(rect.y()) + (BUTTON_WIDTH / 4), BUTTON_WIDTH / 2, BUTTON_WIDTH / 2));
|
|
|
a290ac |
- const Adwaita::ButtonType buttonType = (window()->windowStates() & Qt::WindowMaximized) ? Adwaita::ButtonType::ButtonRestore : Adwaita::ButtonType::ButtonMaximize;
|
|
|
a290ac |
+ const Adwaita::ButtonType buttonType = (waylandWindow()->windowStates() & Qt::WindowMaximized) ? Adwaita::ButtonType::ButtonRestore : Adwaita::ButtonType::ButtonMaximize;
|
|
|
a290ac |
Adwaita::Renderer::renderDecorationButton(decorationButtonStyle, buttonType);
|
|
|
a290ac |
}
|
|
|
a290ac |
|