2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-23 10:47:11 +00:00
tdesktop/Telegram/SourceFiles/ui/webview_helpers.h

32 lines
849 B
C
Raw Normal View History

2024-07-07 21:01:26 +04:00
/*
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/flat_map.h"
namespace tr {
template <typename ...Tags>
struct phrase;
} // namespace tr
namespace Ui {
[[nodiscard]] QByteArray ComputeStyles(
const base::flat_map<QByteArray, const style::color*> &colors,
const base::flat_map<QByteArray, tr::phrase<>> &phrases,
bool nightTheme = false);
[[nodiscard]] QByteArray ComputeSemiTransparentOverStyle(
const QByteArray &name,
const style::color &over,
const style::color &bg);
2024-07-07 21:01:26 +04:00
[[nodiscard]] QByteArray EscapeForAttribute(QByteArray value);
[[nodiscard]] QByteArray EscapeForScriptString(QByteArray value);
} // namespace Ui