dialogs_three_state_icon.h 524 B

123456789101112131415161718192021
  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 "styles/style_dialogs.h"
  9. namespace Dialogs {
  10. [[nodiscard]] inline const style::icon &ThreeStateIcon(
  11. const style::ThreeStateIcon &icons,
  12. bool active,
  13. bool over) {
  14. return active ? icons.active : over ? icons.over : icons.icon;
  15. }
  16. } // namespace Dialogs