chromium/ui/message_center/public/cpp/message_center_constants.h

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef UI_MESSAGE_CENTER_PUBLIC_CPP_MESSAGE_CENTER_CONSTANTS_H_
#define UI_MESSAGE_CENTER_PUBLIC_CPP_MESSAGE_CENTER_CONSTANTS_H_

#include <stddef.h>

#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chromeos/constants/chromeos_features.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/color_palette.h"

// TODO(estade): many of these constants could be internalized.
namespace message_center {

// Exported values /////////////////////////////////////////////////////////////

// Square image sizes in DIPs.
const int kNotificationButtonIconSize =;
const int kNotificationIconSize =;
const int kQuickSettingIconSizeInDp =;
// A border is applied to images that have a non-preferred aspect ratio.
const int kNotificationImageBorderSize =;
const int kNotificationPreferredImageWidth =;
const int kNotificationPreferredImageHeight =;
const int kSmallImageSize =;
const int kSmallImageSizeMD =;
const int kSmallImagePadding =;

// Rounded corners are applied to large and small images in ash
constexpr int kImageCornerRadius =;
constexpr int kJellyImageCornerRadius =;

// Limits.
const size_t kMaxVisibleMessageCenterNotifications =;
const size_t kMaxVisiblePopupNotifications =;

// DIP dimension; H size of the whole card.
const int kNotificationWidth =;

// DIP dimension; H size of the whole card.
const int kChromeOSNotificationWidth =;

// Within a notification ///////////////////////////////////////////////////////

// DIP dimensions (H = horizontal, V = vertical).

const int kIconToTextPadding =;  // H space between icon & title/message.
const int kTextTopPadding =;     // V space between text elements.
const int kIconBottomPadding =;  // Minimum non-zero V space between icon
                                    // and frame.
// H space between the context message and the end of the card.
const int kTextRightPadding =;
const int kTextLeftPadding =;
const int kControlButtonPadding =;
const int kControlButtonBorderSize =;

// Text sizes.
const int kTitleFontSize =;        // For title only.
const int kEmptyCenterFontSize =;  // For empty message only.
const int kTitleLineHeight =;      // In DIPs.
const int kMessageFontSize =;      // For everything but title.
const int kMessageLineHeight =;    // In DIPs.

// Line limits.
const int kMaxTitleLines =;
const int kMessageCollapsedLineLimit =;
const int kMessageExpandedLineLimit =;
const int kContextMessageLineLimit =;

// Title.
constexpr int kMinPixelsPerTitleCharacter =;

// Message.

// Max number of lines for message_label_.
constexpr int kMaxLinesForMessageLabel =;
constexpr int kMaxLinesForExpandedMessageLabel =;

// For list notifications.
// Not used when --enabled-new-style-notification is set.
const size_t kNotificationMaximumItems =;

// This is an experimental short delay for all notification timeouts.
// It is currently only enabled if the kNotificationExperimentalShortTimeouts
// flag is enabled. If disabled the below delays are used as before.
const int kAutocloseShortDelaySeconds =;
// Timing. Web Notifications always use high-priority timings except on
// Chrome OS. Given the absence of a notification center on non-Chrome OS
// platforms, this improves users' ability to interact with the toasts.
const int kAutocloseDefaultDelaySeconds =;
const int kAutocloseHighPriorityDelaySeconds =;
const int kAutocloseCrosHighPriorityDelaySeconds =;

// Buttons.
const int kButtonHeight =;              // In DIPs.
const int kButtonHorizontalPadding =;   // In DIPs.
const int kButtonIconTopPadding =;      // In DIPs.
const int kButtonIconToTitlePadding =;  // In DIPs.

// Max number of lines for progress notification status_view_.
const int kMaxLinesForStatusView =;

// Progress bar.
const int kProgressBarTopPadding =;
#if BUILDFLAG(IS_APPLE)
const int kProgressBarThickness = 5;
const int kProgressBarCornerRadius = 3;
#endif

// Around notifications ////////////////////////////////////////////////////////

// Horizontal & vertical thickness of the border around the notifications in the
// notification list.
constexpr int kNotificationBorderThickness =;
// Horizontal & vertical space around & between notifications in the
// notification list.
constexpr int kMarginBetweenItemsInList =;

// Horizontal & vertical space around & between popup notifications.
#if BUILDFLAG(IS_CHROMEOS_ASH)
constexpr int kMarginBetweenPopups = 8;
#else
constexpr int kMarginBetweenPopups =;
#endif

// Radius of the rounded corners of a notification.
// The corners are only rounded in Chrome OS.
constexpr int kNotificationCornerRadius =;

// Animation Durations
constexpr int kNotificationResizeAnimationDurationMs =;

// Returns the width of the notification.
inline int GetNotificationWidth() {}

// Returns the character limit per line; character limit = pixels per line *
// line limit / min. pixels per character.
inline int GetMessageCharacterLimit() {}
}  // namespace message_center

#endif  // UI_MESSAGE_CENTER_PUBLIC_CPP_MESSAGE_CENTER_CONSTANTS_H_