Moved some photo editor files to td_ui.

This commit is contained in:
23rd 2022-01-10 08:14:40 +03:00 committed by John Preston
parent f8be5731a5
commit 39d5d3a1cf
4 changed files with 25 additions and 24 deletions

View file

@ -525,33 +525,16 @@ PRIVATE
editor/controllers/controllers.h editor/controllers/controllers.h
editor/controllers/stickers_panel_controller.cpp editor/controllers/stickers_panel_controller.cpp
editor/controllers/stickers_panel_controller.h editor/controllers/stickers_panel_controller.h
editor/controllers/undo_controller.cpp
editor/controllers/undo_controller.h
editor/editor_crop.cpp
editor/editor_crop.h
editor/editor_paint.cpp editor/editor_paint.cpp
editor/editor_paint.h editor/editor_paint.h
editor/photo_editor.cpp editor/photo_editor.cpp
editor/photo_editor.h editor/photo_editor.h
editor/photo_editor_common.cpp
editor/photo_editor_common.h
editor/photo_editor_content.cpp editor/photo_editor_content.cpp
editor/photo_editor_content.h editor/photo_editor_content.h
editor/photo_editor_controls.cpp editor/photo_editor_controls.cpp
editor/photo_editor_controls.h editor/photo_editor_controls.h
editor/photo_editor_inner_common.h
editor/photo_editor_layer_widget.cpp editor/photo_editor_layer_widget.cpp
editor/photo_editor_layer_widget.h editor/photo_editor_layer_widget.h
editor/scene/scene.cpp
editor/scene/scene.h
editor/scene/scene_item_base.cpp
editor/scene/scene_item_base.h
editor/scene/scene_item_canvas.cpp
editor/scene/scene_item_canvas.h
editor/scene/scene_item_image.cpp
editor/scene/scene_item_image.h
editor/scene/scene_item_line.cpp
editor/scene/scene_item_line.h
editor/scene/scene_item_sticker.cpp editor/scene/scene_item_sticker.cpp
editor/scene/scene_item_sticker.h editor/scene/scene_item_sticker.h
export/export_manager.cpp export/export_manager.cpp

View file

@ -86,8 +86,8 @@ void ItemCanvas::clearPixmap() {
_p = nullptr; _p = nullptr;
_pixmap = QPixmap( _pixmap = QPixmap(
(scene()->sceneRect().size() * cIntRetinaFactor()).toSize()); (scene()->sceneRect().size() * style::DevicePixelRatio()).toSize());
_pixmap.setDevicePixelRatio(cRetinaFactor()); _pixmap.setDevicePixelRatio(style::DevicePixelRatio());
_pixmap.fill(Qt::transparent); _pixmap.fill(Qt::transparent);
_p = std::make_unique<Painter>(&_pixmap); _p = std::make_unique<Painter>(&_pixmap);
@ -170,10 +170,10 @@ void ItemCanvas::handleMouseReleaseEvent(
if (_contentRect.isValid()) { if (_contentRect.isValid()) {
const auto scaledContentRect = QRectF( const auto scaledContentRect = QRectF(
_contentRect.x() * cRetinaFactor(), _contentRect.x() * style::DevicePixelRatio(),
_contentRect.y() * cRetinaFactor(), _contentRect.y() * style::DevicePixelRatio(),
_contentRect.width() * cRetinaFactor(), _contentRect.width() * style::DevicePixelRatio(),
_contentRect.height() * cRetinaFactor()); _contentRect.height() * style::DevicePixelRatio());
_grabContentRequests.fire({ _grabContentRequests.fire({
.pixmap = _pixmap.copy(scaledContentRect.toRect()), .pixmap = _pixmap.copy(scaledContentRect.toRect()),

View file

@ -13,7 +13,7 @@ namespace Editor {
ItemLine::ItemLine(const QPixmap &&pixmap) ItemLine::ItemLine(const QPixmap &&pixmap)
: _pixmap(std::move(pixmap)) : _pixmap(std::move(pixmap))
, _rect(QPointF(), _pixmap.size() / cRetinaFactor()) { , _rect(QPointF(), _pixmap.size() / float64(style::DevicePixelRatio())) {
} }
QRectF ItemLine::boundingRect() const { QRectF ItemLine::boundingRect() const {

View file

@ -63,6 +63,24 @@ PRIVATE
countries/countries_instance.cpp countries/countries_instance.cpp
countries/countries_instance.h countries/countries_instance.h
editor/controllers/undo_controller.cpp
editor/controllers/undo_controller.h
editor/editor_crop.cpp
editor/editor_crop.h
editor/photo_editor_common.cpp
editor/photo_editor_common.h
editor/photo_editor_inner_common.h
editor/scene/scene.cpp
editor/scene/scene.h
editor/scene/scene_item_base.cpp
editor/scene/scene_item_base.h
editor/scene/scene_item_canvas.cpp
editor/scene/scene_item_canvas.h
editor/scene/scene_item_image.cpp
editor/scene/scene_item_image.h
editor/scene/scene_item_line.cpp
editor/scene/scene_item_line.h
layout/abstract_layout_item.cpp layout/abstract_layout_item.cpp
layout/abstract_layout_item.h layout/abstract_layout_item.h
layout/layout_mosaic.cpp layout/layout_mosaic.cpp