From 8ee563139db52f8ede02a85c61c7152e8b68ff1e Mon Sep 17 00:00:00 2001 From: Sandro Giessl Date: Tue, 22 Mar 2005 00:15:29 +0000 Subject: [PATCH] um... fix titleRect() svn path=/trunk/kdebase/kwin/; revision=399602 --- lib/kcommondecoration.cpp | 4 ++-- lib/kcommondecoration.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/kcommondecoration.cpp b/lib/kcommondecoration.cpp index 6625407ee3..dca6eaaa04 100644 --- a/lib/kcommondecoration.cpp +++ b/lib/kcommondecoration.cpp @@ -796,7 +796,7 @@ bool KCommonDecoration::isToolWindow() const return ((type==NET::Toolbar)||(type==NET::Utility)||(type==NET::Menu)); } -QRect KCommonDecoration::titleRect() +QRect KCommonDecoration::titleRect() const { int r_x, r_y, r_x2, r_y2; widget()->rect().coords(&r_x, &r_y, &r_x2, &r_y2); @@ -809,7 +809,7 @@ QRect KCommonDecoration::titleRect() const int ttlHeight = layoutMetric(LM_TitleHeight); const int titleEdgeBottomBottom = r_y+titleEdgeTop+ttlHeight+titleEdgeBottom-1; return QRect(r_x+titleEdgeLeft+buttonsLeftWidth()+titleBorderLeft, r_y+titleEdgeTop, - r_x2-titleEdgeRight-buttonsRightWidth()-(r_x+titleEdgeLeft+buttonsLeftWidth()+titleBorderLeft), + r_x2-titleEdgeRight-buttonsRightWidth()-titleBorderRight-(r_x+titleEdgeLeft+buttonsLeftWidth()+titleBorderLeft), titleEdgeBottomBottom-(r_y+titleEdgeTop) ); } diff --git a/lib/kcommondecoration.h b/lib/kcommondecoration.h index 47bfd3a215..67ace366c9 100644 --- a/lib/kcommondecoration.h +++ b/lib/kcommondecoration.h @@ -216,7 +216,7 @@ class KWIN_EXPORT KCommonDecoration : public KDecoration * Convenience method. * @returns the title rect. */ - QRect titleRect(); + QRect titleRect() const; public: /**