moved more functions inline and use reference to pass configuration around.
svn path=/trunk/KDE/kdebase/workspace/; revision=1025142
This commit is contained in:
parent
ac90c3aef5
commit
40ab147f81
2 changed files with 23 additions and 19 deletions
|
@ -146,10 +146,6 @@ namespace Oxygen
|
|||
KCommonDecorationUnstable::reset( changed );
|
||||
}
|
||||
|
||||
//___________________________________________
|
||||
bool OxygenClient::isMaximized() const
|
||||
{ return maximizeMode()==MaximizeFull && !options()->moveResizeMaximizedWindows(); }
|
||||
|
||||
//___________________________________________
|
||||
bool OxygenClient::decorationBehaviour(DecorationBehaviour behaviour) const
|
||||
{
|
||||
|
@ -854,10 +850,6 @@ namespace Oxygen
|
|||
|
||||
}
|
||||
|
||||
//________________________________________________________________
|
||||
OxygenConfiguration OxygenClient::configuration( void ) const
|
||||
{ return configuration_; }
|
||||
|
||||
//_________________________________________________________________
|
||||
void OxygenClient::createSizeGrip( void )
|
||||
{
|
||||
|
|
|
@ -58,8 +58,16 @@ namespace Oxygen
|
|||
virtual KCommonDecorationButton *createButton(::ButtonType type);
|
||||
virtual bool decorationBehaviour(DecorationBehaviour behaviour) const;
|
||||
|
||||
//!@name flags
|
||||
//@{
|
||||
|
||||
//! true if window is maximized
|
||||
virtual bool isMaximized( void ) const;
|
||||
virtual bool isMaximized( void ) const
|
||||
{ return maximizeMode()==MaximizeFull && !options()->moveResizeMaximizedWindows(); }
|
||||
|
||||
//! return true if timeLine is running
|
||||
bool timeLineIsRunning( void ) const
|
||||
{ return timeLine_.state() == QTimeLine::Running; }
|
||||
|
||||
//! true when title outline is to be drawn
|
||||
bool drawTitleOutline( void ) const
|
||||
|
@ -78,6 +86,8 @@ namespace Oxygen
|
|||
!configuration().drawTitleOutline();
|
||||
}
|
||||
|
||||
//@}
|
||||
|
||||
//! dimensions
|
||||
virtual int layoutMetric(LayoutMetric lm, bool respectWindowState = true, const KCommonDecorationButton * = 0) const;
|
||||
|
||||
|
@ -91,12 +101,21 @@ namespace Oxygen
|
|||
virtual void reset( unsigned long changed );
|
||||
|
||||
//! return associated configuration
|
||||
OxygenConfiguration configuration( void ) const;
|
||||
const OxygenConfiguration& configuration( void ) const
|
||||
{ return configuration_; }
|
||||
|
||||
//! return timeLine
|
||||
const QTimeLine& timeLine( void ) const
|
||||
{ return timeLine_; }
|
||||
|
||||
//! helper class
|
||||
OxygenHelper& helper( void ) const
|
||||
{ return helper_; }
|
||||
|
||||
//! return animation opacity
|
||||
qreal opacity( void ) const
|
||||
{ return qreal( timeLine_.currentFrame() )/qreal( timeLine_.endFrame() ); }
|
||||
|
||||
//! palette background
|
||||
QPalette backgroundPalette( const QWidget*, QPalette ) const;
|
||||
|
||||
|
@ -137,20 +156,13 @@ namespace Oxygen
|
|||
//! return true when activity change are animated
|
||||
bool animateActiveChange( void ) const
|
||||
{
|
||||
return
|
||||
if( isPreview() ) return false;
|
||||
else return
|
||||
(compositingActive() && !isMaximized() && configuration().useOxygenShadows()) ||
|
||||
configuration().drawSeparator() ||
|
||||
configuration().drawTitleOutline();
|
||||
}
|
||||
|
||||
//! return true if timeLine is running
|
||||
bool timeLineIsRunning( void ) const
|
||||
{ return timeLine_.state() == QTimeLine::Running; }
|
||||
|
||||
//! return animation opacity
|
||||
qreal opacity( void ) const
|
||||
{ return qreal( timeLine_.currentFrame() )/qreal( timeLine_.endFrame() ); }
|
||||
|
||||
//! calculate mask
|
||||
QRegion calcMask( void ) const;
|
||||
|
||||
|
|
Loading…
Reference in a new issue