mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 10:52:49 +00:00
plasma: inline resize method overload
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
9dd451607a
commit
9c7e1896db
2 changed files with 5 additions and 10 deletions
|
@ -690,11 +690,6 @@ QSize Svg::size() const
|
||||||
return d->size.toSize();
|
return d->size.toSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Svg::resize(qreal width, qreal height)
|
|
||||||
{
|
|
||||||
resize(QSize(width, height));
|
|
||||||
}
|
|
||||||
|
|
||||||
void Svg::resize(const QSizeF &size)
|
void Svg::resize(const QSizeF &size)
|
||||||
{
|
{
|
||||||
if (qFuzzyCompare(size.width(), d->size.width()) &&
|
if (qFuzzyCompare(size.width(), d->size.width()) &&
|
||||||
|
|
10
plasma/svg.h
10
plasma/svg.h
|
@ -177,10 +177,9 @@ class PLASMA_EXPORT Svg : public QObject
|
||||||
* image will be scaled to this size and each element will be
|
* image will be scaled to this size and each element will be
|
||||||
* scaled appropriately.
|
* scaled appropriately.
|
||||||
*
|
*
|
||||||
* @param width the new width
|
* @param size the new size of the image
|
||||||
* @param height the new height
|
|
||||||
**/
|
**/
|
||||||
Q_INVOKABLE void resize(qreal width, qreal height);
|
Q_INVOKABLE void resize(const QSizeF &size);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resizes the rendered image.
|
* Resizes the rendered image.
|
||||||
|
@ -192,9 +191,10 @@ class PLASMA_EXPORT Svg : public QObject
|
||||||
* image will be scaled to this size and each element will be
|
* image will be scaled to this size and each element will be
|
||||||
* scaled appropriately.
|
* scaled appropriately.
|
||||||
*
|
*
|
||||||
* @param size the new size of the image
|
* @param width the new width
|
||||||
|
* @param height the new height
|
||||||
**/
|
**/
|
||||||
Q_INVOKABLE void resize(const QSizeF &size);
|
Q_INVOKABLE inline void resize(qreal width, qreal height) { resize(QSize(width, height)); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resizes the rendered image to the natural size of the SVG.
|
* Resizes the rendered image to the natural size of the SVG.
|
||||||
|
|
Loading…
Add table
Reference in a new issue