2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Remove twidget header.

This commit is contained in:
John Preston
2019-09-13 15:22:54 +03:00
parent e2f54eb3e9
commit c5845f17ae
188 changed files with 1070 additions and 907 deletions

View File

@@ -11,6 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/widgets/buttons.h"
#include "ui/widgets/shadow.h"
#include "ui/emoji_config.h"
#include "ui/ui_utility.h"
#include "lang/lang_keys.h"
#include "emoji_suggestions_data.h"
#include "emoji_suggestions_helper.h"

View File

@@ -294,7 +294,7 @@ void Loader::setImplementation(
void Loader::unpack(const QString &path) {
const auto folder = internal::SetDataPath(_id);
const auto weak = make_weak(this);
const auto weak = Ui::MakeWeak(this);
crl::async([=] {
if (UnpackSet(path, folder)) {
QFile(path).remove();
@@ -401,7 +401,7 @@ void Row::paintRadio(Painter &p) {
pen.setCapStyle(Qt::RoundCap);
p.setPen(pen);
p.setBrush(_st->bg);
const auto rect = rtlrect(QRectF(
const auto rect = style::rtlrect(QRectF(
left,
top,
_st->diameter,
@@ -432,7 +432,7 @@ void Row::paintRadio(Painter &p) {
const auto skip0 = _st->diameter / 2.;
const auto skip1 = _st->skip / 10.;
const auto checkSkip = skip0 * (1. - toggled) + skip1 * toggled;
p.drawEllipse(rtlrect(QRectF(
p.drawEllipse(style::rtlrect(QRectF(
left,
top,
_st->diameter,

View File

@@ -14,6 +14,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/widgets/inner_dropdown.h"
#include "ui/widgets/input_fields.h"
#include "ui/emoji_config.h"
#include "ui/ui_utility.h"
#include "platform/platform_specific.h"
#include "core/application.h"
#include "core/event_filter.h"

View File

@@ -18,6 +18,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "lottie/lottie_single_player.h"
#include "ui/widgets/scroll_area.h"
#include "ui/image/image.h"
#include "ui/ui_utility.h"
#include "main/main_session.h"
#include "chat_helpers/stickers.h"
#include "base/unixtime.h"

View File

@@ -10,6 +10,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/effects/animations.h"
#include "ui/rp_widget.h"
#include "base/timer.h"
#include "base/object_ptr.h"
#include "chat_helpers/stickers.h"
namespace Ui {

View File

@@ -15,6 +15,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "boxes/abstract_box.h"
#include "ui/wrap/vertical_layout.h"
#include "ui/widgets/popup_menu.h"
#include "ui/ui_utility.h"
#include "data/data_session.h"
#include "data/data_user.h"
#include "core/event_filter.h"
@@ -153,7 +154,7 @@ void EditLinkBox::prepare() {
url->showError();
return;
}
const auto weak = make_weak(this);
const auto weak = Ui::MakeWeak(this);
_callback(linkText, linkUrl);
if (weak) {
closeBox();
@@ -354,7 +355,7 @@ Fn<bool(
EditLinkAction action)> DefaultEditLinkCallback(
not_null<Main::Session*> session,
not_null<Ui::InputField*> field) {
const auto weak = make_weak(field);
const auto weak = Ui::MakeWeak(field);
return [=](
EditLinkSelection selection,
QString text,

View File

@@ -465,13 +465,13 @@ void StickersListWidget::Footer::paintLeftRightFading(Painter &p) const {
auto o_left = snap(_iconsX.current() / st::stickerIconLeft.width(), 0., 1.);
if (o_left > 0) {
p.setOpacity(o_left);
st::stickerIconLeft.fill(p, rtlrect(_iconsLeft, _iconsTop, st::stickerIconLeft.width(), st::emojiFooterHeight, width()));
st::stickerIconLeft.fill(p, style::rtlrect(_iconsLeft, _iconsTop, st::stickerIconLeft.width(), st::emojiFooterHeight, width()));
p.setOpacity(1.);
}
auto o_right = snap((_iconsMax - _iconsX.current()) / st::stickerIconRight.width(), 0., 1.);
if (o_right > 0) {
p.setOpacity(o_right);
st::stickerIconRight.fill(p, rtlrect(width() - _iconsRight - st::stickerIconRight.width(), _iconsTop, st::stickerIconRight.width(), st::emojiFooterHeight, width()));
st::stickerIconRight.fill(p, style::rtlrect(width() - _iconsRight - st::stickerIconRight.width(), _iconsTop, st::stickerIconRight.width(), st::emojiFooterHeight, width()));
p.setOpacity(1.);
}
}
@@ -1396,7 +1396,7 @@ void StickersListWidget::paintStickers(Painter &p, QRect clip) {
{
PainterHighQualityEnabler hq(p);
p.drawEllipse(rtlrect(st::emojiPanHeaderLeft - st::buttonRadius + titleWidth + st::stickersFeaturedUnreadSkip, info.top + st::stickersTrendingHeaderTop + st::stickersFeaturedUnreadTop, st::stickersFeaturedUnreadSize, st::stickersFeaturedUnreadSize, width()));
p.drawEllipse(style::rtlrect(st::emojiPanHeaderLeft - st::buttonRadius + titleWidth + st::stickersFeaturedUnreadSkip, info.top + st::stickersTrendingHeaderTop + st::stickersFeaturedUnreadTop, st::stickersFeaturedUnreadSize, st::stickersFeaturedUnreadSize, width()));
}
}

View File

@@ -9,6 +9,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/widgets/shadow.h"
#include "ui/image/image_prepare.h"
#include "ui/ui_utility.h"
#include "chat_helpers/tabbed_selector.h"
#include "window/window_session_controller.h"
#include "mainwindow.h"

View File

@@ -10,6 +10,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/effects/animations.h"
#include "ui/rp_widget.h"
#include "base/timer.h"
#include "base/object_ptr.h"
namespace Window {
class SessionController;

View File

@@ -12,6 +12,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/effects/panel_animation.h"
#include "mtproto/sender.h"
#include "main/main_session.h"
#include "base/object_ptr.h"
namespace InlineBots {
class Result;