From c1fc36839246a846f408bcc5d8faf6c8b600178c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Tue, 29 Apr 2003 11:40:39 +0000 Subject: [PATCH] Fix #57690 - don't let the dragable area of titlebar vanish completely. svn path=/trunk/kdebase/kwin/; revision=222730 --- clients/b2/b2client.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/clients/b2/b2client.cpp b/clients/b2/b2client.cpp index 9286fecf06..a697bed1b1 100644 --- a/clients/b2/b2client.cpp +++ b/clients/b2/b2client.cpp @@ -919,7 +919,10 @@ static void redraw_pixmaps() void B2Client::positionButtons() { QFontMetrics fm(options->font(isActive())); - int textLen = fm.width(caption()); + QString cap = caption(); + if( cap.length() < 5 ) // make sure the titlebar has sufficiently wide + cap = "XXXXX"; // area for dragging the window + int textLen = fm.width( cap ); QRect t = titlebar->captionSpacer->geometry(); int titleWidth = titlebar->width() - t.width() + textLen+2;