Added hidden option to disable extended window borders.
parent
b2bf54f859
commit
6db2407334
|
@ -1432,7 +1432,10 @@ namespace Oxygen
|
||||||
QRegion Client::region( KDecorationDefines::Region r )
|
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(
|
const QRect rect = widget()->rect().adjusted(
|
||||||
|
|
|
@ -49,6 +49,7 @@ namespace Oxygen
|
||||||
_useOxygenShadows( true ),
|
_useOxygenShadows( true ),
|
||||||
_closeFromMenuButton( false ),
|
_closeFromMenuButton( false ),
|
||||||
_useNarrowButtonSpacing( false ),
|
_useNarrowButtonSpacing( false ),
|
||||||
|
_useExtendedWindowBorder( true ),
|
||||||
_animationsEnabled( true ),
|
_animationsEnabled( true ),
|
||||||
_buttonAnimationsEnabled( true ),
|
_buttonAnimationsEnabled( true ),
|
||||||
_titleAnimationsEnabled( true ),
|
_titleAnimationsEnabled( true ),
|
||||||
|
@ -138,6 +139,11 @@ namespace Oxygen
|
||||||
OxygenConfig::NARROW_BUTTON_SPACING,
|
OxygenConfig::NARROW_BUTTON_SPACING,
|
||||||
defaultConfiguration.useNarrowButtonSpacing() ) );
|
defaultConfiguration.useNarrowButtonSpacing() ) );
|
||||||
|
|
||||||
|
// extended window border
|
||||||
|
setUseExtendedWindowBorder( group.readEntry(
|
||||||
|
OxygenConfig::EXTENDED_WINDOW_BORDERS,
|
||||||
|
defaultConfiguration.useExtendedWindowBorder() ) );
|
||||||
|
|
||||||
// animations
|
// animations
|
||||||
setAnimationsEnabled( group.readEntry(
|
setAnimationsEnabled( group.readEntry(
|
||||||
OxygenConfig::ANIMATIONS_ENABLED,
|
OxygenConfig::ANIMATIONS_ENABLED,
|
||||||
|
@ -215,6 +221,7 @@ namespace Oxygen
|
||||||
if( useOxygenShadows() != defaultConfiguration.useOxygenShadows() ) group.writeEntry( OxygenConfig::USE_OXYGEN_SHADOWS, useOxygenShadows() );
|
if( useOxygenShadows() != defaultConfiguration.useOxygenShadows() ) group.writeEntry( OxygenConfig::USE_OXYGEN_SHADOWS, useOxygenShadows() );
|
||||||
if( closeFromMenuButton() != defaultConfiguration.closeFromMenuButton() ) group.writeEntry( OxygenConfig::CLOSE_FROM_MENU_BUTTON, closeFromMenuButton() );
|
if( closeFromMenuButton() != defaultConfiguration.closeFromMenuButton() ) group.writeEntry( OxygenConfig::CLOSE_FROM_MENU_BUTTON, closeFromMenuButton() );
|
||||||
if( useNarrowButtonSpacing() != defaultConfiguration.useNarrowButtonSpacing() ) group.writeEntry( OxygenConfig::NARROW_BUTTON_SPACING, useNarrowButtonSpacing() );
|
if( useNarrowButtonSpacing() != defaultConfiguration.useNarrowButtonSpacing() ) group.writeEntry( OxygenConfig::NARROW_BUTTON_SPACING, useNarrowButtonSpacing() );
|
||||||
|
if( useExtendedWindowBorder() != defaultConfiguration.useExtendedWindowBorder() ) group.writeEntry( OxygenConfig::EXTENDED_WINDOW_BORDERS, useExtendedWindowBorder() );
|
||||||
|
|
||||||
// animations
|
// animations
|
||||||
if( animationsEnabled() != defaultConfiguration.animationsEnabled() ) group.writeEntry( OxygenConfig::ANIMATIONS_ENABLED, animationsEnabled() );
|
if( animationsEnabled() != defaultConfiguration.animationsEnabled() ) group.writeEntry( OxygenConfig::ANIMATIONS_ENABLED, animationsEnabled() );
|
||||||
|
@ -409,6 +416,7 @@ namespace Oxygen
|
||||||
useOxygenShadows() == other.useOxygenShadows() &&
|
useOxygenShadows() == other.useOxygenShadows() &&
|
||||||
closeFromMenuButton() == other.closeFromMenuButton() &&
|
closeFromMenuButton() == other.closeFromMenuButton() &&
|
||||||
useNarrowButtonSpacing() == other.useNarrowButtonSpacing() &&
|
useNarrowButtonSpacing() == other.useNarrowButtonSpacing() &&
|
||||||
|
useExtendedWindowBorder() == other.useExtendedWindowBorder() &&
|
||||||
animationsEnabled() == other.animationsEnabled() &&
|
animationsEnabled() == other.animationsEnabled() &&
|
||||||
buttonAnimationsEnabled() == other.buttonAnimationsEnabled() &&
|
buttonAnimationsEnabled() == other.buttonAnimationsEnabled() &&
|
||||||
titleAnimationsEnabled() == other.titleAnimationsEnabled() &&
|
titleAnimationsEnabled() == other.titleAnimationsEnabled() &&
|
||||||
|
|
|
@ -45,6 +45,7 @@ namespace OxygenConfig
|
||||||
static const QString ANIMATIONS_ENABLED = "AnimationsEnabled";
|
static const QString ANIMATIONS_ENABLED = "AnimationsEnabled";
|
||||||
static const QString NARROW_BUTTON_SPACING = "UseNarrowButtonSpacing";
|
static const QString NARROW_BUTTON_SPACING = "UseNarrowButtonSpacing";
|
||||||
static const QString CLOSE_FROM_MENU_BUTTON = "CloseFromMenuButton";
|
static const QString CLOSE_FROM_MENU_BUTTON = "CloseFromMenuButton";
|
||||||
|
static const QString EXTENDED_WINDOW_BORDERS = "UseExtendedWindowBorders";
|
||||||
|
|
||||||
//!@name animation flags
|
//!@name animation flags
|
||||||
//@{
|
//@{
|
||||||
|
@ -215,6 +216,12 @@ namespace Oxygen
|
||||||
virtual void setFrameBorder( QString value, bool translated )
|
virtual void setFrameBorder( QString value, bool translated )
|
||||||
{ _frameBorder = frameBorder( value, translated ); }
|
{ _frameBorder = frameBorder( value, translated ); }
|
||||||
|
|
||||||
|
virtual bool useExtendedWindowBorder( void ) const
|
||||||
|
{ return _useExtendedWindowBorder; }
|
||||||
|
|
||||||
|
virtual void setUseExtendedWindowBorder( bool value )
|
||||||
|
{ _useExtendedWindowBorder = value; }
|
||||||
|
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
//!@name blend color
|
//!@name blend color
|
||||||
|
@ -427,6 +434,9 @@ namespace Oxygen
|
||||||
//! narrow button spacing
|
//! narrow button spacing
|
||||||
bool _useNarrowButtonSpacing;
|
bool _useNarrowButtonSpacing;
|
||||||
|
|
||||||
|
//! extended window borders
|
||||||
|
bool _useExtendedWindowBorder;
|
||||||
|
|
||||||
//!@name animation flags
|
//!@name animation flags
|
||||||
//@{
|
//@{
|
||||||
bool _animationsEnabled;
|
bool _animationsEnabled;
|
||||||
|
|
Loading…
Reference in New Issue