Fix the geometry of the tabbox

Most of the time, the longest entry was squeezed unnecessarily

svn path=/trunk/kdebase/kwin/; revision=333017
icc-effect-5.14.5
Pascal Létourneau 2004-07-26 19:14:30 +00:00
parent 1404fcd72b
commit 8c8429074e
1 changed files with 2 additions and 1 deletions

View File

@ -210,7 +210,8 @@ void TabBox::reset()
// height, width for the popup
h += 2 * frameWidth();
w = QMIN( QMAX( 5 + (showMiniIcon ? 16 : 32) + 8 +wmax, r.width()/3 ), r.width() ); // 5=space, ()=icon, 8=space between icon+text
w = 2*frameWidth() + 5*2 + ( showMiniIcon ? 16 : 32 ) + 8 + wmax; // 5*2=margins, ()=icon, 8=space between icon+text
w = kClamp( w, r.width()/3 , r.width() );
setGeometry( (r.width()-w)/2 + r.x(),
(r.height()-h)/2+ r.y(),