2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45: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

@@ -252,7 +252,7 @@ void PanelController::showCriticalError(const QString &text) {
void PanelController::showError(const QString &text) {
auto box = Box<InformBox>(text);
const auto weak = make_weak(box.data());
const auto weak = Ui::MakeWeak(box.data());
const auto hidden = _panel->isHidden();
_panel->showBox(
std::move(box),

View File

@@ -141,7 +141,7 @@ void ProgressWidget::Row::toggleInstance(Instance &instance, bool shown) {
if (instance.hiding != shown) {
return;
}
const auto label = make_weak(instance.label->entity());
const auto label = Ui::MakeWeak(instance.label->entity());
instance.opacity.start(
[=] { instanceOpacityCallback(label); },
shown ? 0. : 1.,
@@ -156,7 +156,7 @@ void ProgressWidget::Row::instanceOpacityCallback(
QPointer<Ui::FlatLabel> label) {
update();
const auto i = ranges::find(_old, label, [](const Instance &instance) {
return make_weak(instance.label->entity());
return Ui::MakeWeak(instance.label->entity());
});
if (i != end(_old) && i->hiding && !i->opacity.animating()) {
crl::on_main(this, [=] {
@@ -167,7 +167,7 @@ void ProgressWidget::Row::instanceOpacityCallback(
void ProgressWidget::Row::removeOldInstance(QPointer<Ui::FlatLabel> label) {
const auto i = ranges::find(_old, label, [](const Instance &instance) {
return make_weak(instance.label->entity());
return Ui::MakeWeak(instance.label->entity());
});
if (i != end(_old)) {
_old.erase(i);

View File

@@ -9,6 +9,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/rp_widget.h"
#include "export/view/export_view_content.h"
#include "base/object_ptr.h"
namespace Ui {
class VerticalLayout;

View File

@@ -397,7 +397,7 @@ void SettingsWidget::editDateLimit(
callback,
finalize,
st::exportCalendarSizes);
*shared = make_weak(box.data());
*shared = Ui::MakeWeak(box.data());
_showBoxCallback(std::move(box));
}

View File

@@ -9,6 +9,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "export/export_settings.h"
#include "ui/rp_widget.h"
#include "base/object_ptr.h"
class BoxContent;

View File

@@ -8,6 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#pragma once
#include "ui/rp_widget.h"
#include "base/object_ptr.h"
namespace Ui {
class FlatLabel;