webview_common.h 773 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // This file is part of Desktop App Toolkit,
  2. // a set of libraries for developing nice desktop applications.
  3. //
  4. // For license and copyright information please follow this link:
  5. // https://github.com/desktop-app/legal/blob/master/LEGAL
  6. //
  7. #pragma once
  8. #include "base/basic_types.h"
  9. #include <QByteArray>
  10. #include <QString>
  11. #include <QColor>
  12. namespace Webview {
  13. struct StorageId {
  14. QString path;
  15. QByteArray token;
  16. explicit operator bool() const {
  17. return !path.isEmpty() && !token.isEmpty();
  18. }
  19. };
  20. [[nodiscard]] inline QByteArray LegacyStorageIdToken() {
  21. return "<legacy>"_q;
  22. }
  23. struct ThemeParams {
  24. QColor bodyBg;
  25. QColor titleBg;
  26. QColor scrollBg;
  27. QColor scrollBgOver;
  28. QColor scrollBarBg;
  29. QColor scrollBarBgOver;
  30. QByteArray json;
  31. };
  32. } // namespace Webview