diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt index 4d439f6fc5..bcce3dc7c7 100644 --- a/Telegram/CMakeLists.txt +++ b/Telegram/CMakeLists.txt @@ -704,6 +704,8 @@ PRIVATE lang/lang_translator.h layout/layout_document_generic_preview.cpp layout/layout_document_generic_preview.h + layout/layout_item_base.cpp + layout/layout_item_base.h main/main_account.cpp main/main_account.h main/main_app_config.cpp @@ -1123,8 +1125,6 @@ PRIVATE config.h facades.cpp facades.h - layout.cpp - layout.h logs.cpp logs.h main.cpp diff --git a/Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp b/Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp index 387ce6f46d..22a8448005 100644 --- a/Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp +++ b/Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp @@ -27,7 +27,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "core/application.h" #include "apiwrap.h" #include "api/api_attached_stickers.h" -#include "layout.h" #include "window/window_session_controller.h" #include "main/main_session.h" #include "main/main_session_settings.h" diff --git a/Telegram/SourceFiles/history/history_inner_widget.cpp b/Telegram/SourceFiles/history/history_inner_widget.cpp index f2cde1c2f7..2220b279cd 100644 --- a/Telegram/SourceFiles/history/history_inner_widget.cpp +++ b/Telegram/SourceFiles/history/history_inner_widget.cpp @@ -46,7 +46,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "base/unixtime.h" #include "mainwindow.h" #include "mainwidget.h" -#include "layout.h" #include "layout/layout_selection.h" #include "main/main_session.h" #include "main/main_session_settings.h" diff --git a/Telegram/SourceFiles/history/history_item.cpp b/Telegram/SourceFiles/history/history_item.cpp index a0e247a1dd..7a9d5ac3f3 100644 --- a/Telegram/SourceFiles/history/history_item.cpp +++ b/Telegram/SourceFiles/history/history_item.cpp @@ -9,7 +9,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "lang/lang_keys.h" #include "mainwidget.h" -#include "layout.h" #include "history/view/history_view_element.h" #include "history/view/history_view_service_message.h" #include "history/history_item_components.h" diff --git a/Telegram/SourceFiles/history/history_service.cpp b/Telegram/SourceFiles/history/history_service.cpp index d9f8190c6f..ddee3a7535 100644 --- a/Telegram/SourceFiles/history/history_service.cpp +++ b/Telegram/SourceFiles/history/history_service.cpp @@ -12,7 +12,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "main/main_session.h" #include "main/main_domain.h" // Core::App().domain().activate(). #include "apiwrap.h" -#include "layout.h" #include "history/history.h" #include "history/view/media/history_view_invoice.h" #include "history/history_message.h" diff --git a/Telegram/SourceFiles/history/view/history_view_service_message.cpp b/Telegram/SourceFiles/history/view/history_view_service_message.cpp index 0090f59f4e..4133900ab3 100644 --- a/Telegram/SourceFiles/history/view/history_view_service_message.cpp +++ b/Telegram/SourceFiles/history/view/history_view_service_message.cpp @@ -18,7 +18,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "ui/text/text_options.h" #include "ui/ui_utility.h" #include "mainwidget.h" -#include "layout.h" #include "lang/lang_keys.h" #include "styles/style_chat.h" diff --git a/Telegram/SourceFiles/history/view/media/history_view_large_emoji.cpp b/Telegram/SourceFiles/history/view/media/history_view_large_emoji.cpp index 881233ffce..d2e2042dd3 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_large_emoji.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_large_emoji.cpp @@ -14,7 +14,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "history/history.h" #include "ui/image/image.h" #include "data/data_file_origin.h" -#include "layout.h" #include "styles/style_chat.h" namespace HistoryView { diff --git a/Telegram/SourceFiles/history/view/media/history_view_sticker.cpp b/Telegram/SourceFiles/history/view/media/history_view_sticker.cpp index db1b4590f3..c76c1d284a 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_sticker.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_sticker.cpp @@ -7,7 +7,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL */ #include "history/view/media/history_view_sticker.h" -#include "layout.h" #include "boxes/sticker_set_box.h" #include "history/history.h" #include "history/history_item_components.h" diff --git a/Telegram/SourceFiles/inline_bots/inline_bot_layout_item.h b/Telegram/SourceFiles/inline_bots/inline_bot_layout_item.h index ce27c2dc1e..d4676103ac 100644 --- a/Telegram/SourceFiles/inline_bots/inline_bot_layout_item.h +++ b/Telegram/SourceFiles/inline_bots/inline_bot_layout_item.h @@ -7,7 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL */ #pragma once -#include "layout.h" +#include "layout/layout_item_base.h" #include "ui/text/text.h" class Image; diff --git a/Telegram/SourceFiles/layout/abstract_layout_item.h b/Telegram/SourceFiles/layout/abstract_layout_item.h index 9234035462..1e5125cc93 100644 --- a/Telegram/SourceFiles/layout/abstract_layout_item.h +++ b/Telegram/SourceFiles/layout/abstract_layout_item.h @@ -10,6 +10,17 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "base/runtime_composer.h" #include "ui/click_handler.h" +class PaintContextBase { +public: + PaintContextBase(crl::time ms, bool selecting) + : ms(ms) + , selecting(selecting) { + } + crl::time ms; + bool selecting; + +}; + class AbstractLayoutItem : public RuntimeComposer , public ClickHandlerHost { diff --git a/Telegram/SourceFiles/layout.cpp b/Telegram/SourceFiles/layout/layout_item_base.cpp similarity index 93% rename from Telegram/SourceFiles/layout.cpp rename to Telegram/SourceFiles/layout/layout_item_base.cpp index 617556fa16..77f2d8e47e 100644 --- a/Telegram/SourceFiles/layout.cpp +++ b/Telegram/SourceFiles/layout/layout_item_base.cpp @@ -5,7 +5,7 @@ the official desktop application for the Telegram messaging service. For license and copyright information please follow this link: https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL */ -#include "layout.h" +#include "layout/layout_item_base.h" #include "history/view/history_view_cursor_state.h" diff --git a/Telegram/SourceFiles/layout.h b/Telegram/SourceFiles/layout/layout_item_base.h similarity index 84% rename from Telegram/SourceFiles/layout.h rename to Telegram/SourceFiles/layout/layout_item_base.h index 32b22232ca..0a97d67d8a 100644 --- a/Telegram/SourceFiles/layout.h +++ b/Telegram/SourceFiles/layout/layout_item_base.h @@ -14,15 +14,6 @@ struct TextState; struct StateRequest; } // namespace HistoryView -class PaintContextBase { -public: - PaintContextBase(crl::time ms, bool selecting) : ms(ms), selecting(selecting) { - } - crl::time ms; - bool selecting; - -}; - class LayoutItemBase : public AbstractLayoutItem { public: using TextState = HistoryView::TextState; diff --git a/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp b/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp index a2ad815e4d..a7d12f0397 100644 --- a/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp +++ b/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp @@ -64,7 +64,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "main/main_domain.h" // Domain::activeSessionValue. #include "main/main_session.h" #include "main/main_session_settings.h" -#include "layout.h" #include "layout/layout_document_generic_preview.h" #include "storage/file_download.h" #include "storage/storage_account.h" diff --git a/Telegram/SourceFiles/overview/overview_layout.h b/Telegram/SourceFiles/overview/overview_layout.h index 3146b6e41e..2aaf2cb001 100644 --- a/Telegram/SourceFiles/overview/overview_layout.h +++ b/Telegram/SourceFiles/overview/overview_layout.h @@ -7,7 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL */ #pragma once -#include "layout.h" +#include "layout/layout_item_base.h" #include "layout/layout_document_generic_preview.h" #include "media/clip/media_clip_reader.h" #include "core/click_handler_types.h" diff --git a/Telegram/SourceFiles/settings/settings_calls.cpp b/Telegram/SourceFiles/settings/settings_calls.cpp index f4c0d03a25..68b6073448 100644 --- a/Telegram/SourceFiles/settings/settings_calls.cpp +++ b/Telegram/SourceFiles/settings/settings_calls.cpp @@ -19,7 +19,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "platform/platform_specific.h" #include "main/main_session.h" #include "lang/lang_keys.h" -#include "layout.h" #include "styles/style_settings.h" #include "ui/widgets/continuous_sliders.h" #include "window/window_session_controller.h"