Fix #57690 - don't let the dragable area of titlebar vanish completely.

svn path=/trunk/kdebase/kwin/; revision=222730
This commit is contained in:
Luboš Luňák 2003-04-29 11:40:39 +00:00
parent e603d8f17c
commit c1fc368392

View file

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