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
This commit is contained in:
Martin Gräßlin 2012-09-25 22:26:35 +02:00
parent 16ea7617f3
commit 049582536a
3 changed files with 12 additions and 4 deletions

View file

@ -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();

View file

@ -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 {

View file

@ -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
}