Changeset View
Changeset View
Standalone View
Standalone View
kdecoration/breezebutton.cpp
Show First 20 Lines • Show All 131 Lines • ▼ Show 20 Line(s) | 121 | { | |||
---|---|---|---|---|---|
132 | if( !m_iconSize.isValid() ) m_iconSize = geometry().size().toSize(); | 132 | if( !m_iconSize.isValid() ) m_iconSize = geometry().size().toSize(); | ||
133 | 133 | | |||
134 | // menu button | 134 | // menu button | ||
135 | if (type() == DecorationButtonType::Menu) | 135 | if (type() == DecorationButtonType::Menu) | ||
136 | { | 136 | { | ||
137 | 137 | | |||
138 | const QRectF iconRect( geometry().topLeft(), m_iconSize ); | 138 | const QRectF iconRect( geometry().topLeft(), m_iconSize ); | ||
139 | const QPixmap pixmap = decoration()->client().data()->icon().pixmap( m_iconSize ); | 139 | const QPixmap pixmap = decoration()->client().data()->icon().pixmap( m_iconSize ); | ||
140 | painter->drawPixmap(iconRect.center() - QPoint(pixmap.width()/2, pixmap.height()/2), pixmap); | 140 | painter->drawPixmap(iconRect.center() - QPoint(pixmap.width()/2, pixmap.height()/2)/pixmap.devicePixelRatio(), pixmap); | ||
mart: couldn't also need a check that the resulting ratio is at least 1 or more? | |||||
141 | 141 | | |||
142 | } else { | 142 | } else { | ||
143 | 143 | | |||
144 | drawIcon( painter ); | 144 | drawIcon( painter ); | ||
145 | 145 | | |||
146 | } | 146 | } | ||
147 | 147 | | |||
148 | painter->restore(); | 148 | painter->restore(); | ||
▲ Show 20 Lines • Show All 327 Lines • Show Last 20 Lines |
couldn't also need a check that the resulting ratio is at least 1 or more?