X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/7f4c3976c0626657362b6324c0dad2867cc24e9b..1b6ee5d6cd918b81c59a5163c9d6371f35f9885c:/src/kitemviews/private/kpixmapmodifier.h diff --git a/src/kitemviews/private/kpixmapmodifier.h b/src/kitemviews/private/kpixmapmodifier.h index e8ca11ac1..e48abf515 100644 --- a/src/kitemviews/private/kpixmapmodifier.h +++ b/src/kitemviews/private/kpixmapmodifier.h @@ -28,8 +28,26 @@ class QSize; class DOLPHIN_EXPORT KPixmapModifier { public: + /** + * Scale a pixmap to a given size. + * @arg scaledSize is assumed to be the scaled to the same device pixel ratio as the source pixmap + * @arg scaledSize is in device pixels + */ static void scale(QPixmap& pixmap, const QSize& scaledSize); + + /** + * Resize and paint a frame round an icon + * @arg scaledSize is in device-independent pixels + * The returned image will be scaled by the application devicePixelRatio + */ static void applyFrame(QPixmap& icon, const QSize& scaledSize); + + /** + * return and paint a frame round an icon + * @arg framesize is in device-independent pixels + * @return is in device-indepent pixels + */ + static QSize sizeInsideFrame(const QSize& frameSize); };