diff options
| author | David Edmundson <[email protected]> | 2015-03-26 16:06:52 +0100 |
|---|---|---|
| committer | David Edmundson <[email protected]> | 2015-03-26 16:06:52 +0100 |
| commit | 35c0972671c1f90f76d8d86b002b2e1f8bac79dd (patch) | |
| tree | bf2e413b7a7cf01baadec42ef2c779f6523e2a4b /src/kitemviews/private/kpixmapmodifier.h | |
| parent | 00b00d2371e0f65da0c6bf30775ae43f536ab807 (diff) | |
Make KPixmapModifier::applyFrame handle high DPI images
Diffstat (limited to 'src/kitemviews/private/kpixmapmodifier.h')
| -rw-r--r-- | src/kitemviews/private/kpixmapmodifier.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/kitemviews/private/kpixmapmodifier.h b/src/kitemviews/private/kpixmapmodifier.h index e8ca11ac1..9089a1001 100644 --- a/src/kitemviews/private/kpixmapmodifier.h +++ b/src/kitemviews/private/kpixmapmodifier.h @@ -28,8 +28,25 @@ 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 assumed to be the scaled to the same device pixel ratio as the source icon + */ 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); }; |
