Added hidden option to disable extended window borders.

icc-effect-5.14.5
Hugo Pereira Da Costa 2012-11-11 13:15:47 +01:00
parent b2bf54f859
commit 6db2407334
3 changed files with 22 additions and 1 deletions

View File

@ -1432,7 +1432,10 @@ namespace Oxygen
QRegion Client::region( KDecorationDefines::Region r )
{
if( r == KDecorationDefines::ExtendedBorderRegion && configuration().frameBorder() <= Configuration::BorderNoSide )
if(
(r == KDecorationDefines::ExtendedBorderRegion) &&
configuration().useExtendedWindowBorder() &&
configuration().frameBorder() <= Configuration::BorderNoSide )
{
const QRect rect = widget()->rect().adjusted(

View File

@ -49,6 +49,7 @@ namespace Oxygen
_useOxygenShadows( true ),
_closeFromMenuButton( false ),
_useNarrowButtonSpacing( false ),
_useExtendedWindowBorder( true ),
_animationsEnabled( true ),
_buttonAnimationsEnabled( true ),
_titleAnimationsEnabled( true ),
@ -138,6 +139,11 @@ namespace Oxygen
OxygenConfig::NARROW_BUTTON_SPACING,
defaultConfiguration.useNarrowButtonSpacing() ) );
// extended window border
setUseExtendedWindowBorder( group.readEntry(
OxygenConfig::EXTENDED_WINDOW_BORDERS,
defaultConfiguration.useExtendedWindowBorder() ) );
// animations
setAnimationsEnabled( group.readEntry(
OxygenConfig::ANIMATIONS_ENABLED,
@ -215,6 +221,7 @@ namespace Oxygen
if( useOxygenShadows() != defaultConfiguration.useOxygenShadows() ) group.writeEntry( OxygenConfig::USE_OXYGEN_SHADOWS, useOxygenShadows() );
if( closeFromMenuButton() != defaultConfiguration.closeFromMenuButton() ) group.writeEntry( OxygenConfig::CLOSE_FROM_MENU_BUTTON, closeFromMenuButton() );
if( useNarrowButtonSpacing() != defaultConfiguration.useNarrowButtonSpacing() ) group.writeEntry( OxygenConfig::NARROW_BUTTON_SPACING, useNarrowButtonSpacing() );
if( useExtendedWindowBorder() != defaultConfiguration.useExtendedWindowBorder() ) group.writeEntry( OxygenConfig::EXTENDED_WINDOW_BORDERS, useExtendedWindowBorder() );
// animations
if( animationsEnabled() != defaultConfiguration.animationsEnabled() ) group.writeEntry( OxygenConfig::ANIMATIONS_ENABLED, animationsEnabled() );
@ -409,6 +416,7 @@ namespace Oxygen
useOxygenShadows() == other.useOxygenShadows() &&
closeFromMenuButton() == other.closeFromMenuButton() &&
useNarrowButtonSpacing() == other.useNarrowButtonSpacing() &&
useExtendedWindowBorder() == other.useExtendedWindowBorder() &&
animationsEnabled() == other.animationsEnabled() &&
buttonAnimationsEnabled() == other.buttonAnimationsEnabled() &&
titleAnimationsEnabled() == other.titleAnimationsEnabled() &&

View File

@ -45,6 +45,7 @@ namespace OxygenConfig
static const QString ANIMATIONS_ENABLED = "AnimationsEnabled";
static const QString NARROW_BUTTON_SPACING = "UseNarrowButtonSpacing";
static const QString CLOSE_FROM_MENU_BUTTON = "CloseFromMenuButton";
static const QString EXTENDED_WINDOW_BORDERS = "UseExtendedWindowBorders";
//!@name animation flags
//@{
@ -215,6 +216,12 @@ namespace Oxygen
virtual void setFrameBorder( QString value, bool translated )
{ _frameBorder = frameBorder( value, translated ); }
virtual bool useExtendedWindowBorder( void ) const
{ return _useExtendedWindowBorder; }
virtual void setUseExtendedWindowBorder( bool value )
{ _useExtendedWindowBorder = value; }
//@}
//!@name blend color
@ -427,6 +434,9 @@ namespace Oxygen
//! narrow button spacing
bool _useNarrowButtonSpacing;
//! extended window borders
bool _useExtendedWindowBorder;
//!@name animation flags
//@{
bool _animationsEnabled;