[plasma/kwin] src/core: Port snapToPixels() to RectF
Vlad Zahorodnii <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 2501857e44514d0ab7fe9fd66f63fa7021609f53 by Vlad Zahorodnii.
Committed on 22/07/2026 at 06:51.
Pushed by vladz into branch 'master'.
Port snapToPixels() to RectF
M +3 -6 src/core/pixelgrid.h
https://invent.kde.org/plasma/kwin/-/commit/2501857e44514d0ab7fe9fd66f63fa7021609f53
diff --git a/src/core/pixelgrid.h b/src/core/pixelgrid.h
index cb664240332..4b6e64536c9 100644
--- a/src/core/pixelgrid.h
+++ b/src/core/pixelgrid.h
@@ -6,10 +6,7 @@
#pragma once
-#include "kwin_export.h"
-
-#include <QPointF>
-#include <QRect>
+#include "core/rect.h"
namespace KWin
{
@@ -29,11 +26,11 @@ KWIN_EXPORT constexpr QSizeF snapToPixels(const QSizeF &logicalValue, double sca
return QSizeF(snapToPixels(logicalValue.width(), scale), snapToPixels(logicalValue.height(), scale));
}
-KWIN_EXPORT constexpr QRectF snapToPixels(const QRectF &logicalValue, double scale)
+KWIN_EXPORT constexpr RectF snapToPixels(const RectF &logicalValue, double scale)
{
const QPointF topLeft = snapToPixels(logicalValue.topLeft(), scale);
const QPointF bottomRight = snapToPixels(logicalValue.bottomRight(), scale);
- return QRectF(topLeft, bottomRight);
+ return RectF(topLeft, bottomRight);
}
} // namespace KWin