Limit tabbox maximum width to 80% of screen width.

FEATURE: 92418

svn path=/trunk/kdebase/kwin/; revision=366425
This commit is contained in:
Luboš Luňák 2004-11-26 16:14:32 +00:00
parent 9a5a1c5d95
commit bfbc879603

View file

@ -212,7 +212,7 @@ void TabBox::reset()
// height, width for the popup // height, width for the popup
h += 2 * frameWidth(); h += 2 * frameWidth();
w = 2*frameWidth() + 5*2 + ( showMiniIcon ? 16 : 32 ) + 8 + wmax; // 5*2=margins, ()=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() ); w = kClamp( w, r.width()/3 , r.width() * 4 / 5 );
setGeometry( (r.width()-w)/2 + r.x(), setGeometry( (r.width()-w)/2 + r.x(),
(r.height()-h)/2+ r.y(), (r.height()-h)/2+ r.y(),