Move standard buttons to lib_ui.

This commit is contained in:
John Preston 2019-09-13 19:45:48 +03:00
parent a16c6ca41a
commit c057f28425
45 changed files with 330 additions and 150 deletions

View File

@ -0,0 +1,18 @@
/*
This file is part of Telegram Desktop,
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
*/
#pragma once
#include "base/basic_types.h"
// Methods that must be implemented outside lib_base.
namespace base {
void EnterFromEventLoop(FnMut<void()> &&method);
} // namespace

View File

@ -7,9 +7,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/ */
#pragma once #pragma once
#include "core/sandbox.h" #include "base/base_integration.h"
namespace Core { namespace base {
// This method allows to create an rpl::producer from a Qt object // This method allows to create an rpl::producer from a Qt object
// and a signal with none or one reported value. // and a signal with none or one reported value.
@ -20,28 +20,28 @@ namespace Core {
// This means that all postponeCall's will be invoked right after // This means that all postponeCall's will be invoked right after
// the value processing by the current consumer finishes. // the value processing by the current consumer finishes.
template <typename Object, typename Signal> template <typename Object, typename Signal>
auto QtSignalProducer(Object *object, Signal signal); auto qt_signal_producer(Object *object, Signal signal);
namespace details { namespace details {
template <typename Signal> template <typename Signal>
struct QtSignalArgument; struct qt_signal_argument;
template <typename Class, typename Return, typename Value> template <typename Class, typename Return, typename Value>
struct QtSignalArgument<Return(Class::*)(Value)> { struct qt_signal_argument<Return(Class::*)(Value)> {
using type = Value; using type = Value;
}; };
template <typename Class, typename Return> template <typename Class, typename Return>
struct QtSignalArgument<Return(Class::*)()> { struct qt_signal_argument<Return(Class::*)()> {
using type = void; using type = void;
}; };
} // namespace details } // namespace details
template <typename Object, typename Signal> template <typename Object, typename Signal>
auto QtSignalProducer(Object *object, Signal signal) { auto qt_signal_producer(Object *object, Signal signal) {
using Value = typename details::QtSignalArgument<Signal>::type; using Value = typename details::qt_signal_argument<Signal>::type;
static constexpr auto NoArgument = std::is_same_v<Value, void>; static constexpr auto NoArgument = std::is_same_v<Value, void>;
using Produced = std::conditional_t< using Produced = std::conditional_t<
NoArgument, NoArgument,
@ -67,7 +67,7 @@ auto QtSignalProducer(Object *object, Signal signal) {
}); });
}; };
auto put = [=](const Produced &value) { auto put = [=](const Produced &value) {
Sandbox::Instance().customEnterFromEventLoop([&] { EnterFromEventLoop([&] {
consumer.put_next_copy(value); consumer.put_next_copy(value);
}); });
}; };
@ -79,4 +79,4 @@ auto QtSignalProducer(Object *object, Signal signal) {
}); });
} }
} // namespace Core } // namespace base

View File

@ -14,7 +14,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "window/window_session_controller.h" #include "window/window_session_controller.h"
#include "mainwindow.h" #include "mainwindow.h"
#include "core/application.h" #include "core/application.h"
#include "core/qt_signal_producer.h"
#include "app.h" #include "app.h"
#include "styles/style_chat_helpers.h" #include "styles/style_chat_helpers.h"

View File

@ -184,6 +184,15 @@ void Application::run() {
Ui::Emoji::Init(); Ui::Emoji::Init();
Media::Player::start(_audio.get()); Media::Player::start(_audio.get());
style::ShortAnimationPlaying(
) | rpl::start_with_next([=](bool playing) {
if (playing) {
MTP::internal::pause();
} else {
MTP::internal::unpause();
}
}, _lifetime);
DEBUG_LOG(("Application Info: inited...")); DEBUG_LOG(("Application Info: inited..."));
cChangeTimeFormat(QLocale::system().timeFormat(QLocale::ShortFormat)); cChangeTimeFormat(QLocale::system().timeFormat(QLocale::ShortFormat));
@ -732,7 +741,7 @@ QPoint Application::getPointForCallPanelCenter() const {
} }
// macOS Qt bug workaround, sometimes no leaveEvent() gets to the nested widgets. // macOS Qt bug workaround, sometimes no leaveEvent() gets to the nested widgets.
void Application::registerLeaveSubscription(QWidget *widget) { void Application::registerLeaveSubscription(not_null<QWidget*> widget) {
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
if (const auto topLevel = widget->window()) { if (const auto topLevel = widget->window()) {
if (topLevel == _window->widget()) { if (topLevel == _window->widget()) {
@ -750,7 +759,7 @@ void Application::registerLeaveSubscription(QWidget *widget) {
#endif // Q_OS_MAC #endif // Q_OS_MAC
} }
void Application::unregisterLeaveSubscription(QWidget *widget) { void Application::unregisterLeaveSubscription(not_null<QWidget*> widget) {
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
_leaveSubscriptions = std::move( _leaveSubscriptions = std::move(
_leaveSubscriptions _leaveSubscriptions
@ -869,4 +878,12 @@ void PostponeCall(FnMut<void()> &&callable) {
Core::App().postponeCall(std::move(callable)); Core::App().postponeCall(std::move(callable));
} }
void RegisterLeaveSubscription(not_null<QWidget*> widget) {
Core::App().registerLeaveSubscription(widget);
}
void UnregisterLeaveSubscription(not_null<QWidget*> widget) {
Core::App().unregisterLeaveSubscription(widget);
}
} // namespace Ui } // namespace Ui

View File

@ -199,8 +199,8 @@ public:
[[nodiscard]] crl::time lastNonIdleTime() const; [[nodiscard]] crl::time lastNonIdleTime() const;
void updateNonIdle(); void updateNonIdle();
void registerLeaveSubscription(QWidget *widget); void registerLeaveSubscription(not_null<QWidget*> widget);
void unregisterLeaveSubscription(QWidget *widget); void unregisterLeaveSubscription(not_null<QWidget*> widget);
// Sandbox interface. // Sandbox interface.
void postponeCall(FnMut<void()> &&callable); void postponeCall(FnMut<void()> &&callable);

View File

@ -613,3 +613,11 @@ rpl::producer<> on_main_update_requests() {
} }
} // namespace crl } // namespace crl
namespace base {
void EnterFromEventLoop(FnMut<void()> &&method) {
Core::Sandbox::Instance().customEnterFromEventLoop(std::move(method));
}
} // namespace base

View File

@ -121,7 +121,7 @@ InnerWidget::InnerWidget(
? Global::DialogsMode() ? Global::DialogsMode()
: Dialogs::Mode::All; : Dialogs::Mode::All;
connect(_addContactLnk, SIGNAL(clicked()), App::wnd(), SLOT(onShowAddContact())); _addContactLnk->addClickHandler([] { App::wnd()->onShowAddContact(); });
_cancelSearchInChat->setClickedCallback([=] { cancelSearchInChat(); }); _cancelSearchInChat->setClickedCallback([=] { cancelSearchInChat(); });
_cancelSearchInChat->hide(); _cancelSearchInChat->hide();
_cancelSearchFromUser->setClickedCallback([=] { _cancelSearchFromUser->setClickedCallback([=] {

View File

@ -12,7 +12,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/ui_utility.h" #include "ui/ui_utility.h"
#include "lang/lang_keys.h" #include "lang/lang_keys.h"
#include "core/event_filter.h" #include "core/event_filter.h"
#include "core/qt_signal_producer.h" #include "base/qt_signal_producer.h"
#include "history/history.h" #include "history/history.h"
#include "chat_helpers/tabbed_panel.h" #include "chat_helpers/tabbed_panel.h"
#include "chat_helpers/tabbed_section.h" #include "chat_helpers/tabbed_section.h"
@ -94,7 +94,7 @@ rpl::producer<> ComposeControls::cancelRequests() const {
rpl::producer<> ComposeControls::sendRequests() const { rpl::producer<> ComposeControls::sendRequests() const {
auto toEmpty = rpl::map([] { return rpl::empty_value(); }); auto toEmpty = rpl::map([] { return rpl::empty_value(); });
auto submits = Core::QtSignalProducer( auto submits = base::qt_signal_producer(
_field.get(), _field.get(),
&Ui::InputField::submitted); &Ui::InputField::submitted);
return rpl::merge( return rpl::merge(

View File

@ -447,7 +447,7 @@ void Inner::refreshSwitchPmButton(const CacheEntry *entry) {
_switchPmButton.create(this, nullptr, st::switchPmButton); _switchPmButton.create(this, nullptr, st::switchPmButton);
_switchPmButton->show(); _switchPmButton->show();
_switchPmButton->setTextTransform(Ui::RoundButton::TextTransform::NoTransform); _switchPmButton->setTextTransform(Ui::RoundButton::TextTransform::NoTransform);
connect(_switchPmButton, SIGNAL(clicked()), this, SLOT(onSwitchPm())); _switchPmButton->addClickHandler([=] { onSwitchPm(); });
} }
_switchPmButton->setText(rpl::single(entry->switchPmText)); _switchPmButton->setText(rpl::single(entry->switchPmText));
_switchPmStartToken = entry->switchPmStartToken; _switchPmStartToken = entry->switchPmStartToken;

View File

@ -91,7 +91,7 @@ CodeWidget::CodeWidget(
connect(_code, SIGNAL(changed()), this, SLOT(onInputChange())); connect(_code, SIGNAL(changed()), this, SLOT(onInputChange()));
connect(_callTimer, SIGNAL(timeout()), this, SLOT(onSendCall())); connect(_callTimer, SIGNAL(timeout()), this, SLOT(onSendCall()));
connect(_checkRequest, SIGNAL(timeout()), this, SLOT(onCheckRequest())); connect(_checkRequest, SIGNAL(timeout()), this, SLOT(onCheckRequest()));
connect(_noTelegramCode, SIGNAL(clicked()), this, SLOT(onNoTelegramCode())); _noTelegramCode->addClickHandler([=] { onNoTelegramCode(); });
_code->setDigitsCountMax(getData()->codeLength); _code->setDigitsCountMax(getData()->codeLength);
setErrorBelowLink(true); setErrorBelowLink(true);

View File

@ -41,8 +41,8 @@ PwdCheckWidget::PwdCheckWidget(
subscribe(Lang::Current().updated(), [this] { refreshLang(); }); subscribe(Lang::Current().updated(), [this] { refreshLang(); });
connect(_checkRequest, SIGNAL(timeout()), this, SLOT(onCheckRequest())); connect(_checkRequest, SIGNAL(timeout()), this, SLOT(onCheckRequest()));
connect(_toRecover, SIGNAL(clicked()), this, SLOT(onToRecover())); _toRecover->addClickHandler([=] { onToRecover(); });
connect(_toPassword, SIGNAL(clicked()), this, SLOT(onToPassword())); _toPassword->addClickHandler([=] { onToPassword(); });
connect(_pwdField, SIGNAL(changed()), this, SLOT(onInputChange())); connect(_pwdField, SIGNAL(changed()), this, SLOT(onInputChange()));
connect(_codeField, SIGNAL(changed()), this, SLOT(onInputChange())); connect(_codeField, SIGNAL(changed()), this, SLOT(onInputChange()));

View File

@ -313,9 +313,9 @@ OverlayWidget::OverlayWidget()
_controlsHideTimer.setSingleShot(true); _controlsHideTimer.setSingleShot(true);
connect(&_controlsHideTimer, SIGNAL(timeout()), this, SLOT(onHideControls())); connect(&_controlsHideTimer, SIGNAL(timeout()), this, SLOT(onHideControls()));
connect(_docDownload, SIGNAL(clicked()), this, SLOT(onDownload())); _docDownload->addClickHandler([=] { onDownload(); });
connect(_docSaveAs, SIGNAL(clicked()), this, SLOT(onSaveAs())); _docSaveAs->addClickHandler([=] { onSaveAs(); });
connect(_docCancel, SIGNAL(clicked()), this, SLOT(onSaveCancel())); _docCancel->addClickHandler([=] { onSaveCancel(); });
_dropdown->setHiddenCallback([this] { dropdownHidden(); }); _dropdown->setHiddenCallback([this] { dropdownHidden(); });
_dropdownShowTimer->setSingleShot(true); _dropdownShowTimer->setSingleShot(true);

View File

@ -13,36 +13,12 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
namespace MTP { namespace MTP {
namespace internal { namespace internal {
bool paused(); [[nodiscard]] bool paused();
void pause(); void pause();
void unpause(); void unpause();
} // namespace internal } // namespace internal
class PauseHolder {
public:
PauseHolder() {
restart();
}
void restart() {
if (!std::exchange(_paused, true)) {
internal::pause();
}
}
void release() {
if (std::exchange(_paused, false)) {
internal::unpause();
}
}
~PauseHolder() {
release();
}
private:
bool _paused = false;
};
// send(MTPhelp_GetConfig(), MTP::configDcId(dc)) - for dc enumeration // send(MTPhelp_GetConfig(), MTP::configDcId(dc)) - for dc enumeration
constexpr ShiftedDcId configDcId(DcId dcId) { constexpr ShiftedDcId configDcId(DcId dcId) {
return ShiftDcId(dcId, kConfigDcShift); return ShiftDcId(dcId, kConfigDcShift);

View File

@ -46,7 +46,7 @@ void BackButton::paintEvent(QPaintEvent *e) {
void BackButton::onStateChanged(State was, StateChangeSource source) { void BackButton::onStateChanged(State was, StateChangeSource source) {
if (isDown() && !(was & StateFlag::Down)) { if (isDown() && !(was & StateFlag::Down)) {
emit clicked(); clicked(Qt::KeyboardModifiers(), Qt::LeftButton);
} }
} }

View File

@ -38,9 +38,7 @@ protected:
int resizeGetHeight(int newWidth) override = 0; int resizeGetHeight(int newWidth) override = 0;
void contentSizeUpdated() { void contentSizeUpdated() {
auto oldHeight = height();
resizeToWidth(width()); resizeToWidth(width());
emit heightUpdated();
} }
PeerData *peer() const { PeerData *peer() const {

View File

@ -7,8 +7,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/ */
#include "ui/abstract_button.h" #include "ui/abstract_button.h"
#include "core/application.h"
#include "ui/ui_utility.h" #include "ui/ui_utility.h"
#include "ui/ui_integration.h"
#include <QtGui/QtEvents>
#include <rpl/filter.h> #include <rpl/filter.h>
#include <rpl/mappers.h> #include <rpl/mappers.h>
@ -71,28 +73,33 @@ void AbstractButton::mouseReleaseEvent(QMouseEvent *e) {
const auto was = _state; const auto was = _state;
_state &= ~State(StateFlag::Down); _state &= ~State(StateFlag::Down);
auto weak = MakeWeak(this); const auto weak = MakeWeak(this);
onStateChanged(was, StateChangeSource::ByPress); onStateChanged(was, StateChangeSource::ByPress);
if (!weak) { if (!weak) {
return; return;
} }
if (was & StateFlag::Over) { if (was & StateFlag::Over) {
_modifiers = e->modifiers(); clicked(e->modifiers(), e->button());
if (const auto callback = _clickedCallback) {
callback();
} else {
emit clicked();
}
if (weak) {
_clicks.fire(e->button());
}
} else { } else {
setOver(false, StateChangeSource::ByHover); setOver(false, StateChangeSource::ByHover);
} }
} }
} }
void AbstractButton::clicked(
Qt::KeyboardModifiers modifiers,
Qt::MouseButton button) {
_modifiers = modifiers;
const auto weak = MakeWeak(this);
if (const auto callback = _clickedCallback) {
callback();
}
if (weak) {
_clicks.fire_copy(button);
}
}
void AbstractButton::setPointerCursor(bool enablePointerCursor) { void AbstractButton::setPointerCursor(bool enablePointerCursor) {
if (_enablePointerCursor != enablePointerCursor) { if (_enablePointerCursor != enablePointerCursor) {
_enablePointerCursor = enablePointerCursor; _enablePointerCursor = enablePointerCursor;
@ -104,12 +111,12 @@ void AbstractButton::setOver(bool over, StateChangeSource source) {
if (over && !(_state & StateFlag::Over)) { if (over && !(_state & StateFlag::Over)) {
auto was = _state; auto was = _state;
_state |= StateFlag::Over; _state |= StateFlag::Over;
Core::App().registerLeaveSubscription(this); RegisterLeaveSubscription(this);
onStateChanged(was, source); onStateChanged(was, source);
} else if (!over && (_state & StateFlag::Over)) { } else if (!over && (_state & StateFlag::Over)) {
auto was = _state; auto was = _state;
_state &= ~State(StateFlag::Over); _state &= ~State(StateFlag::Over);
Core::App().unregisterLeaveSubscription(this); UnregisterLeaveSubscription(this);
onStateChanged(was, source); onStateChanged(was, source);
} }
updateCursor(); updateCursor();

View File

@ -14,8 +14,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
namespace Ui { namespace Ui {
class AbstractButton : public RpWidget { class AbstractButton : public RpWidget {
Q_OBJECT
public: public:
AbstractButton(QWidget *parent); AbstractButton(QWidget *parent);
@ -61,9 +59,6 @@ protected:
void mouseMoveEvent(QMouseEvent *e) override; void mouseMoveEvent(QMouseEvent *e) override;
void mouseReleaseEvent(QMouseEvent *e) override; void mouseReleaseEvent(QMouseEvent *e) override;
signals:
void clicked();
protected: protected:
enum class StateFlag { enum class StateFlag {
None = 0, None = 0,
@ -88,6 +83,8 @@ protected:
virtual void onStateChanged(State was, StateChangeSource source) { virtual void onStateChanged(State was, StateChangeSource source) {
} }
void clicked(Qt::KeyboardModifiers modifiers, Qt::MouseButton button);
private: private:
void updateCursor(); void updateCursor();
void checkIfOver(QPoint localPos); void checkIfOver(QPoint localPos);

View File

@ -7,6 +7,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/ */
#include "ui/effects/animation_value.h" #include "ui/effects/animation_value.h"
#include "ui/painter.h"
#include <QtCore/QtMath> // M_PI
namespace anim { namespace anim {
namespace { namespace {

View File

@ -7,6 +7,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/ */
#pragma once #pragma once
#include "base/basic_types.h"
#include "ui/style/style_core.h"
namespace anim { namespace anim {
enum class type { enum class type {

View File

@ -8,7 +8,16 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/effects/animations.h" #include "ui/effects/animations.h"
#include "ui/ui_utility.h" #include "ui/ui_utility.h"
#include "core/application.h" #include "base/invoke_queued.h"
#include <QtCore/QPointer>
#include <crl/crl_on_main.h>
#include <crl/crl.h>
#include <rpl/filter.h>
#include <range/v3/algorithm/remove_if.hpp>
#include <range/v3/algorithm/remove.hpp>
#include <range/v3/algorithm/find.hpp>
namespace Ui { namespace Ui {
namespace Animations { namespace Animations {
@ -17,19 +26,25 @@ namespace {
constexpr auto kAnimationTick = crl::time(1000) / 120; constexpr auto kAnimationTick = crl::time(1000) / 120;
constexpr auto kIgnoreUpdatesTimeout = crl::time(4); constexpr auto kIgnoreUpdatesTimeout = crl::time(4);
Manager *ManagerInstance = nullptr;
} // namespace } // namespace
void Basic::start() { void Basic::start() {
Expects(ManagerInstance != nullptr);
if (animating()) { if (animating()) {
restart(); restart();
} else { } else {
Core::App().animationManager().start(this); ManagerInstance->start(this);
} }
} }
void Basic::stop() { void Basic::stop() {
Expects(ManagerInstance != nullptr);
if (animating()) { if (animating()) {
Core::App().animationManager().stop(this); ManagerInstance->stop(this);
} }
} }
@ -56,6 +71,10 @@ void Basic::markStopped() {
} }
Manager::Manager() { Manager::Manager() {
Expects(ManagerInstance == nullptr);
ManagerInstance = this;
crl::on_main_update_requests( crl::on_main_update_requests(
) | rpl::filter([=] { ) | rpl::filter([=] {
return (_lastUpdateTime + kIgnoreUpdatesTimeout < crl::now()); return (_lastUpdateTime + kIgnoreUpdatesTimeout < crl::now());
@ -64,6 +83,14 @@ Manager::Manager() {
}, _lifetime); }, _lifetime);
} }
Manager::~Manager() {
Expects(ManagerInstance == this);
Expects(_active.empty());
Expects(_starting.empty());
ManagerInstance = nullptr;
}
void Manager::start(not_null<Basic*> animation) { void Manager::start(not_null<Basic*> animation) {
_forceImmediateUpdate = true; _forceImmediateUpdate = true;
if (_updating) { if (_updating) {

View File

@ -9,6 +9,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/effects/animation_value.h" #include "ui/effects/animation_value.h"
#include <crl/crl_time.h>
#include <rpl/lifetime.h>
namespace Ui { namespace Ui {
namespace Animations { namespace Animations {
@ -69,6 +72,32 @@ public:
[[nodiscard]] float64 value(float64 final) const; [[nodiscard]] float64 value(float64 final) const;
private: private:
class ShortTracker {
public:
ShortTracker() {
restart();
}
ShortTracker(const ShortTracker &other) = delete;
ShortTracker &operator=(const ShortTracker &other) = delete;
~ShortTracker() {
release();
}
void restart() {
if (!std::exchange(_paused, true)) {
style::internal::StartShortAnimation();
}
}
void release() {
if (std::exchange(_paused, false)) {
style::internal::StopShortAnimation();
}
}
private:
bool _paused = false;
};
struct Data { struct Data {
explicit Data(float64 initial) : value(initial) { explicit Data(float64 initial) : value(initial) {
} }
@ -85,7 +114,7 @@ private:
float64 value = 0.; float64 value = 0.;
float64 duration = 0.; float64 duration = 0.;
bool *markOnDelete = nullptr; bool *markOnDelete = nullptr;
MTP::PauseHolder pause; ShortTracker tracker;
}; };
template <typename Callback> template <typename Callback>
@ -106,6 +135,7 @@ private:
class Manager final : private QObject { class Manager final : private QObject {
public: public:
Manager(); Manager();
~Manager();
void update(); void update();
@ -326,7 +356,7 @@ inline void Simple::start(
if (!deleted) { if (!deleted) {
that->markOnDelete = nullptr; that->markOnDelete = nullptr;
if (!result) { if (!result) {
that->pause.release(); that->tracker.release();
} }
} }
return result; return result;
@ -349,10 +379,10 @@ inline void Simple::prepare(float64 from, crl::time duration) {
if (!_data) { if (!_data) {
_data = std::make_unique<Data>(from); _data = std::make_unique<Data>(from);
} else if (!isLong) { } else if (!isLong) {
_data->pause.restart(); _data->tracker.restart();
} }
if (isLong) { if (isLong) {
_data->pause.release(); _data->tracker.release();
} }
} }

View File

@ -8,6 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/effects/cross_animation.h" #include "ui/effects/cross_animation.h"
#include "ui/effects/animation_value.h" #include "ui/effects/animation_value.h"
#include "ui/painter.h"
namespace Ui { namespace Ui {
namespace { namespace {

View File

@ -9,6 +9,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "styles/style_widgets.h" #include "styles/style_widgets.h"
class Painter;
namespace Ui { namespace Ui {
class CrossAnimation { class CrossAnimation {

View File

@ -9,6 +9,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "styles/style_widgets.h" #include "styles/style_widgets.h"
#include <deque>
namespace Ui { namespace Ui {
class RippleAnimation { class RippleAnimation {

View File

@ -7,9 +7,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/ */
#include "ui/rp_widget.h" #include "ui/rp_widget.h"
#include "core/qt_signal_producer.h" #include "base/qt_signal_producer.h"
#include <QtGui/QWindow> #include <QtGui/QWindow>
#include <QtGui/QtEvents>
namespace Ui { namespace Ui {
@ -89,7 +90,7 @@ rpl::producer<> RpWidgetMethods::windowDeactivateEvents() const {
const auto window = callGetWidget()->window()->windowHandle(); const auto window = callGetWidget()->window()->windowHandle();
Assert(window != nullptr); Assert(window != nullptr);
return Core::QtSignalProducer( return base::qt_signal_producer(
window, window,
&QWindow::activeChanged &QWindow::activeChanged
) | rpl::filter([=] { ) | rpl::filter([=] {

View File

@ -15,6 +15,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include <rpl/map.h> #include <rpl/map.h>
#include <rpl/distinct_until_changed.h> #include <rpl/distinct_until_changed.h>
#include <QtWidgets/QWidget>
#include <QtCore/QPointer>
class TWidget; class TWidget;
template <typename Base> template <typename Base>
@ -49,13 +52,13 @@ public:
auto margins = getMargins(); auto margins = getMargins();
x -= margins.left(); x -= margins.left();
y -= margins.top(); y -= margins.top();
Base::move(rtl() ? ((outerw > 0 ? outerw : Base::parentWidget()->width()) - x - Base::width()) : x, y); Base::move(style::RightToLeft() ? ((outerw > 0 ? outerw : Base::parentWidget()->width()) - x - Base::width()) : x, y);
} }
void moveToRight(int x, int y, int outerw = 0) { void moveToRight(int x, int y, int outerw = 0) {
auto margins = getMargins(); auto margins = getMargins();
x -= margins.right(); x -= margins.right();
y -= margins.top(); y -= margins.top();
Base::move(rtl() ? x : ((outerw > 0 ? outerw : Base::parentWidget()->width()) - x - Base::width()), y); Base::move(style::RightToLeft() ? x : ((outerw > 0 ? outerw : Base::parentWidget()->width()) - x - Base::width()), y);
} }
void setGeometryToLeft(int x, int y, int w, int h, int outerw = 0) { void setGeometryToLeft(int x, int y, int w, int h, int outerw = 0) {
auto margins = getMargins(); auto margins = getMargins();
@ -63,7 +66,7 @@ public:
y -= margins.top(); y -= margins.top();
w -= margins.left() - margins.right(); w -= margins.left() - margins.right();
h -= margins.top() - margins.bottom(); h -= margins.top() - margins.bottom();
Base::setGeometry(rtl() ? ((outerw > 0 ? outerw : Base::parentWidget()->width()) - x - w) : x, y, w, h); Base::setGeometry(style::RightToLeft() ? ((outerw > 0 ? outerw : Base::parentWidget()->width()) - x - w) : x, y, w, h);
} }
void setGeometryToRight(int x, int y, int w, int h, int outerw = 0) { void setGeometryToRight(int x, int y, int w, int h, int outerw = 0) {
auto margins = getMargins(); auto margins = getMargins();
@ -71,7 +74,7 @@ public:
y -= margins.top(); y -= margins.top();
w -= margins.left() - margins.right(); w -= margins.left() - margins.right();
h -= margins.top() - margins.bottom(); h -= margins.top() - margins.bottom();
Base::setGeometry(rtl() ? x : ((outerw > 0 ? outerw : Base::parentWidget()->width()) - x - w), y, w, h); Base::setGeometry(style::RightToLeft() ? x : ((outerw > 0 ? outerw : Base::parentWidget()->width()) - x - w), y, w, h);
} }
QPoint myrtlpoint(int x, int y) const { QPoint myrtlpoint(int x, int y) const {
return style::rtlpoint(x, y, Base::width()); return style::rtlpoint(x, y, Base::width());
@ -204,14 +207,10 @@ public:
void setVisibleTopBottom(int visibleTop, int visibleBottom) { void setVisibleTopBottom(int visibleTop, int visibleBottom) {
auto max = height(); auto max = height();
visibleTopBottomUpdated( visibleTopBottomUpdated(
snap(visibleTop, 0, max), std::clamp(visibleTop, 0, max),
snap(visibleBottom, 0, max)); std::clamp(visibleBottom, 0, max));
} }
signals:
// Child widget is responsible for emitting this signal.
void heightUpdated();
protected: protected:
void setChildVisibleTopBottom( void setChildVisibleTopBottom(
TWidget *child, TWidget *child,

View File

@ -14,6 +14,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include <QtGui/QPainter> #include <QtGui/QPainter>
#include <rpl/event_stream.h>
#include <rpl/variable.h>
namespace style { namespace style {
namespace internal { namespace internal {
namespace { namespace {
@ -22,8 +25,9 @@ constexpr auto kMinContrastAlpha = 64;
constexpr auto kMinContrastDistance = 64 * 64 * 4; constexpr auto kMinContrastDistance = 64 * 64 * 4;
constexpr auto kContrastDeltaL = 64; constexpr auto kContrastDeltaL = 64;
int DevicePixelRatioValue = 1; auto PaletteChanges = rpl::event_stream<>();
bool RightToLeftValue = false; auto ShortAnimationRunning = rpl::variable<bool>(false);
auto RunningShortAnimations = 0;
std::vector<internal::ModuleBase*> &StyleModules() { std::vector<internal::ModuleBase*> &StyleModules() {
static auto result = std::vector<internal::ModuleBase*>(); static auto result = std::vector<internal::ModuleBase*>();
@ -42,14 +46,30 @@ void registerModule(ModuleBase *module) {
StyleModules().push_back(module); StyleModules().push_back(module);
} }
} // namespace internal void StartShortAnimation() {
if (++RunningShortAnimations == 1) {
bool RightToLeft() { ShortAnimationRunning = true;
return internal::RightToLeftValue; }
} }
void SetRightToLeft(bool rtl) { void StopShortAnimation() {
internal::RightToLeftValue = rtl; if (--RunningShortAnimations == 0) {
ShortAnimationRunning = false;
}
}
} // namespace internal
rpl::producer<> PaletteChanged() {
return internal::PaletteChanges.events();
}
void NotifyPaletteChanged() {
internal::PaletteChanges.fire({});
}
rpl::producer<bool> ShortAnimationPlaying() {
return internal::ShortAnimationRunning.value();
} }
void startManager(int scale) { void startManager(int scale) {

View File

@ -11,6 +11,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/style/style_core_types.h" #include "ui/style/style_core_types.h"
#include "ui/style/style_core_direction.h" #include "ui/style/style_core_direction.h"
#include <rpl/producer.h>
namespace style { namespace style {
namespace internal { namespace internal {
@ -26,17 +28,22 @@ public:
void registerModule(ModuleBase *module); void registerModule(ModuleBase *module);
// This method is implemented in palette.cpp (codegen).
bool setPaletteColor(QLatin1String name, uchar r, uchar g, uchar b, uchar a);
[[nodiscard]] QColor EnsureContrast(const QColor &over, const QColor &under); [[nodiscard]] QColor EnsureContrast(const QColor &over, const QColor &under);
void EnsureContrast(ColorData &over, const ColorData &under); void EnsureContrast(ColorData &over, const ColorData &under);
void StartShortAnimation();
void StopShortAnimation();
} // namespace internal } // namespace internal
void startManager(int scale); void startManager(int scale);
void stopManager(); void stopManager();
[[nodiscard]] rpl::producer<> PaletteChanged();
void NotifyPaletteChanged();
[[nodiscard]] rpl::producer<bool> ShortAnimationPlaying();
// *outResult must be r.width() x r.height(), ARGB32_Premultiplied. // *outResult must be r.width() x r.height(), ARGB32_Premultiplied.
// QRect(0, 0, src.width(), src.height()) must contain r. // QRect(0, 0, src.width(), src.height()) must contain r.
void colorizeImage(const QImage &src, QColor c, QImage *outResult, QRect srcRect = QRect(), QPoint dstPoint = QPoint(0, 0)); void colorizeImage(const QImage &src, QColor c, QImage *outResult, QRect srcRect = QRect(), QPoint dstPoint = QPoint(0, 0));

View File

@ -0,0 +1,25 @@
/*
This file is part of Telegram Desktop,
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 "ui/style/style_core_direction.h"
namespace style {
namespace {
bool RightToLeftValue = false;
} // namespace
bool RightToLeft() {
return RightToLeftValue;
}
void SetRightToLeft(bool rtl) {
RightToLeftValue = rtl;
}
} // namespace style

View File

@ -0,0 +1,20 @@
/*
This file is part of Telegram Desktop,
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
*/
#pragma once
#include "base/basic_types.h"
// Methods that must be implemented outside lib_ui.
namespace Ui {
void PostponeCall(FnMut<void()> &&callable);
void RegisterLeaveSubscription(not_null<QWidget*> widget);
void UnregisterLeaveSubscription(not_null<QWidget*> widget);
} // namespace Ui

View File

@ -19,3 +19,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include <QtGui/QFontMetrics> #include <QtGui/QFontMetrics>
#include <QtWidgets/QWidget> #include <QtWidgets/QWidget>
#include <rpl/rpl.h>
#include <range/v3/all.hpp>

View File

@ -8,6 +8,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#pragma once #pragma once
#include "base/unique_qptr.h" #include "base/unique_qptr.h"
#include "ui/ui_integration.h"
#include <QtCore/QEvent>
template <typename Object> template <typename Object>
class object_ptr; class object_ptr;
@ -134,9 +137,6 @@ void RenderWidget(
void ForceFullRepaint(not_null<QWidget*> widget); void ForceFullRepaint(not_null<QWidget*> widget);
// Must be implemented outside lib_ui.
void PostponeCall(FnMut<void()> &&callable);
template < template <
typename Guard, typename Guard,
typename Callable, typename Callable,

View File

@ -11,9 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/effects/cross_animation.h" #include "ui/effects/cross_animation.h"
#include "ui/effects/numbers_animation.h" #include "ui/effects/numbers_animation.h"
#include "ui/image/image_prepare.h" #include "ui/image/image_prepare.h"
#include "window/themes/window_theme.h" #include "ui/painter.h"
#include "lang/lang_instance.h"
#include "app.h"
namespace Ui { namespace Ui {
@ -91,13 +89,11 @@ void RippleButton::setForceRippled(
if (_forceRippled != rippled) { if (_forceRippled != rippled) {
_forceRippled = rippled; _forceRippled = rippled;
if (_forceRippled) { if (_forceRippled) {
_forceRippledSubscription = base::ObservableViewer( _forceRippledSubscription = style::PaletteChanged(
*Window::Theme::Background() ) | rpl::filter([=] {
) | rpl::start_with_next([=]( return _ripple != nullptr;
const Window::Theme::BackgroundUpdate &update) { }) | rpl::start_with_next([=] {
if (update.paletteChanged() && _ripple) { _ripple->forceRepaint();
_ripple->forceRepaint();
}
}); });
ensureRipple(); ensureRipple();
if (_ripple->empty()) { if (_ripple->empty()) {
@ -350,7 +346,12 @@ void RoundButton::paintEvent(QPaintEvent *e) {
p.setBrush(color); p.setBrush(color);
p.drawRoundedRect(fill, radius, radius); p.drawRoundedRect(fill, radius, radius);
} else { } else {
App::roundRect(p, fill, color, ImageRoundRadius::Small); PainterHighQualityEnabler hq(p);
p.setPen(Qt::NoPen);
p.setBrush(color);
p.drawRoundedRect(fill, st::buttonRadius, st::buttonRadius);
// #TODO ui
//App::roundRect(p, fill, color, ImageRoundRadius::Small);
} }
}; };
drawRect(_st.textBg); drawRect(_st.textBg);

View File

@ -101,7 +101,7 @@ private:
}; };
class RoundButton : public RippleButton, private base::Subscriber { class RoundButton : public RippleButton {
public: public:
RoundButton( RoundButton(
QWidget *parent, QWidget *parent,

View File

@ -13,7 +13,7 @@ namespace Ui {
DropdownMenu::DropdownMenu(QWidget *parent, const style::DropdownMenu &st) : InnerDropdown(parent, st.wrap) DropdownMenu::DropdownMenu(QWidget *parent, const style::DropdownMenu &st) : InnerDropdown(parent, st.wrap)
, _st(st) { , _st(st) {
_menu = setOwnedWidget(object_ptr<Ui::Menu>(this, _st.menu)); _menu = setOwnedWidget(object_ptr<Menu>(this, _st.menu));
init(); init();
} }

View File

@ -52,10 +52,18 @@ InnerDropdown::InnerDropdown(
}, lifetime()); }, lifetime());
} }
QPointer<TWidget> InnerDropdown::doSetOwnedWidget(object_ptr<TWidget> widget) { QPointer<RpWidget> InnerDropdown::doSetOwnedWidget(
auto result = QPointer<TWidget>(widget); object_ptr<RpWidget> widget) {
connect(widget, SIGNAL(heightUpdated()), this, SLOT(onWidgetHeightUpdated())); auto result = QPointer<RpWidget>(widget);
auto container = _scroll->setOwnedWidget(object_ptr<Container>(_scroll, std::move(widget), _st)); widget->heightValue(
) | rpl::skip(1) | rpl::start_with_next([=] {
resizeToContent();
}, widget->lifetime());
auto container = _scroll->setOwnedWidget(
object_ptr<Container>(
_scroll,
std::move(widget),
_st));
container->resizeToWidth(_scroll->width()); container->resizeToWidth(_scroll->width());
container->moveToLeft(0, 0); container->moveToLeft(0, 0);
container->show(); container->show();

View File

@ -86,12 +86,9 @@ private slots:
hideAnimated(); hideAnimated();
} }
void onScroll(); void onScroll();
void onWidgetHeightUpdated() {
resizeToContent();
}
private: private:
QPointer<TWidget> doSetOwnedWidget(object_ptr<TWidget> widget); QPointer<RpWidget> doSetOwnedWidget(object_ptr<RpWidget> widget);
QImage grabForPanelAnimation(); QImage grabForPanelAnimation();
void startShowAnimation(); void startShowAnimation();
void startOpacityAnimation(bool hiding); void startOpacityAnimation(bool hiding);

View File

@ -24,14 +24,16 @@ struct Menu::ActionData {
bool hasSubmenu = false; bool hasSubmenu = false;
}; };
Menu::Menu(QWidget *parent, const style::Menu &st) : TWidget(parent) Menu::Menu(QWidget *parent, const style::Menu &st)
: RpWidget(parent)
, _st(st) , _st(st)
, _itemHeight(_st.itemPadding.top() + _st.itemStyle.font->height + _st.itemPadding.bottom()) , _itemHeight(_st.itemPadding.top() + _st.itemStyle.font->height + _st.itemPadding.bottom())
, _separatorHeight(_st.separatorPadding.top() + _st.separatorWidth + _st.separatorPadding.bottom()) { , _separatorHeight(_st.separatorPadding.top() + _st.separatorWidth + _st.separatorPadding.bottom()) {
init(); init();
} }
Menu::Menu(QWidget *parent, QMenu *menu, const style::Menu &st) : TWidget(parent) Menu::Menu(QWidget *parent, QMenu *menu, const style::Menu &st)
: RpWidget(parent)
, _st(st) , _st(st)
, _wappedMenu(menu) , _wappedMenu(menu)
, _itemHeight(_st.itemPadding.top() + _st.itemStyle.font->height + _st.itemPadding.bottom()) , _itemHeight(_st.itemPadding.top() + _st.itemStyle.font->height + _st.itemPadding.bottom())
@ -68,7 +70,9 @@ not_null<QAction*> Menu::addAction(const QString &text, Fn<void()> callback, con
} }
not_null<QAction*> Menu::addAction(not_null<QAction*> action, const style::icon *icon, const style::icon *iconOver) { not_null<QAction*> Menu::addAction(not_null<QAction*> action, const style::icon *icon, const style::icon *iconOver) {
connect(action, SIGNAL(changed()), this, SLOT(actionChanged())); connect(action, &QAction::changed, this, [=] {
actionChanged();
});
_actions.emplace_back(action); _actions.emplace_back(action);
_actionsData.push_back([&] { _actionsData.push_back([&] {
auto data = ActionData(); auto data = ActionData();

View File

@ -17,9 +17,7 @@ namespace Ui {
class ToggleView; class ToggleView;
class RippleAnimation; class RippleAnimation;
class Menu : public TWidget { class Menu : public RpWidget {
Q_OBJECT
public: public:
Menu(QWidget *parent, const style::Menu &st = st::defaultMenu); Menu(QWidget *parent, const style::Menu &st = st::defaultMenu);
Menu(QWidget *parent, QMenu *menu, const style::Menu &st = st::defaultMenu); Menu(QWidget *parent, QMenu *menu, const style::Menu &st = st::defaultMenu);
@ -85,13 +83,11 @@ protected:
void enterEventHook(QEvent *e) override; void enterEventHook(QEvent *e) override;
void leaveEventHook(QEvent *e) override; void leaveEventHook(QEvent *e) override;
private slots:
void actionChanged();
private: private:
struct ActionData; struct ActionData;
void updateSelected(QPoint globalPosition); void updateSelected(QPoint globalPosition);
void actionChanged();
void init(); void init();
// Returns the new width. // Returns the new width.

View File

@ -9,12 +9,11 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "mainwindow.h" #include "mainwindow.h"
#include "platform/platform_specific.h" #include "platform/platform_specific.h"
#include "core/qt_signal_producer.h"
#include "ui/ui_utility.h" #include "ui/ui_utility.h"
#include "app.h" #include "app.h"
#include "styles/style_widgets.h" #include "styles/style_widgets.h"
#include <QtCore/QCoreApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QDesktopWidget> #include <QtWidgets/QDesktopWidget>
namespace Ui { namespace Ui {

View File

@ -519,6 +519,12 @@ ChatBackground::ChatBackground() : _adjustableColors({
st::historyScrollBarBg, st::historyScrollBarBg,
st::historyScrollBarBgOver }) { st::historyScrollBarBgOver }) {
saveAdjustableColors(); saveAdjustableColors();
subscribe(this, [=](const BackgroundUpdate &update) {
if (update.paletteChanged()) {
style::NotifyPaletteChanged();
}
});
} }
void ChatBackground::setThemeData(QImage &&themeImage, bool themeTile) { void ChatBackground::setThemeData(QImage &&themeImage, bool themeTile) {

View File

@ -20,7 +20,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "storage/localstorage.h" #include "storage/localstorage.h"
#include "support/support_templates.h" #include "support/support_templates.h"
#include "settings/settings_common.h" #include "settings/settings_common.h"
#include "core/qt_signal_producer.h" #include "base/qt_signal_producer.h"
#include "boxes/about_box.h" #include "boxes/about_box.h"
#include "boxes/peer_list_controllers.h" #include "boxes/peer_list_controllers.h"
#include "calls/calls_box_controller.h" #include "calls/calls_box_controller.h"
@ -469,7 +469,7 @@ void MainMenu::initResetScaleButton() {
rpl::single( rpl::single(
handle->screen() handle->screen()
) | rpl::then( ) | rpl::then(
Core::QtSignalProducer(handle, &QWindow::screenChanged) base::qt_signal_producer(handle, &QWindow::screenChanged)
) | rpl::filter([](QScreen *screen) { ) | rpl::filter([](QScreen *screen) {
return screen != nullptr; return screen != nullptr;
}) | rpl::map([](QScreen * screen) { }) | rpl::map([](QScreen * screen) {
@ -477,9 +477,9 @@ void MainMenu::initResetScaleButton() {
screen->availableGeometry() screen->availableGeometry()
) | rpl::then( ) | rpl::then(
#ifdef OS_MAC_OLD #ifdef OS_MAC_OLD
Core::QtSignalProducer(screen, &QScreen::virtualGeometryChanged) base::qt_signal_producer(screen, &QScreen::virtualGeometryChanged)
#else // OS_MAC_OLD #else // OS_MAC_OLD
Core::QtSignalProducer(screen, &QScreen::availableGeometryChanged) base::qt_signal_producer(screen, &QScreen::availableGeometryChanged)
#endif // OS_MAC_OLD #endif // OS_MAC_OLD
); );
}) | rpl::flatten_latest( }) | rpl::flatten_latest(

View File

@ -45,6 +45,7 @@
'sources': [ 'sources': [
'<(src_loc)/base/algorithm.h', '<(src_loc)/base/algorithm.h',
'<(src_loc)/base/assertion.h', '<(src_loc)/base/assertion.h',
'<(src_loc)/base/base_integration.h',
'<(src_loc)/base/basic_types.h', '<(src_loc)/base/basic_types.h',
'<(src_loc)/base/binary_guard.h', '<(src_loc)/base/binary_guard.h',
'<(src_loc)/base/build_config.h', '<(src_loc)/base/build_config.h',
@ -72,6 +73,7 @@
'<(src_loc)/base/qthelp_regex.h', '<(src_loc)/base/qthelp_regex.h',
'<(src_loc)/base/qthelp_url.cpp', '<(src_loc)/base/qthelp_url.cpp',
'<(src_loc)/base/qthelp_url.h', '<(src_loc)/base/qthelp_url.h',
'<(src_loc)/base/qt_signal_producer.h',
'<(src_loc)/base/runtime_composer.cpp', '<(src_loc)/base/runtime_composer.cpp',
'<(src_loc)/base/runtime_composer.h', '<(src_loc)/base/runtime_composer.h',
'<(src_loc)/base/thread_safe_wrap.h', '<(src_loc)/base/thread_safe_wrap.h',

View File

@ -15,7 +15,6 @@
'includes': [ 'includes': [
'common.gypi', 'common.gypi',
'qt.gypi', 'qt.gypi',
'qt_moc.gypi',
'codegen_styles_rule.gypi', 'codegen_styles_rule.gypi',
'codegen_rules_ui.gypi', 'codegen_rules_ui.gypi',
'pch.gypi', 'pch.gypi',
@ -59,10 +58,16 @@
], ],
'sources': [ 'sources': [
'<@(style_files)', '<@(style_files)',
'<(src_loc)/ui/effects/animation_value.cpp',
'<(src_loc)/ui/effects/animation_value.h',
'<(src_loc)/ui/effects/animations.cpp',
'<(src_loc)/ui/effects/animations.h',
'<(src_loc)/ui/style/style_core.cpp', '<(src_loc)/ui/style/style_core.cpp',
'<(src_loc)/ui/style/style_core.h', '<(src_loc)/ui/style/style_core.h',
'<(src_loc)/ui/style/style_core_color.cpp', '<(src_loc)/ui/style/style_core_color.cpp',
'<(src_loc)/ui/style/style_core_color.h', '<(src_loc)/ui/style/style_core_color.h',
'<(src_loc)/ui/style/style_core_direction.cpp',
'<(src_loc)/ui/style/style_core_direction.h',
'<(src_loc)/ui/style/style_core_font.cpp', '<(src_loc)/ui/style/style_core_font.cpp',
'<(src_loc)/ui/style/style_core_font.h', '<(src_loc)/ui/style/style_core_font.h',
'<(src_loc)/ui/style/style_core_icon.cpp', '<(src_loc)/ui/style/style_core_icon.cpp',
@ -71,7 +76,13 @@
'<(src_loc)/ui/style/style_core_scale.h', '<(src_loc)/ui/style/style_core_scale.h',
'<(src_loc)/ui/style/style_core_types.cpp', '<(src_loc)/ui/style/style_core_types.cpp',
'<(src_loc)/ui/style/style_core_types.h', '<(src_loc)/ui/style/style_core_types.h',
'<(src_loc)/ui/widgets/buttons.cpp',
'<(src_loc)/ui/widgets/buttons.h',
'<(src_loc)/ui/abstract_button.cpp',
'<(src_loc)/ui/abstract_button.h',
'<(src_loc)/ui/painter.h', '<(src_loc)/ui/painter.h',
'<(src_loc)/ui/ui_integration.h',
'<(src_loc)/ui/ui_utility.h',
'<(emoji_suggestions_loc)/emoji_suggestions.cpp', '<(emoji_suggestions_loc)/emoji_suggestions.cpp',
'<(emoji_suggestions_loc)/emoji_suggestions.h', '<(emoji_suggestions_loc)/emoji_suggestions.h',
], ],

View File

@ -164,7 +164,6 @@
<(src_loc)/core/media_active_cache.h <(src_loc)/core/media_active_cache.h
<(src_loc)/core/mime_type.cpp <(src_loc)/core/mime_type.cpp
<(src_loc)/core/mime_type.h <(src_loc)/core/mime_type.h
<(src_loc)/core/qt_signal_producer.h
<(src_loc)/core/sandbox.cpp <(src_loc)/core/sandbox.cpp
<(src_loc)/core/sandbox.h <(src_loc)/core/sandbox.h
<(src_loc)/core/shortcuts.cpp <(src_loc)/core/shortcuts.cpp
@ -736,10 +735,6 @@
<(src_loc)/support/support_helper.h <(src_loc)/support/support_helper.h
<(src_loc)/support/support_templates.cpp <(src_loc)/support/support_templates.cpp
<(src_loc)/support/support_templates.h <(src_loc)/support/support_templates.h
<(src_loc)/ui/effects/animation_value.cpp
<(src_loc)/ui/effects/animation_value.h
<(src_loc)/ui/effects/animations.cpp
<(src_loc)/ui/effects/animations.h
<(src_loc)/ui/effects/cross_animation.cpp <(src_loc)/ui/effects/cross_animation.cpp
<(src_loc)/ui/effects/cross_animation.h <(src_loc)/ui/effects/cross_animation.h
<(src_loc)/ui/effects/fade_animation.cpp <(src_loc)/ui/effects/fade_animation.cpp
@ -781,8 +776,6 @@
<(src_loc)/ui/toast/toast_manager.h <(src_loc)/ui/toast/toast_manager.h
<(src_loc)/ui/toast/toast_widget.cpp <(src_loc)/ui/toast/toast_widget.cpp
<(src_loc)/ui/toast/toast_widget.h <(src_loc)/ui/toast/toast_widget.h
<(src_loc)/ui/widgets/buttons.cpp
<(src_loc)/ui/widgets/buttons.h
<(src_loc)/ui/widgets/checkbox.cpp <(src_loc)/ui/widgets/checkbox.cpp
<(src_loc)/ui/widgets/checkbox.h <(src_loc)/ui/widgets/checkbox.h
<(src_loc)/ui/widgets/continuous_sliders.cpp <(src_loc)/ui/widgets/continuous_sliders.cpp
@ -822,8 +815,6 @@
<(src_loc)/ui/wrap/vertical_layout.cpp <(src_loc)/ui/wrap/vertical_layout.cpp
<(src_loc)/ui/wrap/vertical_layout.h <(src_loc)/ui/wrap/vertical_layout.h
<(src_loc)/ui/wrap/wrap.h <(src_loc)/ui/wrap/wrap.h
<(src_loc)/ui/abstract_button.cpp
<(src_loc)/ui/abstract_button.h
<(src_loc)/ui/countryinput.cpp <(src_loc)/ui/countryinput.cpp
<(src_loc)/ui/countryinput.h <(src_loc)/ui/countryinput.h
<(src_loc)/ui/emoji_config.cpp <(src_loc)/ui/emoji_config.cpp