Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Side by Side Diff: ui/message_center/views/constants.h

Issue 256883002: Update notification style: allow 2-line titles if the message is blank. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix rsesek comments. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/message_center/message_center_style.h ('k') | ui/message_center/views/notification_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_MESSAGE_CENTER_VIEWS_CONSTANTS_H_ 5 #ifndef UI_MESSAGE_CENTER_VIEWS_CONSTANTS_H_
6 #define UI_MESSAGE_CENTER_VIEWS_CONSTANTS_H_ 6 #define UI_MESSAGE_CENTER_VIEWS_CONSTANTS_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "third_party/skia/include/core/SkColor.h" 9 #include "third_party/skia/include/core/SkColor.h"
10 #include "ui/gfx/size.h" 10 #include "ui/gfx/size.h"
(...skipping 13 matching lines...) Expand all
24 const int kTextLeftPadding = kIconSize + message_center::kIconToTextPadding; 24 const int kTextLeftPadding = kIconSize + message_center::kIconToTextPadding;
25 const int kTextBottomPadding = 12; 25 const int kTextBottomPadding = 12;
26 const int kTextRightPadding = 23; 26 const int kTextRightPadding = 23;
27 const int kItemTitleToMessagePadding = 3; 27 const int kItemTitleToMessagePadding = 3;
28 const int kButtonVecticalPadding = 0; 28 const int kButtonVecticalPadding = 0;
29 const int kButtonTitleTopPadding = 0; 29 const int kButtonTitleTopPadding = 0;
30 30
31 // Character limits: Displayed text will be subject to the line limits above, 31 // Character limits: Displayed text will be subject to the line limits above,
32 // but we also remove trailing characters from text to reduce processing cost. 32 // but we also remove trailing characters from text to reduce processing cost.
33 // Character limit = pixels per line * line limit / min. pixels per character. 33 // Character limit = pixels per line * line limit / min. pixels per character.
34 const size_t kTitleCharacterLimit = 34 const int kMinPixelsPerTitleCharacter = 4;
35 message_center::kNotificationWidth * message_center::kTitleLineLimit / 4;
36 const size_t kMessageCharacterLimit = 35 const size_t kMessageCharacterLimit =
37 message_center::kNotificationWidth * 36 message_center::kNotificationWidth *
38 message_center::kMessageExpandedLineLimit / 3; 37 message_center::kMessageExpandedLineLimit / 3;
39 const size_t kContextMessageCharacterLimit = 38 const size_t kContextMessageCharacterLimit =
40 message_center::kNotificationWidth * 39 message_center::kNotificationWidth *
41 message_center::kContextMessageLineLimit / 3; 40 message_center::kContextMessageLineLimit / 3;
42 41
43 } // namespace message_center 42 } // namespace message_center
44 43
45 #endif // UI_MESSAGE_CENTER_VIEWS_CONSTANTS_H_ 44 #endif // UI_MESSAGE_CENTER_VIEWS_CONSTANTS_H_
OLDNEW
« no previous file with comments | « ui/message_center/message_center_style.h ('k') | ui/message_center/views/notification_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698