webview_helpers.h 860 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. This file is part of Telegram Desktop,
  3. the official desktop application for the Telegram messaging service.
  4. For license and copyright information please follow this link:
  5. https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
  6. */
  7. #pragma once
  8. #include "base/flat_map.h"
  9. namespace tr {
  10. template <typename ...Tags>
  11. struct phrase;
  12. } // namespace tr
  13. namespace Ui {
  14. [[nodiscard]] QByteArray ComputeStyles(
  15. const base::flat_map<QByteArray, const style::color*> &colors,
  16. const base::flat_map<QByteArray, tr::phrase<>> &phrases,
  17. int zoom,
  18. bool nightTheme = false);
  19. [[nodiscard]] QByteArray ComputeSemiTransparentOverStyle(
  20. const QByteArray &name,
  21. const style::color &over,
  22. const style::color &bg);
  23. [[nodiscard]] QByteArray EscapeForAttribute(QByteArray value);
  24. [[nodiscard]] QByteArray EscapeForScriptString(QByteArray value);
  25. } // namespace Ui