used inline functions to get decisions that combine multiple options and window state
svn path=/trunk/KDE/kdebase/workspace/; revision=1020951
This commit is contained in:
parent
8f72704c20
commit
3455dda8d5
3 changed files with 11 additions and 3 deletions
|
@ -162,7 +162,7 @@ namespace Nitrogen
|
|||
|
||||
dark.setAlpha(120);
|
||||
|
||||
if(client_.isActive() && client_.configuration().drawSeparator() && !client_.configuration().drawTitleOutline() )
|
||||
if( client_.drawSeparator() )
|
||||
{ helper_.drawSeparator(&painter, QRect(x, titleHeight-1.5, w, 2), color, Qt::Horizontal); }
|
||||
|
||||
// for menu button the application icon is used
|
||||
|
|
|
@ -745,7 +745,7 @@ namespace Nitrogen
|
|||
frame.getRect(&x, &y, &w, &h);
|
||||
|
||||
// separator
|
||||
if( isActive() && configuration().drawSeparator() && !configuration().drawTitleOutline() )
|
||||
if( drawSeparator() )
|
||||
{ helper().drawSeparator(&painter, QRect(x, titleTop+titleHeight-1.5, w, 2), color, Qt::Horizontal); }
|
||||
|
||||
// shadow and resize handles
|
||||
|
@ -902,7 +902,7 @@ namespace Nitrogen
|
|||
p.setRenderHint( QPainter::Antialiasing );
|
||||
p.setPen( Qt::NoPen );
|
||||
|
||||
if( active && configuration().useOxygenShadows() )
|
||||
if( useOxygenShadows() )
|
||||
{
|
||||
|
||||
//---------------------------------------------------------------
|
||||
|
|
|
@ -61,6 +61,14 @@ namespace Nitrogen
|
|||
//! true if window is maximized
|
||||
virtual bool isMaximized( void ) const;
|
||||
|
||||
//! true when separator is to be drawn
|
||||
virtual bool drawSeparator( void ) const
|
||||
{ return isActive() && configuration().drawSeparator() && !configuration().drawTitleOutline(); }
|
||||
|
||||
//! true when oxygen 'glow' shadow is to be drawn for active window
|
||||
virtual bool useOxygenShadows( void ) const
|
||||
{ return isActive() && configuration().useOxygenShadows(); }
|
||||
|
||||
//! dimensions
|
||||
virtual int layoutMetric(LayoutMetric lm, bool respectWindowState = true, const KCommonDecorationButton * = 0) const;
|
||||
|
||||
|
|
Loading…
Reference in a new issue