platform_window_title.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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 "window/themes/window_theme_preview.h"
  9. #include "base/platform/base_platform_info.h"
  10. namespace Platform {
  11. inline bool NativeTitleRequiresShadow() {
  12. return Platform::IsWindows();
  13. }
  14. int PreviewTitleHeight();
  15. void PreviewWindowFramePaint(QImage &preview, const style::palette &palette, QRect body, int outerWidth);
  16. } // namespace Platform
  17. // Platform dependent implementations.
  18. #ifndef Q_OS_MAC
  19. namespace Platform {
  20. inline int PreviewTitleHeight() {
  21. return Window::Theme::DefaultPreviewTitleHeight();
  22. }
  23. inline void PreviewWindowFramePaint(QImage &preview, const style::palette &palette, QRect body, int outerWidth) {
  24. return Window::Theme::DefaultPreviewWindowFramePaint(preview, palette, body, outerWidth);
  25. }
  26. } // namespace Platform
  27. #endif // !Q_OS_MAC