Changeset View
Changeset View
Standalone View
Standalone View
kdecoration/oxygenbutton.cpp
Show First 20 Lines • Show All 223 Lines • ▼ Show 20 Line(s) | 214 | { | |||
---|---|---|---|---|---|
224 | 224 | | |||
225 | if( !m_iconSize.isValid() ) m_iconSize = geometry().size().toSize(); | 225 | if( !m_iconSize.isValid() ) m_iconSize = geometry().size().toSize(); | ||
226 | 226 | | |||
227 | // menu buttons | 227 | // menu buttons | ||
228 | if( isMenuButton() ) | 228 | if( isMenuButton() ) | ||
229 | { | 229 | { | ||
230 | 230 | | |||
231 | const QRectF iconRect( geometry().topLeft(), m_iconSize ); | 231 | const QRectF iconRect( geometry().topLeft(), m_iconSize ); | ||
232 | const QPixmap pixmap = decoration()->client().data()->icon().pixmap( m_iconSize.width() ); | 232 | decoration()->client().data()->icon().paint(painter, iconRect.toRect()); | ||
233 | painter->drawPixmap(iconRect.center() - QPoint(pixmap.width()/2, pixmap.height()/2), pixmap); | | |||
234 | painter->restore(); | 233 | painter->restore(); | ||
235 | return; | 234 | return; | ||
236 | 235 | | |||
237 | } | 236 | } | ||
238 | 237 | | |||
239 | // palette | 238 | // palette | ||
240 | QPalette palette( decoration().data()->client().data()->palette() ); | 239 | QPalette palette( decoration().data()->client().data()->palette() ); | ||
241 | palette.setCurrentColorGroup( isActive() ? QPalette::Active : QPalette::Inactive); | 240 | palette.setCurrentColorGroup( isActive() ? QPalette::Active : QPalette::Inactive); | ||
▲ Show 20 Lines • Show All 192 Lines • Show Last 20 Lines |