ChatDefines.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // _____ _
  2. // |_ _| |_ _ _ ___ ___ _ __ __ _
  3. // | | | ' \| '_/ -_) -_) ' \/ _` |_
  4. // |_| |_||_|_| \___\___|_|_|_\__,_(_)
  5. //
  6. // Threema iOS Client
  7. // Copyright (c) 2012-2020 Threema GmbH
  8. //
  9. // This program is free software: you can redistribute it and/or modify
  10. // it under the terms of the GNU Affero General Public License, version 3,
  11. // as published by the Free Software Foundation.
  12. //
  13. // This program is distributed in the hope that it will be useful,
  14. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. // GNU Affero General Public License for more details.
  17. //
  18. // You should have received a copy of the GNU Affero General Public License
  19. // along with this program. If not, see <https://www.gnu.org/licenses/>.
  20. static CGFloat const kSentDateMinFontSize = 12.0f;
  21. static CGFloat const kSentDateMaxFontSize = 17.0f;
  22. static CGFloat const kLocationMinFontSize = 12.0f;
  23. static CGFloat const kSystemMessageMinFontSize = 12.0f;
  24. static CGFloat const kSystemMessageMaxFontSize = 17.0f;
  25. static CGFloat const kChatContactMinFontSize = 12.0f;
  26. static CGFloat const kChatContactMaxFontSize = 17.0f;
  27. static CGFloat const kMessageScreenMargin = 140.0f;
  28. static CGFloat const kLandscapeWidthThreshold = 321.0f;
  29. static CGFloat const kMessageImageWidth = 240.0f;
  30. static CGFloat const kMessageImageHeight = 240.0f;
  31. static CGFloat const kContentHeightMaxPortrait = 142.0f; // 7 lines
  32. static CGFloat const kContentHeightMaxLandscape = 82.0f; // 3 lines
  33. static CGFloat const kChatBarHeight1 = 40.0f;
  34. static CGFloat const kScrollButtonAlpha = 1.0f;
  35. static CGFloat const kIphoneXChatBarBottomPadding = 20.0f;
  36. static CGFloat const kIphoneXChatBarLandscapePadding = 35.0f;
  37. #define ClearConversationButtonIndex 0
  38. #define MESSAGES_AT_START 20
  39. #define LOAD_MESSAGES_PER_PAGE 100