summaryrefslogtreecommitdiffstats
path: root/kwin/clients
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-30 03:22:42 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-30 03:22:42 +0000
commit4f396b03eb06f2f441615ab6c56f2c3ae43e8590 (patch)
tree0dfadbcbcf92b82708c4f7a565147b9b6803ab45 /kwin/clients
parentba1d97533cad981404f93568f0815b7a3dec2e70 (diff)
downloadtdebase-4f396b03eb06f2f441615ab6c56f2c3ae43e8590.tar.gz
tdebase-4f396b03eb06f2f441615ab6c56f2c3ae43e8590.zip
Fix the "redmond" kwin client
It is highly recommended that "window resize and move when maximized" be disabled when this client is in use git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1243970 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kwin/clients')
-rw-r--r--kwin/clients/redmond/redmond.cpp20
1 files changed, 15 insertions, 5 deletions
diff --git a/kwin/clients/redmond/redmond.cpp b/kwin/clients/redmond/redmond.cpp
index b6161d9ce..fab104d8b 100644
--- a/kwin/clients/redmond/redmond.cpp
+++ b/kwin/clients/redmond/redmond.cpp
@@ -395,7 +395,7 @@ int RedmondDeco::layoutMetric(LayoutMetric lm, bool respectWindowState, const KC
return border ? borderWidth+2 : 2;
case LM_TitleEdgeTop:
- return border ? borderWidth+2 : 2;
+ return border ? borderWidth+1 : 2;
case LM_TitleEdgeBottom:
return border ? 1 : 0;
@@ -422,6 +422,12 @@ int RedmondDeco::layoutMetric(LayoutMetric lm, bool respectWindowState, const KC
case LM_ExplicitButtonSpacer:
return 2;
+ case LM_ButtonMarginTop:
+ return 0;
+
+ case LM_RightButtonsMarginTop:
+ return 1;
+
default:
return KCommonDecoration::layoutMetric(lm, respectWindowState, btn);
}
@@ -560,8 +566,12 @@ void RedmondDeco::paintEvent( TQPaintEvent* )
p2.setFont( fnt );
p2.setPen( options()->color(KDecoration::ColorFont, isActive() ));
- p2.drawText( r.x(), fontoffset, r.width()-3, r.height()-1,
- AlignLeft | AlignVCenter, caption() );
+ if (border)
+ p2.drawText( r.x()-3, fontoffset, r.width(), r.height()+1,
+ AlignLeft | AlignVCenter, caption() );
+ else
+ p2.drawText( r.x()+1, fontoffset, r.width()-4, r.height()+1,
+ AlignLeft | AlignVCenter, caption() );
p2.end();
p.drawPixmap( modBorderWidth, modBorderWidth, *titleBuffer );
@@ -576,7 +586,7 @@ void RedmondDeco::paintEvent( TQPaintEvent* )
// Draw the title text.
p.setFont( fnt );
p.setPen(options()->color(KDecoration::ColorFont, isActive() ));
- p.drawText(r.x()+4, r.y()+fontoffset-2, r.width()-3, r.height()-1,
+ p.drawText(r.x()+4, r.y()+fontoffset-2, r.width()-3, r.height()+1,
AlignLeft | AlignVCenter, caption() );
}
@@ -616,7 +626,7 @@ void RedmondDecoFactory::readConfig() {
case BorderTiny:
case BorderNormal:
default:
- borderWidth = 4;
+ borderWidth = 3;
if (normalTitleHeight < 16) normalTitleHeight = 16;
if (toolTitleHeight < 16) toolTitleHeight = 16;
}