diff --git a/src/plugins/decorations/bradient/main.cpp b/src/plugins/decorations/bradient/main.cpp
index 8669405b..7e3b9ebd 100644
--- a/src/plugins/decorations/bradient/main.cpp
+++ b/src/plugins/decorations/bradient/main.cpp
@@ -21,8 +21,10 @@ QT_BEGIN_NAMESPACE
 namespace QtWaylandClient {
 
 #define BUTTON_SPACING 5
-#define BUTTON_WIDTH 18
-#define BUTTONS_RIGHT_MARGIN 8
+#define BUTTON_WIDTH 56
+#define BUTTON_HEIGHT 34
+#define ICON_LEFT_MARGIN  (isMaximized() ? 2 : 10)
+#define BUTTONS_RIGHT_MARGIN (isMaximized() ? 0 : 8)
 
 enum Button
 {
@@ -52,11 +54,23 @@ private:
     QRectF maximizeButtonRect() const;
     QRectF minimizeButtonRect() const;
 
+    bool isMaximized() const { return window()->windowStates() & Qt::WindowMaximized; }
+
+    void updateMouseOverButton(Button btn);
+
     QColor m_foregroundColor;
     QColor m_foregroundInactiveColor;
     QColor m_backgroundColor;
+    QColor m_backgroundInactiveColor;
+    QColor m_borderColor;
+    QColor m_borderInactiveColor;
+    QColor m_buttonsBackgroundColor;
+    QColor m_closeButtonBackgroundColor;
+
     QStaticText m_windowTitle;
     Button m_clicking = None;
+    Button m_hover = None;
+    bool m_windowTitleLeftAligned = false;
 };
 
 
@@ -64,9 +78,17 @@ private:
 QWaylandBradientDecoration::QWaylandBradientDecoration()
 {
     QPalette palette;
-    m_foregroundColor = palette.color(QPalette::Active, QPalette::WindowText);
-    m_backgroundColor = palette.color(QPalette::Active, QPalette::Window);
-    m_foregroundInactiveColor = palette.color(QPalette::Disabled, QPalette::WindowText);
+
+    m_foregroundColor = QColor::fromString(qEnvironmentVariable("QT_WAYLAND_DECORATION_FG_COLOR", palette.color(QPalette::Active, QPalette::WindowText).name()));
+    m_foregroundInactiveColor = QColor::fromString(qEnvironmentVariable("QT_WAYLAND_DECORATION_FG_INACTIVE_COLOR", palette.color(QPalette::Disabled, QPalette::WindowText).name()));
+    m_backgroundColor = QColor::fromString(qEnvironmentVariable("QT_WAYLAND_DECORATION_BG_COLOR", palette.color(QPalette::Active, QPalette::Window).name()));
+    m_backgroundInactiveColor = QColor::fromString(qEnvironmentVariable("QT_WAYLAND_DECORATION_BG_INACTIVE_COLOR", palette.color(QPalette::Disabled, QPalette::Window).name()));
+    m_borderColor = QColor::fromString(qEnvironmentVariable("QT_WAYLAND_DECORATION_BORDER_COLOR", palette.color(QPalette::Active, QPalette::WindowText).name()));
+    m_borderInactiveColor = QColor::fromString(qEnvironmentVariable("QT_WAYLAND_DECORATION_BORDER_INACTIVE_COLOR", palette.color(QPalette::Disabled, QPalette::WindowText).name()));
+    m_buttonsBackgroundColor = QColor::fromString(qEnvironmentVariable("QT_WAYLAND_BUTTONS_HOVER_BG_COLOR", palette.color(QPalette::Active, QPalette::Window).name()));
+    m_closeButtonBackgroundColor = QColor::fromString(qEnvironmentVariable("QT_WAYLAND_CLOSE_BUTTON_HOVER_BG_COLOR", palette.color(QPalette::Active, QPalette::Window).name()));
+
+    m_windowTitleLeftAligned = qEnvironmentVariableIsSet("QT_WAYLAND_DECORATION_LEFT_WINDOW_TEXT");
 
     QTextOption option(Qt::AlignHCenter | Qt::AlignVCenter);
     option.setWrapMode(QTextOption::NoWrap);
@@ -76,22 +98,19 @@ QWaylandBradientDecoration::QWaylandBradientDecoration()
 QRectF QWaylandBradientDecoration::closeButtonRect() const
 {
     const int windowRight = waylandWindow()->windowContentGeometry().right() + 1;
-    return QRectF(windowRight - BUTTON_WIDTH - BUTTON_SPACING * 0 - BUTTONS_RIGHT_MARGIN,
-                  (margins().top() - BUTTON_WIDTH) / 2, BUTTON_WIDTH, BUTTON_WIDTH);
+    return QRectF(windowRight - BUTTON_WIDTH, 0, BUTTON_WIDTH, margins().top());
 }
 
 QRectF QWaylandBradientDecoration::maximizeButtonRect() const
 {
     const int windowRight = waylandWindow()->windowContentGeometry().right() + 1;
-    return QRectF(windowRight - BUTTON_WIDTH * 2 - BUTTON_SPACING * 1 - BUTTONS_RIGHT_MARGIN,
-                  (margins().top() - BUTTON_WIDTH) / 2, BUTTON_WIDTH, BUTTON_WIDTH);
+    return QRectF(windowRight - BUTTON_WIDTH * 2, 0, BUTTON_WIDTH, margins().top());
 }
 
 QRectF QWaylandBradientDecoration::minimizeButtonRect() const
 {
     const int windowRight = waylandWindow()->windowContentGeometry().right() + 1;
-    return QRectF(windowRight - BUTTON_WIDTH * 3 - BUTTON_SPACING * 2 - BUTTONS_RIGHT_MARGIN,
-                  (margins().top() - BUTTON_WIDTH) / 2, BUTTON_WIDTH, BUTTON_WIDTH);
+    return QRectF(windowRight - BUTTON_WIDTH * 3, 0, BUTTON_WIDTH, margins().top());
 }
 
 QMargins QWaylandBradientDecoration::margins(MarginsType marginsType) const
@@ -99,9 +118,96 @@ QMargins QWaylandBradientDecoration::margins(MarginsType marginsType) const
     if (marginsType == ShadowsOnly)
         return QMargins();
 
-    return QMargins(3, 30, 3, 3);
+    int top = 40;
+    if ((window()->windowStates() & Qt::WindowMaximized))
+        top = 30;
+    return QMargins(1, top, 1, 1);
+}
+
+void addTopRoundedRect(QPainterPath &path, const QRectF &rect, qreal xRadius, qreal yRadius)
+{
+    QRectF r = rect.normalized();
+
+    if (r.isNull())
+        return;
+
+    qreal w2 = r.width() / 2;
+    qreal h2 = r.height() / 2;
+
+    if (w2 == 0) {
+        xRadius = 0;
+    } else {
+        xRadius = 100 * qMin(xRadius, w2) / w2;
+    }
+    if (h2 == 0) {
+        yRadius = 0;
+    } else {
+        yRadius = 100 * qMin(yRadius, h2) / h2;
+    }
+
+    if (xRadius <= 0 || yRadius <= 0) {             // add normal rectangle
+        path.addRect(r);
+        return;
+    }
+
+    qreal x = r.x();
+    qreal y = r.y();
+    qreal w = r.width();
+    qreal h = r.height();
+    qreal rxx2 = w*xRadius/100;
+    qreal ryy2 = h*yRadius/100;
+
+    path.arcMoveTo(x, y, rxx2, ryy2, 180);
+    path.arcTo(x, y, rxx2, ryy2, 180, -90);
+    path.arcTo(x+w-rxx2, y, rxx2, ryy2, 90, -90);
+    path.lineTo(x+w, y+h);
+    path.lineTo(x, y+h);
+    path.closeSubpath();
+}
+
+void addTopRightRoundedRect(QPainterPath &path, const QRectF &rect, qreal xRadius, qreal yRadius)
+{
+    QRectF r = rect.normalized();
+
+    if (r.isNull())
+        return;
+
+    qreal w2 = r.width() / 2;
+    qreal h2 = r.height() / 2;
+
+    if (w2 == 0) {
+        xRadius = 0;
+    } else {
+        xRadius = 100 * qMin(xRadius, w2) / w2;
+    }
+    if (h2 == 0) {
+        yRadius = 0;
+    } else {
+        yRadius = 100 * qMin(yRadius, h2) / h2;
+    }
+
+    if (xRadius <= 0 || yRadius <= 0) {             // add normal rectangle
+        path.addRect(r);
+        return;
+    }
+
+    qreal x = r.x();
+    qreal y = r.y();
+    qreal w = r.width();
+    qreal h = r.height();
+    qreal rxx2 = w*xRadius/100;
+    qreal ryy2 = h*yRadius/100;
+
+    path.moveTo(x+w-rxx2, y);
+    path.arcTo(x+w-rxx2, y, rxx2, ryy2, 90, -90);
+    path.lineTo(x+w, y+h);
+    path.lineTo(x, y+h);
+    path.lineTo(x, y);
+    path.lineTo(x+w-rxx2, y);
+    path.closeSubpath();
 }
 
+
 void QWaylandBradientDecoration::paint(QPaintDevice *device)
 {
     bool active = window()->handle()->isActive();
@@ -121,20 +227,23 @@ void QWaylandBradientDecoration::paint(QPaintDevice *device)
 
     // Title bar
     QPainterPath roundedRect;
-    roundedRect.addRoundedRect(wg, 3, 3);
-    for (int i = 0; i < 4; ++i) {
-        p.save();
-        p.setClipRect(clips[i]);
-        p.fillPath(roundedRect, m_backgroundColor);
-        p.restore();
-    }
+    int radius = 10;
+    if (isMaximized())
+        radius = 0;
+    addTopRoundedRect(roundedRect, wg, radius, radius);
+
+    // top region with rounded rect and title bar
+    p.save();
+    p.setClipRect(clips[0]);
+    p.fillPath(roundedRect, active ? m_backgroundColor : m_backgroundInactiveColor);
+    p.restore();
 
     // Window icon
     QIcon icon = waylandWindow()->windowIcon();
     if (!icon.isNull()) {
         QRectF iconRect(0, 0, 22, 22);
-        iconRect.adjust(margins().left() + BUTTON_SPACING, 4,
-                        margins().left() + BUTTON_SPACING, 4),
+        iconRect.adjust(margins().left() + ICON_LEFT_MARGIN, (margins().top() - iconRect.height()) / 2,
+                        margins().left() + ICON_LEFT_MARGIN, (margins().top() - iconRect.height()) / 2),
         icon.paint(&p, iconRect.toRect());
     }
 
@@ -147,7 +256,7 @@ void QWaylandBradientDecoration::paint(QPaintDevice *device)
         }
 
         QRect titleBar = top;
-        titleBar.setLeft(margins().left() + BUTTON_SPACING +
+        titleBar.setLeft(margins().left() + ICON_LEFT_MARGIN +
             (icon.isNull() ? 0 : 22 + BUTTON_SPACING));
         titleBar.setRight(minimizeButtonRect().left() - BUTTON_SPACING);
 
@@ -156,9 +265,11 @@ void QWaylandBradientDecoration::paint(QPaintDevice *device)
         p.setPen(active ? m_foregroundColor : m_foregroundInactiveColor);
         QSizeF size = m_windowTitle.size();
         int dx = (top.width() - size.width()) /2;
+        if (m_windowTitleLeftAligned)
+            dx = titleBar.left();
         int dy = (top.height()- size.height()) /2;
         QFont font = p.font();
-        font.setPixelSize(14);
+        font.setPixelSize(16);
         p.setFont(font);
         QPoint windowTitlePoint(top.topLeft().x() + dx,
                  top.topLeft().y() + dy);
@@ -175,7 +286,12 @@ void QWaylandBradientDecoration::paint(QPaintDevice *device)
     // Close button
     p.save();
     rect = closeButtonRect();
-    qreal crossSize = rect.height() / 2.3;
+
+    QPainterPath closeRoundedRect;
+    addTopRightRoundedRect(closeRoundedRect, rect, radius, radius);
+    p.fillPath(closeRoundedRect, (active ? (m_hover == Button::Close ? m_closeButtonBackgroundColor : m_backgroundColor)
+                                         : m_backgroundInactiveColor));
+    qreal crossSize = 12;
     QPointF crossCenter(rect.center());
     QRectF crossRect(crossCenter.x() - crossSize / 2, crossCenter.y() - crossSize / 2, crossSize, crossSize);
     pen.setWidth(2);
@@ -187,13 +303,18 @@ void QWaylandBradientDecoration::paint(QPaintDevice *device)
     // Maximize button
     p.save();
     p.setRenderHint(QPainter::Antialiasing, false);
-    rect = maximizeButtonRect().adjusted(4, 5, -4, -5);
-    if ((window()->windowStates() & Qt::WindowMaximized)) {
+    rect = maximizeButtonRect();
+    p.fillRect(rect, (active ? (m_hover == Button::Maximize ? m_buttonsBackgroundColor : m_backgroundColor)
+                             : m_backgroundInactiveColor));
+    rect.adjust((maximizeButtonRect().width() - 12) / 2,  (maximizeButtonRect().height() - 12) / 2,
+               -(maximizeButtonRect().width() - 12) / 2, -(maximizeButtonRect().height() - 12) / 2);
+
+    if (isMaximized()) {
         qreal inset = 2;
         QRectF rect1 = rect.adjusted(inset, 0, 0, -inset);
         QRectF rect2 = rect.adjusted(0, inset, -inset, 0);
         p.drawRect(rect1);
-        p.setBrush(m_backgroundColor); // need to cover up some lines from the other rect
+        p.setBrush(active ? m_backgroundColor : m_backgroundInactiveColor); // need to cover up some lines from the other rect
         p.drawRect(rect2);
     } else {
         p.drawRect(rect);
@@ -204,11 +325,34 @@ void QWaylandBradientDecoration::paint(QPaintDevice *device)
     // Minimize button
     p.save();
     p.setRenderHint(QPainter::Antialiasing, false);
-    rect = minimizeButtonRect().adjusted(5, 5, -5, -5);
+    rect = minimizeButtonRect();
+    p.fillRect(rect, (active ? (m_hover == Button::Minimize ? m_buttonsBackgroundColor : m_backgroundColor)
+                             : m_backgroundInactiveColor));
+    rect.adjust((minimizeButtonRect().width() - 12) / 2,  minimizeButtonRect().height() / 2,
+               -(minimizeButtonRect().width() - 12) / 2, -minimizeButtonRect().height() / 2);
     pen.setWidth(2);
     p.setPen(pen);
     p.drawLine(rect.bottomLeft(), rect.bottomRight());
     p.restore();
+
+    // Outline border
+    QPen outlinePen(active ? m_borderColor : m_borderInactiveColor);
+    for (int i = 0; i < 4; ++i) {
+        p.save();
+        p.setClipRect(clips[i]);
+
+        if (i == 0) {
+            // top region with rounded rect and title bar
+            outlinePen.setWidth(0);
+        } else {
+            outlinePen.setWidth(2);
+        }
+
+        p.setPen(outlinePen);
+        p.drawPath(roundedRect);
+
+        p.restore();
+    }
 }
 
 bool QWaylandBradientDecoration::clickButton(Qt::MouseButtons b, Button btn)
@@ -261,21 +405,33 @@ bool QWaylandBradientDecoration::handleTouch(QWaylandInputDevice *inputDevice, c
     Q_UNUSED(mods);
     bool handled = state == QEventPoint::Pressed;
     if (handled) {
-        if (closeButtonRect().contains(local))
+        if (closeButtonRect().contains(local)) {
             QWindowSystemInterface::handleCloseEvent(window());
-        else if (maximizeButtonRect().contains(local))
+        } else if (maximizeButtonRect().contains(local)) {
             window()->setWindowStates(window()->windowStates() ^ Qt::WindowMaximized);
-        else if (minimizeButtonRect().contains(local))
+            updateMouseOverButton(Button::None);
+        } else if (minimizeButtonRect().contains(local)) {
             window()->setWindowState(Qt::WindowMinimized);
-        else if (local.y() <= margins().top())
+            updateMouseOverButton(Button::None);
+        } else if (local.y() <= margins().top()) {
             waylandWindow()->shellSurface()->move(inputDevice);
-        else
+        } else {
             handled = false;
+        }
     }
 
     return handled;
 }
 
+void QWaylandBradientDecoration::updateMouseOverButton(Button btn)
+{
+    if (m_hover != btn) {
+        m_hover = btn;
+        update();
+        window()->requestUpdate();
+    }
+}
+
 void QWaylandBradientDecoration::processMouseTop(QWaylandInputDevice *inputDevice, const QPointF &local, Qt::MouseButtons b, Qt::KeyboardModifiers mods)
 {
     QRect wg = waylandWindow()->windowContentGeometry();
@@ -307,15 +463,23 @@ void QWaylandBradientDecoration::processMouseTop(QWaylandInputDevice *inputDevic
     } else if (isRightClicked(b)) {
         showWindowMenu(inputDevice);
     } else if (closeButtonRect().contains(local)) {
+        updateMouseOverButton(Button::Close);
         if (clickButton(b, Close))
             QWindowSystemInterface::handleCloseEvent(window());
     } else if (maximizeButtonRect().contains(local)) {
-        if (clickButton(b, Maximize))
+        updateMouseOverButton(Button::Maximize);
+        if (clickButton(b, Maximize)) {
             window()->setWindowStates(window()->windowStates() ^ Qt::WindowMaximized);
+            updateMouseOverButton(Button::None);
+        }
     } else if (minimizeButtonRect().contains(local)) {
-        if (clickButton(b, Minimize))
+        updateMouseOverButton(Button::Minimize);
+        if (clickButton(b, Minimize)) {
             window()->setWindowState(Qt::WindowMinimized);
+            updateMouseOverButton(Button::None);
+        }
     } else {
+        updateMouseOverButton(Button::None);
 #if QT_CONFIG(cursor)
         waylandWindow()->restoreMouseCursor(inputDevice);
 #endif
