#include "ui/views/badge_painter.h"
#include <algorithm>
#include "base/i18n/rtl.h"
#include "ui/base/ui_base_features.h"
#include "ui/color/color_id.h"
#include "ui/color/color_provider.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/font_list.h"
#include "ui/gfx/geometry/insets.h"
#include "ui/gfx/text_constants.h"
#include "ui/gfx/text_utils.h"
#include "ui/views/layout/layout_provider.h"
#include "ui/views/style/typography.h"
#include "ui/views/style/typography_provider.h"
#include "ui/views/view.h"
namespace views {
namespace {
gfx::Rect GetBadgeRectOutsetAroundText(const gfx::FontList& badge_font,
const gfx::Rect& badge_text_rect) { … }
}
void BadgePainter::PaintBadge(gfx::Canvas* canvas,
const View* view,
int unmirrored_badge_left_x,
int text_top_y,
const std::u16string& text,
const gfx::FontList& primary_font) { … }
gfx::Size BadgePainter::GetBadgeSize(const std::u16string& text,
const gfx::FontList& primary_font) { … }
gfx::FontList BadgePainter::GetBadgeFont(const gfx::FontList& context_font) { … }
}