chromium/ui/native_theme/native_theme_constants_fluent.h

// Copyright 2022 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_NATIVE_THEME_NATIVE_THEME_CONSTANTS_FLUENT_H_
#define UI_NATIVE_THEME_NATIVE_THEME_CONSTANTS_FLUENT_H_

namespace ui {

constexpr int kFluentScrollbarThickness =;
constexpr int kFluentScrollbarThumbThickness =;

// A sufficiently large value ensures the most round curve for the corners of
// the scrollbar thumb and overlay buttons.
constexpr int kFluentScrollbarPartsRadius =;

// The value specifies the minimum length the scrollbar thumb can have*.
// We choose 17px for compatibility reasons with the default scrollbar on the
// Windows platform.
//
// *Please note that when the scrollbar height for the vertical scrollbar
// (or width for horizontal) is less than [1], the thumb does get smaller
// until it disappears when the scrollbar size is less than [2].
//
// [1] 2 * kFluentScrollbarButtonSideLength + kFluentScrollbarMinimalThumbLength
// [2] 2 * kFluentScrollbarButtonSideLength + 1
constexpr int kFluentScrollbarMinimalThumbLength =;

// The value represents button height for the vertical scrollbar and width for
// the horizontal. Another side for the corresponding orientation is the same as
// the track thickness.
constexpr int kFluentScrollbarButtonSideLength =;

// Arrow rect side length. The height and width of the rect are equal.
constexpr int kFluentScrollbarArrowRectLength =;

// Arrow rect side length when the button is pressed. The height and width of
// the rect are equal.
constexpr int kFluentScrollbarPressedArrowRectLength =;

// Use this length only when the font that contains arrow icons is not present
// on the device and the default arrows are painted using SkPath. Since the
// scrollbar thickness is an even number, we shift the odd rect from the
// button's center. Also, we can avoid the usage of anti-aliasing, which tends
// to produce visual defects on specific scales.
constexpr int kFluentScrollbarPressedArrowRectFallbackLength =;

// Offset the arrow icon by this amount off-center, away from the thumb.
constexpr int kFluentScrollbarArrowOffset =;

// The outline width used to paint track and buttons in High Contrast mode.
constexpr float kFluentScrollbarTrackOutlineWidth =;

// The font that supports the drawing of Fluent scrollbar arrow icons.
// Currently, it's only available on Windows 11 by default.
constexpr char kFluentScrollbarFont[] =;

// Fluent scrollbar arrow code points.
constexpr char kFluentScrollbarUpArrow[] =;
constexpr char kFluentScrollbarDownArrow[] =;
constexpr char kFluentScrollbarLeftArrow[] =;
constexpr char kFluentScrollbarRightArrow[] =;

// Track and button inset to be applied at the time of painting overlay
// scrollbars. This will yield a 1dp border around the track that is
// transparent yet interactive.
constexpr int kFluentPaintedScrollbarTrackInset =;

}  // namespace ui

#endif  // UI_NATIVE_THEME_NATIVE_THEME_CONSTANTS_FLUENT_H_