removed 'light source' option since unmaintained, and not in sync with window decoration.

wilder-pre-rebase
Hugo Pereira Da Costa 11 years ago
parent 2389411364
commit 5d3323431f
  1. 10
      kstyle/breeze.kcfg
  2. 10
      kstyle/breezehelper.cpp
  3. 27
      kstyle/breezemdiwindowshadow.cpp
  4. 23
      kstyle/breezeshadowhelper.cpp

@ -129,16 +129,6 @@
<default>12</default>
</entry>
<!-- light source -->
<entry name="LightSource" type="Enum">
<choices>
<choice name="LS_TOPLEFT" />
<choice name="LS_TOP" />
<choice name="LS_TOPRIGHT" />
</choices>
<default>LS_TOPLEFT</default>
</entry>
<!-- debugging -->
<entry name="WidgetExplorerEnabled" type="Bool">
<default>false</default>

@ -1366,15 +1366,7 @@ namespace Breeze
//______________________________________________________________________________
QRectF Helper::shadowRect( const QRectF& rect ) const
{
switch( StyleConfigData::lightSource() )
{
case StyleConfigData::LS_TOP: return rect.adjusted( 0.5, 0.5, -0.5, -0.5 ).translated( 0, 0.5 );
case StyleConfigData::LS_TOPLEFT: return rect.adjusted( 0.5, 0.5, -0.5, -0.5 ).translated( 0.5, 0.5 );
case StyleConfigData::LS_TOPRIGHT: return rect.adjusted( 0.5, 0.5, -0.5, -0.5 ).translated( -0.5, 0.5 );
default: return rect;
}
}
{ return rect.adjusted( 0.5, 0.5, -0.5, -0.5 ).translated( 0.5, 0.5 ); }
//______________________________________________________________________________
QPainterPath Helper::roundedPath( const QRectF& rect, Corners corners, qreal radius ) const

@ -37,29 +37,10 @@ namespace Breeze
if( !_widget ) return;
const int size( Metrics::Shadow_Size - Metrics::Shadow_Overlap );
int topSize( size - Metrics::Shadow_Offset );
int bottomSize( size );
int rightSize( 0 );
int leftSize( 0 );
switch( StyleConfigData::lightSource() )
{
case StyleConfigData::LS_TOPLEFT:
leftSize = size - Metrics::Shadow_Offset;
rightSize = size;
break;
case StyleConfigData::LS_TOPRIGHT:
rightSize = size - Metrics::Shadow_Offset;
leftSize = size;
break;
case StyleConfigData::LS_TOP:
leftSize = size - Metrics::Shadow_Offset/2;
rightSize = size - Metrics::Shadow_Offset/2;
break;
}
const int topSize( size - Metrics::Shadow_Offset );
const int bottomSize( size );
const int leftSize( size - Metrics::Shadow_Offset );
const int rightSize( size );
// get tileSet rect
_shadowTilesRect = _widget->frameGeometry().adjusted( -leftSize, -topSize, rightSize, bottomSize );

@ -397,27 +397,8 @@ namespace Breeze
int size( Metrics::Shadow_Size - Metrics::Shadow_Overlap );
int topSize = ( size - Metrics::Shadow_Offset ) * devicePixelRatio;
int bottomSize = size * devicePixelRatio;
int rightSize(0);
int leftSize(0);
switch( StyleConfigData::lightSource() )
{
case StyleConfigData::LS_TOPLEFT:
leftSize = (size - Metrics::Shadow_Offset) * devicePixelRatio;
rightSize = size * devicePixelRatio;
break;
case StyleConfigData::LS_TOPRIGHT:
rightSize = (size - Metrics::Shadow_Offset) * devicePixelRatio;
leftSize = size * devicePixelRatio;
break;
case StyleConfigData::LS_TOP:
leftSize = (size - Metrics::Shadow_Offset/2) * devicePixelRatio;
rightSize = (size - Metrics::Shadow_Offset/2) * devicePixelRatio;
break;
}
const int leftSize( (size - Metrics::Shadow_Offset) * devicePixelRatio );
const int rightSize( size * devicePixelRatio );
if( widget->inherits( "QBalloonTip" ) )
{

Loading…
Cancel
Save