mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Move many widget classes to lib_ui.
This commit is contained in:
@@ -10,15 +10,15 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "data/data_photo.h"
|
||||
#include "data/data_session.h"
|
||||
#include "data/data_user.h"
|
||||
#include "data/data_file_origin.h"
|
||||
#include "calls/calls_emoji_fingerprint.h"
|
||||
#include "styles/style_calls.h"
|
||||
#include "styles/style_history.h"
|
||||
#include "ui/widgets/buttons.h"
|
||||
#include "ui/widgets/labels.h"
|
||||
#include "ui/widgets/shadow.h"
|
||||
#include "ui/effects/ripple_animation.h"
|
||||
#include "ui/image/image.h"
|
||||
#include "ui/wrap/fade_wrap.h"
|
||||
#include "ui/platform/ui_platform_utility.h"
|
||||
#include "ui/empty_userpic.h"
|
||||
#include "ui/emoji_config.h"
|
||||
#include "core/application.h"
|
||||
@@ -31,6 +31,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "window/main_window.h"
|
||||
#include "layout.h"
|
||||
#include "app.h"
|
||||
#include "styles/style_calls.h"
|
||||
#include "styles/style_history.h"
|
||||
|
||||
#include <QtWidgets/QDesktopWidget>
|
||||
#include <QtWidgets/QApplication>
|
||||
@@ -440,7 +442,7 @@ void Panel::initLayout() {
|
||||
});
|
||||
createDefaultCacheImage();
|
||||
|
||||
Platform::InitOnTopPanel(this);
|
||||
Ui::Platform::InitOnTopPanel(this);
|
||||
}
|
||||
|
||||
void Panel::toggleOpacityAnimation(bool visible) {
|
||||
@@ -592,7 +594,7 @@ bool Panel::isGoodUserPhoto(PhotoData *photo) {
|
||||
|
||||
void Panel::initGeometry() {
|
||||
auto center = Core::App().getPointForCallPanelCenter();
|
||||
_useTransparency = Platform::TranslucentWindowsSupported(center);
|
||||
_useTransparency = Ui::Platform::TranslucentWindowsSupported(center);
|
||||
setAttribute(Qt::WA_OpaquePaintEvent, !_useTransparency);
|
||||
_padding = _useTransparency ? st::callShadow.extend : style::margins(st::lineWidth, st::lineWidth, st::lineWidth, st::lineWidth);
|
||||
_contentTop = _padding.top() + st::callWidth;
|
||||
@@ -704,7 +706,7 @@ void Panel::paintEvent(QPaintEvent *e) {
|
||||
finishAnimating();
|
||||
if (!_call || isHidden()) return;
|
||||
} else {
|
||||
Platform::StartTranslucentPaint(p, e);
|
||||
Ui::Platform::StartTranslucentPaint(p, e);
|
||||
p.setOpacity(opacity);
|
||||
|
||||
PainterHighQualityEnabler hq(p);
|
||||
@@ -717,7 +719,7 @@ void Panel::paintEvent(QPaintEvent *e) {
|
||||
}
|
||||
|
||||
if (_useTransparency) {
|
||||
Platform::StartTranslucentPaint(p, e);
|
||||
Ui::Platform::StartTranslucentPaint(p, e);
|
||||
p.drawPixmapLeft(0, 0, width(), _cache);
|
||||
} else {
|
||||
p.drawPixmapLeft(_padding.left(), _padding.top(), width(), _userPhoto);
|
||||
@@ -864,9 +866,9 @@ void Panel::stateChanged(State state) {
|
||||
if (windowHandle()) {
|
||||
// First stateChanged() is called before the first Platform::InitOnTopPanel(this).
|
||||
if ((state == State::Starting) || (state == State::WaitingIncoming)) {
|
||||
Platform::ReInitOnTopPanel(this);
|
||||
Ui::Platform::ReInitOnTopPanel(this);
|
||||
} else {
|
||||
Platform::DeInitOnTopPanel(this);
|
||||
Ui::Platform::DeInitOnTopPanel(this);
|
||||
}
|
||||
}
|
||||
if (state == State::Established) {
|
||||
|
Reference in New Issue
Block a user