mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 22:46:10 +00:00
Support theming for webview-s (payments, attach).
This commit is contained in:
@@ -23,6 +23,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "lang/lang_keys.h"
|
||||
#include "apiwrap.h"
|
||||
#include "api/api_cloud_password.h"
|
||||
#include "window/themes/window_theme.h"
|
||||
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
@@ -161,6 +162,17 @@ CheckoutProcess::CheckoutProcess(
|
||||
showForm();
|
||||
_panel->toggleProgress(true);
|
||||
|
||||
style::PaletteChanged(
|
||||
) | rpl::filter([=] {
|
||||
return !_themeUpdateScheduled;
|
||||
}) | rpl::start_with_next([=] {
|
||||
_themeUpdateScheduled = true;
|
||||
crl::on_main(this, [=] {
|
||||
_themeUpdateScheduled = false;
|
||||
_panel->updateThemeParams(Window::Theme::WebViewParams());
|
||||
});
|
||||
}, _panel->lifetime());
|
||||
|
||||
if (mode == Mode::Payment) {
|
||||
_session->api().cloudPassword().state(
|
||||
) | rpl::start_with_next([=](const Core::CloudPasswordState &state) {
|
||||
|
Reference in New Issue
Block a user