added 'No Side Border' border side option. It is intermediate between Tiny and No Border.

svn path=/trunk/KDE/kdebase/workspace/; revision=1021438
This commit is contained in:
Hugo Pereira Da Costa 2009-09-09 07:40:07 +00:00
parent 3fde3f12f4
commit c66c2f05e5

View file

@ -165,14 +165,20 @@ namespace Nitrogen
int border( 0 ); int border( 0 );
if (respectWindowState && maximized) { if (respectWindowState && maximized) {
border = 0; border = 0;
} else if( configuration().frameBorder() == NitrogenConfiguration::BorderNone && isPreview() && !compositingActive() ) { } else if( lm == LM_BorderBottom && frameBorder >= NitrogenConfiguration::BorderNoSide ) {
border = 1;
} else if( lm == LM_BorderBottom && frameBorder >= NitrogenConfiguration::BorderTiny ) {
// for tiny border, the convention is to have a larger bottom area in order to // for tiny border, the convention is to have a larger bottom area in order to
// make resizing easier // make resizing easier
border = qMax(frameBorder, 4); border = qMax(frameBorder, 4);
} else if( configuration().frameBorder() == NitrogenConfiguration::BorderNone && isPreview() && !compositingActive() ) {
border = 1;
} else if( frameBorder < NitrogenConfiguration::BorderTiny ) {
border = 0;
} else { } else {
border = frameBorder; border = frameBorder;
@ -335,7 +341,7 @@ namespace Nitrogen
int bottom = 1; int bottom = 1;
// disable bottom corners when border frame is too small and window is not shaded // disable bottom corners when border frame is too small and window is not shaded
if( configuration().frameBorder() < NitrogenConfiguration::BorderTiny && !isShade() ) bottom = 0; if( configuration().frameBorder() == NitrogenConfiguration::BorderNone && !isShade() ) bottom = 0;
int sw = layoutMetric( LM_OuterPaddingLeft ); int sw = layoutMetric( LM_OuterPaddingLeft );
int sh = layoutMetric( LM_OuterPaddingTop ); int sh = layoutMetric( LM_OuterPaddingTop );
@ -454,7 +460,7 @@ namespace Nitrogen
} }
// draw bottom line // draw bottom line
if( configuration().frameBorder() >= NitrogenConfiguration::BorderTiny ) if( configuration().frameBorder() > NitrogenConfiguration::BorderNone )
{ {
int height = qMin( HFRAMESIZE, layoutMetric( LM_BorderBottom ) ); int height = qMin( HFRAMESIZE, layoutMetric( LM_BorderBottom ) );
painter->setBrush( bottom ); painter->setBrush( bottom );