Removed some unwanted include directives of styles in header files.

This commit is contained in:
23rd 2023-09-05 11:01:47 +03:00
parent 483909854a
commit 7ffb341597
15 changed files with 29 additions and 22 deletions

View file

@ -23,6 +23,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "core/application.h" #include "core/application.h"
#include "storage/storage_shared_media.h" #include "storage/storage_shared_media.h"
#include "layout/layout_selection.h" #include "layout/layout_selection.h"
#include "styles/style_overview.h"
namespace Info::Downloads { namespace Info::Downloads {
namespace { namespace {

View file

@ -10,6 +10,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "storage/storage_shared_media.h" #include "storage/storage_shared_media.h"
#include "layout/layout_selection.h" #include "layout/layout_selection.h"
#include "ui/painter.h" #include "ui/painter.h"
#include "styles/style_chat_helpers.h"
#include "styles/style_info.h" #include "styles/style_info.h"
namespace Info::Media { namespace Info::Media {

View file

@ -24,6 +24,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_peer_values.h" #include "data/data_peer_values.h"
#include "data/data_document.h" #include "data/data_document.h"
#include "styles/style_info.h" #include "styles/style_info.h"
#include "styles/style_overview.h"
namespace Info::Media { namespace Info::Media {
namespace { namespace {

View file

@ -10,8 +10,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "layout/abstract_layout_item.h" #include "layout/abstract_layout_item.h"
#include "layout/layout_position.h" #include "layout/layout_position.h"
#include "styles/style_chat_helpers.h"
namespace Mosaic::Layout { namespace Mosaic::Layout {
struct FoundItem { struct FoundItem {

View file

@ -9,8 +9,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/rp_widget.h" #include "ui/rp_widget.h"
#include "base/object_ptr.h" #include "base/object_ptr.h"
#include "base/unique_qptr.h"
#include "styles/style_widgets.h"
namespace Ui { namespace Ui {
class LabelSimple; class LabelSimple;

View file

@ -14,14 +14,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_web_page.h" #include "data/data_web_page.h"
#include "data/data_media_types.h" #include "data/data_media_types.h"
#include "data/data_peer.h" #include "data/data_peer.h"
#include "data/data_file_origin.h"
#include "data/data_photo_media.h" #include "data/data_photo_media.h"
#include "data/data_document_media.h" #include "data/data_document_media.h"
#include "data/data_file_click_handler.h" #include "data/data_file_click_handler.h"
#include "styles/style_overview.h"
#include "styles/style_chat.h"
#include "core/file_utilities.h"
#include "boxes/add_contact_box.h"
#include "ui/boxes/confirm_box.h" #include "ui/boxes/confirm_box.h"
#include "lang/lang_keys.h" #include "lang/lang_keys.h"
#include "layout/layout_selection.h" #include "layout/layout_selection.h"
@ -50,6 +45,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/painter.h" #include "ui/painter.h"
#include "ui/power_saving.h" #include "ui/power_saving.h"
#include "ui/ui_utility.h" #include "ui/ui_utility.h"
#include "styles/style_overview.h"
#include "styles/style_chat.h"
namespace Overview { namespace Overview {
namespace Layout { namespace Layout {

View file

@ -13,12 +13,12 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "core/click_handler_types.h" #include "core/click_handler_types.h"
#include "ui/effects/animations.h" #include "ui/effects/animations.h"
#include "ui/effects/radial_animation.h" #include "ui/effects/radial_animation.h"
#include "styles/style_overview.h"
class Image; class Image;
namespace style { namespace style {
struct RoundCheckbox; struct RoundCheckbox;
struct OverviewFileLayout;
} // namespace style } // namespace style
namespace Data { namespace Data {
@ -367,6 +367,7 @@ struct DocumentFields {
TimeId dateOverride = 0; TimeId dateOverride = 0;
bool forceFileLayout = false; bool forceFileLayout = false;
}; };
class Document final : public RadialProgressItem { class Document final : public RadialProgressItem {
public: public:
Document( Document(

View file

@ -8,7 +8,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#pragma once #pragma once
#include "ui/layers/box_content.h" #include "ui/layers/box_content.h"
#include "styles/style_widgets.h"
namespace Countries { namespace Countries {
struct Info; struct Info;

View file

@ -11,7 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/ui_utility.h" #include "ui/ui_utility.h"
#include "ui/painter.h" #include "ui/painter.h"
#include "ui/effects/outline_segments.h" #include "ui/effects/outline_segments.h"
#include "ui/image/image_prepare.h" #include "styles/style_widgets.h"
#include <QtCore/QCoreApplication> #include <QtCore/QCoreApplication>
@ -21,6 +21,10 @@ namespace {
constexpr auto kAnimationTimerDelta = crl::time(7); constexpr auto kAnimationTimerDelta = crl::time(7);
constexpr auto kWideScale = 3; constexpr auto kWideScale = 3;
[[nodiscard]] int CountFramesCount(const style::RoundCheckbox *st) {
return (st->duration / kAnimationTimerDelta) + 1;
}
class CheckCaches : public QObject { class CheckCaches : public QObject {
public: public:
CheckCaches(QObject *parent) : QObject(parent) { CheckCaches(QObject *parent) : QObject(parent) {
@ -46,7 +50,6 @@ private:
QPixmap check; QPixmap check;
}; };
int countFramesCount(const style::RoundCheckbox *st);
Frames &framesForStyle( Frames &framesForStyle(
const style::RoundCheckbox *st, const style::RoundCheckbox *st,
bool displayInactive); bool displayInactive);
@ -141,10 +144,6 @@ QRect WideDestRect(
return QRect(iconLeft, iconTop, iconSize, iconSize); return QRect(iconLeft, iconTop, iconSize, iconSize);
} }
int CheckCaches::countFramesCount(const style::RoundCheckbox *st) {
return (st->duration / kAnimationTimerDelta) + 1;
}
CheckCaches::Frames &CheckCaches::framesForStyle( CheckCaches::Frames &CheckCaches::framesForStyle(
const style::RoundCheckbox *st, const style::RoundCheckbox *st,
bool displayInactive) { bool displayInactive) {
@ -163,7 +162,7 @@ void CheckCaches::prepareFramesData(
const style::RoundCheckbox *st, const style::RoundCheckbox *st,
bool displayInactive, bool displayInactive,
Frames &frames) { Frames &frames) {
frames.list.resize(countFramesCount(st)); frames.list.resize(CountFramesCount(st));
frames.displayInactive = displayInactive; frames.displayInactive = displayInactive;
if (!frames.displayInactive) { if (!frames.displayInactive) {

View file

@ -8,7 +8,11 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#pragma once #pragma once
#include "ui/effects/animations.h" #include "ui/effects/animations.h"
#include "styles/style_widgets.h"
namespace style {
struct RoundCheckbox;
struct RoundImageCheckbox;
} // namespace style
class Painter; class Painter;
enum class ImageRoundRadius; enum class ImageRoundRadius;

View file

@ -10,6 +10,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/painter.h" #include "ui/painter.h"
#include "base/timer.h" #include "base/timer.h"
#include "base/platform/base_platform_info.h" #include "base/platform/base_platform_info.h"
#include "styles/style_widgets.h"
namespace Ui { namespace Ui {
namespace { namespace {

View file

@ -7,7 +7,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/ */
#pragma once #pragma once
#include "styles/style_widgets.h"
#include "ui/effects/animations.h" #include "ui/effects/animations.h"
#include "ui/rp_widget.h" #include "ui/rp_widget.h"
@ -15,6 +14,11 @@ namespace base {
class Timer; class Timer;
} // namespace base } // namespace base
namespace style {
struct FilledSlider;
struct MediaSlider;
} // namespace style
namespace Ui { namespace Ui {
class ContinuousSlider : public RpWidget { class ContinuousSlider : public RpWidget {

View file

@ -9,7 +9,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/effects/ripple_animation.h" #include "ui/effects/ripple_animation.h"
#include "ui/painter.h" #include "ui/painter.h"
#include "styles/style_widgets.h"
namespace Ui { namespace Ui {

View file

@ -8,6 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/widgets/level_meter.h" #include "ui/widgets/level_meter.h"
#include "ui/painter.h" #include "ui/painter.h"
#include "styles/style_widgets.h"
namespace Ui { namespace Ui {

View file

@ -7,9 +7,12 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/ */
#pragma once #pragma once
#include "styles/style_widgets.h"
#include "ui/rp_widget.h" #include "ui/rp_widget.h"
namespace style {
struct LevelMeter;
} // namespace style
namespace Ui { namespace Ui {
class LevelMeter : public RpWidget { class LevelMeter : public RpWidget {