summaryrefslogtreecommitdiff
path: root/noncore/styles/flat/flat.cpp
Side-by-side diff
Diffstat (limited to 'noncore/styles/flat/flat.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/styles/flat/flat.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/styles/flat/flat.cpp b/noncore/styles/flat/flat.cpp
index 24366f6..f3bacf9 100644
--- a/noncore/styles/flat/flat.cpp
+++ b/noncore/styles/flat/flat.cpp
@@ -1013,90 +1013,90 @@ void FlatStyle::drawPopupMenuItem( QPainter* p, bool checkable, int maxpmw, int
p->drawText( x+w-tab-windowsRightBorder-motifItemHMargin-motifItemFrame+1,
y+m+1, tab, h-2*m, text_flags, s.mid( t+1 ));
p->setPen( discol );
}
p->drawText( x+w-tab-windowsRightBorder-motifItemHMargin-motifItemFrame,
y+m, tab, h-2*m, text_flags, s.mid( t+1 ) );
}
if ( dis && !act )
p->setPen( discol );
p->drawText( x+xm, y+m, w-xm-tab+1, h-2*m, text_flags, s, t );
} else if ( mi->pixmap() ) { // draw pixmap
QPixmap *pixmap = mi->pixmap();
if ( pixmap->depth() == 1 )
p->setBackgroundMode( OpaqueMode );
p->drawPixmap( x+xm, y+motifItemFrame, *pixmap );
if ( pixmap->depth() == 1 )
p->setBackgroundMode( TransparentMode );
}
if ( mi->popup() ) { // draw sub menu arrow
int dim = (h-2*motifItemFrame) / 2;
if ( act ) {
if ( !dis )
discol = white;
QColorGroup g2( discol, g.highlight(),
white, white,
dis ? discol : white,
discol, white );
drawArrow( p, RightArrow, FALSE,
x+w - motifArrowHMargin - motifItemFrame - dim, y+h/2-dim/2,
dim, dim, g2, TRUE );
} else {
drawArrow( p, RightArrow,
FALSE,
x+w - motifArrowHMargin - motifItemFrame - dim, y+h/2-dim/2,
dim, dim, g, mi->isEnabled() );
}
}
#endif
}
void FlatStyle::getButtonShift( int &x, int &y )
{
x = 0; y = 0;
}
//===========================================================================
FlatStyleImpl::FlatStyleImpl()
- : flat(0), ref(0)
+ : flat(0)
{
}
FlatStyleImpl::~FlatStyleImpl()
{
// We do not delete the style because Qt does that when a new style
// is set.
}
QStyle *FlatStyleImpl::style()
{
if ( !flat )
flat = new FlatStyle();
return flat;
}
QString FlatStyleImpl::name() const
{
return qApp->translate("FlatStyle", "Flat", "Name of the style Flat");
}
QRESULT FlatStyleImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
{
*iface = 0;
if ( uuid == IID_QUnknown )
*iface = this;
else if ( uuid == IID_Style )
*iface = this;
else
return QS_FALSE;
(*iface)->addRef();
return QS_OK;
}
Q_EXPORT_INTERFACE()
{
Q_CREATE_INSTANCE( FlatStyleImpl )
}
#include "flat.moc"