#include "ui/native_theme/native_theme_fluent.h"
#include "base/no_destructor.h"
#include "base/notreached.h"
#include "cc/paint/paint_canvas.h"
#include "cc/paint/paint_flags.h"
#include "skia/ext/font_utils.h"
#include "third_party/skia/include/core/SkFont.h"
#include "third_party/skia/include/core/SkFontMgr.h"
#include "third_party/skia/include/core/SkPath.h"
#include "third_party/skia/include/core/SkTextBlob.h"
#include "ui/color/color_provider.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/rect_conversions.h"
#include "ui/gfx/geometry/rect_f.h"
#include "ui/gfx/geometry/rrect_f.h"
#include "ui/native_theme/native_theme_constants_fluent.h"
#include "ui/native_theme/native_theme_features.h"
namespace ui {
NativeThemeFluent::NativeThemeFluent(bool should_only_use_dark_colors)
: … { … }
NativeThemeFluent::~NativeThemeFluent() = default;
NativeThemeFluent* NativeThemeFluent::web_instance() { … }
void NativeThemeFluent::PaintArrowButton(
cc::PaintCanvas* canvas,
const ColorProvider* color_provider,
const gfx::Rect& rect,
Part direction,
State state,
ColorScheme color_scheme,
bool in_forced_colors,
const ScrollbarArrowExtraParams& extra_params) const { … }
void NativeThemeFluent::PaintScrollbarTrack(
cc::PaintCanvas* canvas,
const ColorProvider* color_provider,
Part part,
State state,
const ScrollbarTrackExtraParams& extra_params,
const gfx::Rect& rect,
ColorScheme color_scheme,
bool in_forced_colors) const { … }
void NativeThemeFluent::PaintScrollbarThumb(
cc::PaintCanvas* canvas,
const ColorProvider* color_provider,
Part part,
State state,
const gfx::Rect& rect,
const ScrollbarThumbExtraParams& extra_params,
ColorScheme color_scheme) const { … }
gfx::Insets NativeThemeFluent::GetScrollbarSolidColorThumbInsets(
Part part) const { … }
SkColor4f NativeThemeFluent::GetScrollbarThumbColor(
const ui::ColorProvider& color_provider,
State state,
const ScrollbarThumbExtraParams& extra_params) const { … }
void NativeThemeFluent::PaintScrollbarCorner(
cc::PaintCanvas* canvas,
const ColorProvider* color_provider,
State state,
const gfx::Rect& rect,
const ScrollbarTrackExtraParams& extra_params,
ColorScheme color_scheme) const { … }
gfx::Size NativeThemeFluent::GetPartSize(Part part,
State state,
const ExtraParams& extra) const { … }
void NativeThemeFluent::PaintButton(
cc::PaintCanvas* canvas,
const ColorProvider* color_provider,
const gfx::Rect& rect,
Part direction,
ColorScheme color_scheme,
bool in_forced_colors,
const ScrollbarArrowExtraParams& extra_params) const { … }
void NativeThemeFluent::PaintArrow(
cc::PaintCanvas* canvas,
const ColorProvider* color_provider,
const gfx::Rect& rect,
Part part,
State state,
ColorScheme color_scheme,
const ScrollbarArrowExtraParams& extra_params) const { … }
gfx::RectF NativeThemeFluent::GetArrowRect(const gfx::Rect& rect,
Part part,
State state) const { … }
int NativeThemeFluent::GetArrowSideLength(State state) const { … }
void NativeThemeFluent::OffsetArrowRect(gfx::RectF& arrow_rect,
Part part,
int max_rect_side) const { … }
const char* NativeThemeFluent::GetArrowCodePointForScrollbarPart(
Part part) const { … }
int NativeThemeFluent::GetPaintedScrollbarTrackInset() const { … }
void NativeThemeFluent::PaintRoundedButton(cc::PaintCanvas* canvas,
SkRect rect,
cc::PaintFlags paint_flags,
NativeTheme::Part direction) const { … }
}