UIConstants.js 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. /****************************************************************************
  2. **
  3. ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
  4. ** All rights reserved.
  5. ** Contact: Nokia Corporation (qt-info@nokia.com)
  6. **
  7. ** This file is part of the Qt Components project on Qt Labs.
  8. **
  9. ** No Commercial Usage
  10. ** This file contains pre-release code and may not be distributed.
  11. ** You may use this file in accordance with the terms and conditions contained
  12. ** in the Technology Preview License Agreement accompanying this package.
  13. **
  14. ** GNU Lesser General Public License Usage
  15. ** Alternatively, this file may be used under the terms of the GNU Lesser
  16. ** General Public License version 2.1 as published by the Free Software
  17. ** Foundation and appearing in the file LICENSE.LGPL included in the
  18. ** packaging of this file. Please review the following information to
  19. ** ensure the GNU Lesser General Public License version 2.1 requirements
  20. ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
  21. **
  22. ** If you have questions regarding the use of this file, please contact
  23. ** Nokia at qt-info@nokia.com.
  24. **
  25. ****************************************************************************/
  26. .pragma library
  27. var COLOR_NAME = "color17-"
  28. var FONT_FAMILY = "Nokia Pure Text";
  29. var FONT_FAMILY_LIGHT = "Nokia Pure Text Light";
  30. var FONT_FAMILY_BOLD = "Nokia Pure Text Bold";
  31. var FONT_DEFAULT_SIZE = 24; // DEPRECATED
  32. var FONT_XXXLARGE = 58;
  33. var FONT_XXLARGE = 48;
  34. var FONT_XLARGE = 32;
  35. var FONT_LARGE = 28;
  36. var FONT_SLARGE = 26;
  37. var FONT_DEFAULT = 24;
  38. var FONT_LLSMALL = 23;
  39. var FONT_LSMALL = 22;
  40. var FONT_SMALL = 20;
  41. var FONT_XSMALL = 18;
  42. var FONT_XXSMALL = 16;
  43. var FONT_XXXSMALL = 12;
  44. var COLOR_FOREGROUND = "#191919"; // Text color
  45. var COLOR_SECONDARY_FOREGROUND = "#8c8c8c"; // Secondary text
  46. var COLOR_BACKGROUND = "#E0E1E2"; // Background
  47. var COLOR_SELECT = "#4591ff"; //Selected item background
  48. var COLOR_INVERTED_FOREGROUND = "#ffffff"; // Text color
  49. var COLOR_INVERTED_SECONDARY_FOREGROUND = "#8c8c8c"; // Secondary text
  50. var COLOR_INVERTED_BACKGROUND = "#000000"; // Background
  51. var COLOR_DISABLED_FOREGROUND = "#b2b2b4";
  52. var COLOR_BUTTON_FOREGROUND = "#000000" //text color
  53. var COLOR_BUTTON_INVERTED_FOREGROUND = "#ffffff" //inverted text color
  54. var COLOR_BUTTON_SECONDARY_FOREGROUND = "#8c8c8c" //secondary text
  55. var COLOR_BUTTON_DISABLED_FOREGROUND = "#B2B2B4" //disabled text
  56. var COLOR_BUTTON_BACKGROUND = "#000000" //background
  57. var SIZE_ICON_DEFAULT = 32;
  58. var SIZE_ICON_LARGE = 48;
  59. var CORNER_MARGINS = 22;
  60. var MARGIN_DEFAULT = 0;
  61. var MARGIN_XLARGE = 16;
  62. // Distance in pixels from the widget bounding box inside which a release
  63. // event would still be accepted and trigger the widget
  64. var RELEASE_MISS_DELTA = 30;
  65. var OPACITY_ENABLED = 1.0;
  66. var OPACITY_DISABLED = 0.5;
  67. var SIZE_BUTTON = 64;
  68. var PADDING_XSMALL = 2;
  69. var PADDING_SMALL = 4;
  70. var PADDING_MEDIUM = 6;
  71. var PADDING_LARGE = 8;
  72. var PADDING_DOUBLE = 12;
  73. var PADDING_XLARGE = 16;
  74. var PADDING_XXLARGE = 24;
  75. var PADDING_XXXLARGE = 32;
  76. var SCROLLDECORATOR_SHORT_MARGIN = 8;
  77. var SCROLLDECORATOR_LONG_MARGIN = 4;
  78. var TOUCH_EXPANSION_MARGIN = -4;
  79. var BUTTON_WIDTH = 322;
  80. var BUTTON_HEIGHT = 51;
  81. var BUTTON_LABEL_MARGIN = 10;
  82. var FIELD_DEFAULT_HEIGHT = 52;
  83. //Common UI layouts
  84. var DEFAULT_HALF_MARGIN = 8;
  85. var DEFAULT_MARGIN = 16;
  86. var BUTTON_SPACING = 6;
  87. var HEADER_DEFAULT_HEIGHT_PORTRAIT = 72;
  88. var HEADER_DEFAULT_HEIGHT_LANDSCAPE = 46;
  89. var HEADER_DEFAULT_TOP_SPACING_PORTRAIT = 20;
  90. var HEADER_DEFAULT_BOTTOM_SPACING_PORTRAIT = 20;
  91. var HEADER_DEFAULT_TOP_SPACING_LANDSCAPE = 16;
  92. var HEADER_DEFAULT_BOTTOM_SPACING_LANDSCAPE = 14;
  93. var LIST_ITEM_HEIGHT_SMALL = 64;
  94. var LIST_ITEM_HEIGHT_DEFAULT = 80;
  95. //Delegate
  96. var DEFAULT_DELEGATE_HEIGHT = 84
  97. var LARGE_DELEGATE_HEIGHT = 114
  98. var XLARGE_DELEGATE_HEIGHT = 144
  99. var DELEGATE_TOP_MARGIN = 10
  100. var DELEGATE_BOTTOM_MARGINT = 15
  101. // ListDelegate
  102. var LIST_ITEM_MARGIN = 18
  103. var LIST_ITEM_SPACING = 16
  104. var LIST_ITEM_HEIGHT = 88
  105. var LIST_ICON_SIZE = 64
  106. var LIST_ICON_SIZE_SMALL = 16
  107. var LIST_TILE_SIZE = 24
  108. var LIST_TITLE_COLOR = "#282828"
  109. var LIST_TITLE_COLOR_INVERTED = "#ffffff"
  110. var LIST_SUBTILE_SIZE = 22
  111. var LIST_SUBTITLE_COLOR = "#505050"
  112. var LIST_SUBTITLE_COLOR_INVERTED = "#d2d2d2"
  113. // Header
  114. var HEADER_TITLE_COLOR = "#282828"
  115. var HEADER_SUBTITLE_COLOR = "#505050"
  116. // Story
  117. var STORY_CONTENTS_COLOR = "#282828"
  118. var SEPARATOR_LABEL_COLOR = "#505050"
  119. var SEPARATOR_LABEL_SIZE = 12
  120. // Colors
  121. var HIGHLIGHT_COLOR = "#ff8c00"
  122. var HIGHLIGHT_COLOR_LIGHT = "#e3c49f"
  123. var HIGHLIGHT_COLOR_NEGATIVE = "#ff0000"
  124. var HIGHLIGHT_COLOR_NEGATIVE_LIGHT = "#e3bfbf"
  125. var HIGHLIGHT_COLOR_POSITIVE = "#008000"
  126. var HIGHLIGHT_COLOR_POSITIVE_LIGHT = "#b7cbb7"