- 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=1047309
icc-effect-5.14.5
Hugo Pereira Da Costa 2009-11-10 23:11:08 +00:00
parent bc0a26288f
commit f08d982b15
4 changed files with 39 additions and 5 deletions

View File

@ -229,6 +229,7 @@ namespace Oxygen
{
bool maximized( isMaximized() );
bool narrowSpacing( configuration().useNarrowButtonSpacing() );
int frameBorder( configuration().frameBorder() );
int buttonSize( configuration().hideTitleBar() ? 0 : configuration().buttonSize() );
@ -273,7 +274,7 @@ namespace Oxygen
if( frameBorder == OxygenConfiguration::BorderNone && configuration().hideTitleBar() )
{
border = 0;
border = 0;
} else if( !( respectWindowState && maximized )) {
@ -295,7 +296,7 @@ namespace Oxygen
{
int border = 0;
if( !(respectWindowState && maximized) )
{ border = 6; }
{ border = 4; }
return border;
@ -321,7 +322,7 @@ namespace Oxygen
}
case LM_ButtonSpacing:
return 1;
return narrowSpacing ? 1:3;
case LM_ButtonMarginTop:
return 0;
@ -815,6 +816,15 @@ namespace Oxygen
}
//_________________________________________________________
QString OxygenClient::defaultButtonsLeft() const
{ return KCommonDecoration::defaultButtonsLeft(); }
//_________________________________________________________
QString OxygenClient::defaultButtonsRight() const
{ return "HIAX"; }
//________________________________________________________________
void OxygenClient::updateWindowShape()
{

View File

@ -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)
//@{

View File

@ -42,7 +42,8 @@ namespace Oxygen
hideTitleBar_( false ),
useOxygenShadows_( true ),
useAnimations_( true ),
animationsDuration_( 150 )
animationsDuration_( 150 ),
useNarrowButtonSpacing_( false )
{}
//__________________________________________________
@ -106,6 +107,11 @@ namespace Oxygen
setAnimationsDuration( group.readEntry(
OxygenConfig::ANIMATIONS_DURATION,
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_ANIMATIONS, useAnimations() );
group.writeEntry( OxygenConfig::ANIMATIONS_DURATION, animationsDuration() );
group.writeEntry( OxygenConfig::NARROW_BUTTON_SPACING, useNarrowButtonSpacing() );
}
//__________________________________________________
@ -290,7 +297,8 @@ namespace Oxygen
hideTitleBar() == other.hideTitleBar() &&
useOxygenShadows() == other.useOxygenShadows() &&
useAnimations() == other.useAnimations() &&
animationsDuration() == other.animationsDuration();
animationsDuration() == other.animationsDuration() &&
useNarrowButtonSpacing() == other.useNarrowButtonSpacing();
}

View File

@ -42,6 +42,7 @@ namespace OxygenConfig
static const QString HIDE_TITLEBAR = "HideTitleBar";
static const QString USE_ANIMATIONS = "UseAnimations";
static const QString ANIMATIONS_DURATION = "AnimationsDuration";
static const QString NARROW_BUTTON_SPACING = "UseNarrowButtonSpacing";
}
@ -144,6 +145,12 @@ namespace Oxygen
virtual void setButtonSize( ButtonSize value )
{ buttonSize_ = value; }
virtual bool useNarrowButtonSpacing( void ) const
{ return useNarrowButtonSpacing_; }
virtual void setUseNarrowButtonSpacing( bool value )
{ useNarrowButtonSpacing_ = value; }
//@}
//!@name frame border
@ -293,6 +300,9 @@ namespace Oxygen
//! animations
int animationsDuration_;
//! narrow button spacing
bool useNarrowButtonSpacing_;
};
}