Skip to content
Snippets Groups Projects
Commit fd1e76c0 authored by Martin Flöser's avatar Martin Flöser
Browse files

Fix enabled borders and padding for maximized Aurorae decos

In the maximized state the enabled borders were still enabled causing
the actual borders to be still shown. In addition the padding is not
adjusted to be 0. This is done in the C++ part is it does not make any
sense to have shadows being thrown to another screen for a maximized
window.

REVIEW: 106576
BUG: 307365
FIXED-IN: 4.9.2
parent 4807dd73
No related branches found
No related tags found
No related merge requests found
......@@ -313,6 +313,10 @@ void AuroraeClient::padding(int &left, int &right, int &top, int &bottom) const
left = right = top = bottom = 0;
return;
}
if (maximizeMode() == MaximizeFull && !options()->moveResizeMaximizedWindows()) {
left = right = top = bottom = 0;
return;
}
left = m_item->property("paddingLeft").toInt();
right = m_item->property("paddingRight").toInt();
top = m_item->property("paddingTop").toInt();
......
......@@ -50,7 +50,7 @@ Item {
}
anchors {
top: parent.top
topMargin: (decoration.maximized ? auroraeTheme.titleEdgeTopMaximized : auroraeTheme.titleEdgeTop) + root.paddingTop + auroraeTheme.buttonMarginTop
topMargin: (decoration.maximized ? auroraeTheme.titleEdgeTopMaximized : auroraeTheme.titleEdgeTop + root.paddingTop) + auroraeTheme.buttonMarginTop
}
Behavior on anchors.topMargin {
NumberAnimation {
......
......@@ -47,6 +47,7 @@ Decoration {
imagePath: backgroundSvg.imagePath
prefix: "decoration"
opacity: shown ? 1 : 0
enabledBorders: decoration.maximized ? PlasmaCore.FrameSvg.NoBorder : PlasmaCore.FrameSvg.TopBorder | PlasmaCore.FrameSvg.BottomBorder | PlasmaCore.FrameSvg.LeftBorder | PlasmaCore.FrameSvg.RightBorder
Behavior on opacity {
NumberAnimation {
duration: auroraeTheme.animationTime
......@@ -59,6 +60,7 @@ Decoration {
imagePath: backgroundSvg.imagePath
prefix: "decoration-inactive"
opacity: (!decoration.active && backgroundSvg.supportsInactive) ? 1 : 0
enabledBorders: decoration.maximized ? PlasmaCore.FrameSvg.NoBorder : PlasmaCore.FrameSvg.TopBorder | PlasmaCore.FrameSvg.BottomBorder | PlasmaCore.FrameSvg.LeftBorder | PlasmaCore.FrameSvg.RightBorder
Behavior on opacity {
NumberAnimation {
duration: auroraeTheme.animationTime
......@@ -80,6 +82,7 @@ Decoration {
prefix: "decoration-maximized"
height: parent.borderTopMaximized
opacity: shown ? 1 : 0
enabledBorders: PlasmaCore.FrameSvg.NoBorder
Behavior on opacity {
NumberAnimation {
duration: auroraeTheme.animationTime
......@@ -100,6 +103,7 @@ Decoration {
prefix: "decoration-maximized-inactive"
height: parent.borderTopMaximized
opacity: (!decoration.active && decoration.maximized && backgroundSvg.supportsMaximizedInactive) ? 1 : 0
enabledBorders: PlasmaCore.FrameSvg.NoBorder
Behavior on opacity {
NumberAnimation {
duration: auroraeTheme.animationTime
......@@ -112,7 +116,7 @@ Decoration {
width: childrenRect.width
anchors {
left: parent.left
leftMargin: (decoration.maximized ? auroraeTheme.titleEdgeLeftMaximized : auroraeTheme.titleEdgeLeft) + root.paddingLeft
leftMargin: decoration.maximized ? auroraeTheme.titleEdgeLeftMaximized : (auroraeTheme.titleEdgeLeft + root.paddingLeft)
}
Behavior on anchors.leftMargin {
NumberAnimation {
......@@ -126,7 +130,7 @@ Decoration {
width: childrenRect.width
anchors {
right: parent.right
rightMargin: (decoration.maximized ? auroraeTheme.titleEdgeRightMaximized : auroraeTheme.titleEdgeRight) + root.paddingRight
rightMargin: decoration.maximized ? auroraeTheme.titleEdgeRightMaximized : (auroraeTheme.titleEdgeRight + root.paddingRight)
}
Behavior on anchors.rightMargin {
NumberAnimation {
......@@ -148,7 +152,7 @@ Decoration {
left: leftButtonGroup.right
right: rightButtonGroup.left
top: root.top
topMargin: (decoration.maximized ? auroraeTheme.titleEdgeTopMaximized : auroraeTheme.titleEdgeTop) + root.paddingTop
topMargin: decoration.maximized ? auroraeTheme.titleEdgeTopMaximized : (auroraeTheme.titleEdgeTop + root.paddingTop)
leftMargin: auroraeTheme.titleBorderLeft
rightMargin: auroraeTheme.titleBorderRight
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment