7#include "xfa/fwl/theme/cfwl_scrollbartp.h"
9#include "xfa/fgas/graphics/cfgas_gecolor.h"
10#include "xfa/fgas/graphics/cfgas_gegraphics.h"
11#include "xfa/fgas/graphics/cfgas_gepath.h"
12#include "xfa/fwl/cfwl_scrollbar.h"
13#include "xfa/fwl/cfwl_themebackground.h"
14#include "xfa/fwl/cfwl_widget.h"
15#include "xfa/fwl/ifwl_themeprovider.h"
17CFWL_ScrollBarTP::CFWL_ScrollBarTP() : m_pThemeData(
new SBThemeData) {
78 FillSolidRect(pGraphics,
79 m_pThemeData->clrBtnBK[
static_cast<size_t>(eState) - 1][1],
85 pGraphics->SetStrokeColor(CFGAS_GEColor(
86 m_pThemeData->clrBtnBorder[
static_cast<size_t>(eState) - 1]));
117 FillSolidRect(pGraphics, m_pThemeData->clrTrackBKEnd, rect, matrix);
128 eState,
true, matrix);
131 DrawArrowBtn(pGraphics, rtArrowBtn, eDict, eState, matrix);
134void CFWL_ScrollBarTP::SetThemeData() {
135 m_pThemeData->clrTrackBKStart = ArgbEncode(0xff, 243, 241, 236);
136 m_pThemeData->clrTrackBKEnd = ArgbEncode(0xff, 254, 254, 251);
137 m_pThemeData->clrBtnBK[0][0] = ArgbEncode(0xff, 197, 213, 252);
138 m_pThemeData->clrBtnBK[0][1] = ArgbEncode(0xff, 182, 205, 251);
139 m_pThemeData->clrBtnBK[1][0] = ArgbEncode(0xff, 216, 232, 255);
140 m_pThemeData->clrBtnBK[1][1] = ArgbEncode(0xff, 204, 225, 255);
141 m_pThemeData->clrBtnBK[2][0] = ArgbEncode(0xff, 167, 190, 245);
142 m_pThemeData->clrBtnBK[2][1] = ArgbEncode(0xff, 146, 179, 249);
143 m_pThemeData->clrBtnBK[3][0] = ArgbEncode(0xff, 164, 180, 139);
144 m_pThemeData->clrBtnBK[3][1] = ArgbEncode(0xff, 141, 157, 115);
145 m_pThemeData->clrBtnBorder[0] = ArgbEncode(0xff, 148, 176, 221);
146 m_pThemeData->clrBtnBorder[1] = ArgbEncode(0xff, 218, 230, 254);
147 m_pThemeData->clrBtnBorder[2] = ArgbEncode(0xff, 124, 159, 211);
148 m_pThemeData->clrBtnBorder[3] = ArgbEncode(0xff, 236, 233, 216);
CFGAS_GEColor(const FX_ARGB argb)
StateRestorer(CFGAS_GEGraphics *graphics)
void FillPath(const CFGAS_GEPath &path, CFX_FillRenderOptions::FillType fill_type, const CFX_Matrix &matrix)
void SetFillColor(const CFGAS_GEColor &color)
void StrokePath(const CFGAS_GEPath &path, const CFX_Matrix &matrix)
void AddRectangle(float left, float top, float width, float height)
CFGAS_GEGraphics * GetGraphics() const
CFWL_Widget * GetWidget() const
FWLTHEME_STATE GetThemeState() const
bool IsEmpty(float fEpsilon) const
void Deflate(float off_left, float off_top, float off_right, float off_bottom)
void Deflate(float x, float y)
constexpr FX_ARGB ArgbEncode(uint32_t a, uint32_t r, uint32_t g, uint32_t b)