From 58fcedab64f15b4281e017b3383ef6790ecc6af2 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Sun, 24 Mar 2024 00:34:39 +0300 Subject: [PATCH] Moved out Window::SlideAnimation to td_ui. --- Telegram/CMakeLists.txt | 2 -- Telegram/SourceFiles/window/window_slide_animation.cpp | 7 ++++--- Telegram/cmake/td_ui.cmake | 3 +++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt index d7809bd3e..55c5cbf82 100644 --- a/Telegram/CMakeLists.txt +++ b/Telegram/CMakeLists.txt @@ -1495,8 +1495,6 @@ PRIVATE window/window_session_controller.cpp window/window_session_controller.h window/window_session_controller_link_info.h - window/window_slide_animation.cpp - window/window_slide_animation.h window/window_top_bar_wrap.h window/themes/window_theme.cpp window/themes/window_theme.h diff --git a/Telegram/SourceFiles/window/window_slide_animation.cpp b/Telegram/SourceFiles/window/window_slide_animation.cpp index 5f32d481d..54a843559 100644 --- a/Telegram/SourceFiles/window/window_slide_animation.cpp +++ b/Telegram/SourceFiles/window/window_slide_animation.cpp @@ -53,9 +53,10 @@ void SlideAnimation::paintContents(QPainter &p) const { 0, 0, _cacheUnder, - (_cacheUnder.width() - leftWidth * cIntRetinaFactor()), + _cacheUnder.width() + - leftWidth * style::DevicePixelRatio(), 0, - leftWidth * cIntRetinaFactor(), + leftWidth * style::DevicePixelRatio(), _topSkip * retina); } @@ -67,7 +68,7 @@ void SlideAnimation::paintContents(QPainter &p) const { _cacheOver, 0, 0, - rightWidth * cIntRetinaFactor(), + rightWidth * style::DevicePixelRatio(), _topSkip * retina); } diff --git a/Telegram/cmake/td_ui.cmake b/Telegram/cmake/td_ui.cmake index 885598b7c..eb1c7d79c 100644 --- a/Telegram/cmake/td_ui.cmake +++ b/Telegram/cmake/td_ui.cmake @@ -402,6 +402,9 @@ PRIVATE ui/widgets/fields/time_part_input_with_placeholder.cpp ui/widgets/fields/time_part_input_with_placeholder.h + window/window_slide_animation.cpp + window/window_slide_animation.h + ui/ui_pch.h )