Take composeOverBorder into accoun

This commit is contained in:
Aleix Pol 2014-07-15 19:56:04 +02:00
parent cf0f8d0c91
commit 0a94e1b1b8
2 changed files with 2 additions and 2 deletions

View File

@ -345,6 +345,7 @@ QSGNode *FrameSvgItem::updatePaintNode(QSGNode *oldNode, QQuickItem::UpdatePaint
if (!oldNode) { if (!oldNode) {
oldNode = new QSGNode; oldNode = new QSGNode;
new FrameItemNode(this, FrameSvg::NoBorder, oldNode); //needs to be de first, in case of composeOverBorder
new FrameItemNode(this, FrameSvg::TopBorder | FrameSvg::LeftBorder, oldNode); new FrameItemNode(this, FrameSvg::TopBorder | FrameSvg::LeftBorder, oldNode);
new FrameItemNode(this, FrameSvg::TopBorder | FrameSvg::RightBorder, oldNode); new FrameItemNode(this, FrameSvg::TopBorder | FrameSvg::RightBorder, oldNode);
new FrameItemNode(this, FrameSvg::TopBorder, oldNode); new FrameItemNode(this, FrameSvg::TopBorder, oldNode);
@ -353,7 +354,6 @@ QSGNode *FrameSvgItem::updatePaintNode(QSGNode *oldNode, QQuickItem::UpdatePaint
new FrameItemNode(this, FrameSvg::BottomBorder | FrameSvg::RightBorder, oldNode); new FrameItemNode(this, FrameSvg::BottomBorder | FrameSvg::RightBorder, oldNode);
new FrameItemNode(this, FrameSvg::LeftBorder, oldNode); new FrameItemNode(this, FrameSvg::LeftBorder, oldNode);
new FrameItemNode(this, FrameSvg::RightBorder, oldNode); new FrameItemNode(this, FrameSvg::RightBorder, oldNode);
new FrameItemNode(this, FrameSvg::NoBorder, oldNode);
m_sizeChanged = true; m_sizeChanged = true;
m_textureChanged = false; m_textureChanged = false;

View File

@ -835,7 +835,7 @@ QRect FrameSvgPrivate::sectionRect(FrameData* frame, Plasma::FrameSvg::EnabledBo
{ {
switch(borders) { switch(borders) {
case FrameSvg::NoBorder: case FrameSvg::NoBorder:
return contentRect; return frame->composeOverBorder ? QRect(0,0, contentRect.width()+frame->leftWidth+frame->rightWidth, contentRect.height()+frame->topHeight+frame->bottomHeight) : contentRect;
case FrameSvg::TopBorder: case FrameSvg::TopBorder:
return QRect(QPoint(contentRect.left(), 0), QSize(contentRect.width()-1, frame->topHeight)); return QRect(QPoint(contentRect.left(), 0), QSize(contentRect.width()-1, frame->topHeight));
case FrameSvg::BottomBorder: case FrameSvg::BottomBorder: