mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Moved some photo editor files to td_ui.
This commit is contained in:
@@ -86,8 +86,8 @@ void ItemCanvas::clearPixmap() {
|
||||
_p = nullptr;
|
||||
|
||||
_pixmap = QPixmap(
|
||||
(scene()->sceneRect().size() * cIntRetinaFactor()).toSize());
|
||||
_pixmap.setDevicePixelRatio(cRetinaFactor());
|
||||
(scene()->sceneRect().size() * style::DevicePixelRatio()).toSize());
|
||||
_pixmap.setDevicePixelRatio(style::DevicePixelRatio());
|
||||
_pixmap.fill(Qt::transparent);
|
||||
|
||||
_p = std::make_unique<Painter>(&_pixmap);
|
||||
@@ -170,10 +170,10 @@ void ItemCanvas::handleMouseReleaseEvent(
|
||||
|
||||
if (_contentRect.isValid()) {
|
||||
const auto scaledContentRect = QRectF(
|
||||
_contentRect.x() * cRetinaFactor(),
|
||||
_contentRect.y() * cRetinaFactor(),
|
||||
_contentRect.width() * cRetinaFactor(),
|
||||
_contentRect.height() * cRetinaFactor());
|
||||
_contentRect.x() * style::DevicePixelRatio(),
|
||||
_contentRect.y() * style::DevicePixelRatio(),
|
||||
_contentRect.width() * style::DevicePixelRatio(),
|
||||
_contentRect.height() * style::DevicePixelRatio());
|
||||
|
||||
_grabContentRequests.fire({
|
||||
.pixmap = _pixmap.copy(scaledContentRect.toRect()),
|
||||
|
@@ -13,7 +13,7 @@ namespace Editor {
|
||||
|
||||
ItemLine::ItemLine(const QPixmap &&pixmap)
|
||||
: _pixmap(std::move(pixmap))
|
||||
, _rect(QPointF(), _pixmap.size() / cRetinaFactor()) {
|
||||
, _rect(QPointF(), _pixmap.size() / float64(style::DevicePixelRatio())) {
|
||||
}
|
||||
|
||||
QRectF ItemLine::boundingRect() const {
|
||||
|
Reference in New Issue
Block a user