- made distance between window border and first button smaller by 2 pixels
- set default spacing between buttons to 3 pixels - added 'hidden' option to disable the above - removed extra spacing before close button in default button layout, since the 3 pixels above should be enough svn path=/trunk/KDE/kdebase/workspace/; revision=1047309icc-effect-5.14.5
parent
bc0a26288f
commit
f08d982b15
|
@ -229,6 +229,7 @@ namespace Oxygen
|
||||||
{
|
{
|
||||||
|
|
||||||
bool maximized( isMaximized() );
|
bool maximized( isMaximized() );
|
||||||
|
bool narrowSpacing( configuration().useNarrowButtonSpacing() );
|
||||||
int frameBorder( configuration().frameBorder() );
|
int frameBorder( configuration().frameBorder() );
|
||||||
int buttonSize( configuration().hideTitleBar() ? 0 : configuration().buttonSize() );
|
int buttonSize( configuration().hideTitleBar() ? 0 : configuration().buttonSize() );
|
||||||
|
|
||||||
|
@ -273,7 +274,7 @@ namespace Oxygen
|
||||||
if( frameBorder == OxygenConfiguration::BorderNone && configuration().hideTitleBar() )
|
if( frameBorder == OxygenConfiguration::BorderNone && configuration().hideTitleBar() )
|
||||||
{
|
{
|
||||||
|
|
||||||
border = 0;
|
border = 0;
|
||||||
|
|
||||||
} else if( !( respectWindowState && maximized )) {
|
} else if( !( respectWindowState && maximized )) {
|
||||||
|
|
||||||
|
@ -295,7 +296,7 @@ namespace Oxygen
|
||||||
{
|
{
|
||||||
int border = 0;
|
int border = 0;
|
||||||
if( !(respectWindowState && maximized) )
|
if( !(respectWindowState && maximized) )
|
||||||
{ border = 6; }
|
{ border = 4; }
|
||||||
|
|
||||||
return border;
|
return border;
|
||||||
|
|
||||||
|
@ -321,7 +322,7 @@ namespace Oxygen
|
||||||
}
|
}
|
||||||
|
|
||||||
case LM_ButtonSpacing:
|
case LM_ButtonSpacing:
|
||||||
return 1;
|
return narrowSpacing ? 1:3;
|
||||||
|
|
||||||
case LM_ButtonMarginTop:
|
case LM_ButtonMarginTop:
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -815,6 +816,15 @@ namespace Oxygen
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//_________________________________________________________
|
||||||
|
QString OxygenClient::defaultButtonsLeft() const
|
||||||
|
{ return KCommonDecoration::defaultButtonsLeft(); }
|
||||||
|
|
||||||
|
|
||||||
|
//_________________________________________________________
|
||||||
|
QString OxygenClient::defaultButtonsRight() const
|
||||||
|
{ return "HIAX"; }
|
||||||
|
|
||||||
//________________________________________________________________
|
//________________________________________________________________
|
||||||
void OxygenClient::updateWindowShape()
|
void OxygenClient::updateWindowShape()
|
||||||
{
|
{
|
||||||
|
|
|
@ -142,6 +142,12 @@ namespace Oxygen
|
||||||
|
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
|
//! default buttons located on the left
|
||||||
|
virtual QString defaultButtonsLeft() const;
|
||||||
|
|
||||||
|
//! default buttons located on the right
|
||||||
|
virtual QString defaultButtonsRight() const;
|
||||||
|
|
||||||
//!@name status change methods (overloaded from KCommonDecorationUnstable)
|
//!@name status change methods (overloaded from KCommonDecorationUnstable)
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,8 @@ namespace Oxygen
|
||||||
hideTitleBar_( false ),
|
hideTitleBar_( false ),
|
||||||
useOxygenShadows_( true ),
|
useOxygenShadows_( true ),
|
||||||
useAnimations_( true ),
|
useAnimations_( true ),
|
||||||
animationsDuration_( 150 )
|
animationsDuration_( 150 ),
|
||||||
|
useNarrowButtonSpacing_( false )
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//__________________________________________________
|
//__________________________________________________
|
||||||
|
@ -106,6 +107,11 @@ namespace Oxygen
|
||||||
setAnimationsDuration( group.readEntry(
|
setAnimationsDuration( group.readEntry(
|
||||||
OxygenConfig::ANIMATIONS_DURATION,
|
OxygenConfig::ANIMATIONS_DURATION,
|
||||||
defaultConfiguration.animationsDuration() ) );
|
defaultConfiguration.animationsDuration() ) );
|
||||||
|
|
||||||
|
// buttonSpacing
|
||||||
|
setUseNarrowButtonSpacing( group.readEntry(
|
||||||
|
OxygenConfig::NARROW_BUTTON_SPACING,
|
||||||
|
defaultConfiguration.useNarrowButtonSpacing() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
//__________________________________________________
|
//__________________________________________________
|
||||||
|
@ -124,6 +130,7 @@ namespace Oxygen
|
||||||
group.writeEntry( OxygenConfig::USE_OXYGEN_SHADOWS, useOxygenShadows() );
|
group.writeEntry( OxygenConfig::USE_OXYGEN_SHADOWS, useOxygenShadows() );
|
||||||
group.writeEntry( OxygenConfig::USE_ANIMATIONS, useAnimations() );
|
group.writeEntry( OxygenConfig::USE_ANIMATIONS, useAnimations() );
|
||||||
group.writeEntry( OxygenConfig::ANIMATIONS_DURATION, animationsDuration() );
|
group.writeEntry( OxygenConfig::ANIMATIONS_DURATION, animationsDuration() );
|
||||||
|
group.writeEntry( OxygenConfig::NARROW_BUTTON_SPACING, useNarrowButtonSpacing() );
|
||||||
}
|
}
|
||||||
|
|
||||||
//__________________________________________________
|
//__________________________________________________
|
||||||
|
@ -290,7 +297,8 @@ namespace Oxygen
|
||||||
hideTitleBar() == other.hideTitleBar() &&
|
hideTitleBar() == other.hideTitleBar() &&
|
||||||
useOxygenShadows() == other.useOxygenShadows() &&
|
useOxygenShadows() == other.useOxygenShadows() &&
|
||||||
useAnimations() == other.useAnimations() &&
|
useAnimations() == other.useAnimations() &&
|
||||||
animationsDuration() == other.animationsDuration();
|
animationsDuration() == other.animationsDuration() &&
|
||||||
|
useNarrowButtonSpacing() == other.useNarrowButtonSpacing();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,7 @@ namespace OxygenConfig
|
||||||
static const QString HIDE_TITLEBAR = "HideTitleBar";
|
static const QString HIDE_TITLEBAR = "HideTitleBar";
|
||||||
static const QString USE_ANIMATIONS = "UseAnimations";
|
static const QString USE_ANIMATIONS = "UseAnimations";
|
||||||
static const QString ANIMATIONS_DURATION = "AnimationsDuration";
|
static const QString ANIMATIONS_DURATION = "AnimationsDuration";
|
||||||
|
static const QString NARROW_BUTTON_SPACING = "UseNarrowButtonSpacing";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -144,6 +145,12 @@ namespace Oxygen
|
||||||
virtual void setButtonSize( ButtonSize value )
|
virtual void setButtonSize( ButtonSize value )
|
||||||
{ buttonSize_ = value; }
|
{ buttonSize_ = value; }
|
||||||
|
|
||||||
|
virtual bool useNarrowButtonSpacing( void ) const
|
||||||
|
{ return useNarrowButtonSpacing_; }
|
||||||
|
|
||||||
|
virtual void setUseNarrowButtonSpacing( bool value )
|
||||||
|
{ useNarrowButtonSpacing_ = value; }
|
||||||
|
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
//!@name frame border
|
//!@name frame border
|
||||||
|
@ -293,6 +300,9 @@ namespace Oxygen
|
||||||
//! animations
|
//! animations
|
||||||
int animationsDuration_;
|
int animationsDuration_;
|
||||||
|
|
||||||
|
//! narrow button spacing
|
||||||
|
bool useNarrowButtonSpacing_;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue