summaryrefslogtreecommitdiff
path: root/xfa/fwl/theme/cfwl_edittp.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-10-19 07:48:05 -0700
committerCommit bot <commit-bot@chromium.org>2016-10-19 07:48:05 -0700
commitc273e8f5006aa7d91d37a5da021dbbabb8721e5b (patch)
tree27ca349823fb3fb6f86db50305421ae2302db1db /xfa/fwl/theme/cfwl_edittp.cpp
parent09bad1cf251c68d1492af4049e1324a46d9c9725 (diff)
downloadpdfium-c273e8f5006aa7d91d37a5da021dbbabb8721e5b.tar.xz
Remove FWL theme subclasses
The CFWL_CheckBoxTP and CFWL_EditTP are subclassed with the CXFA_FWLEditTP and CXFA_FWLCheckBoxTP. The super classes are never instantiated or used, so fold the subclasses back to the parent and use them directly. Review-Url: https://chromiumcodereview.appspot.com/2418413005
Diffstat (limited to 'xfa/fwl/theme/cfwl_edittp.cpp')
-rw-r--r--xfa/fwl/theme/cfwl_edittp.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/xfa/fwl/theme/cfwl_edittp.cpp b/xfa/fwl/theme/cfwl_edittp.cpp
index 8e59a4d1f2..97f2fbc95c 100644
--- a/xfa/fwl/theme/cfwl_edittp.cpp
+++ b/xfa/fwl/theme/cfwl_edittp.cpp
@@ -9,6 +9,8 @@
#include "xfa/fwl/basewidget/ifwl_edit.h"
#include "xfa/fwl/core/cfwl_themebackground.h"
#include "xfa/fwl/core/ifwl_widget.h"
+#include "xfa/fxfa/app/xfa_fwltheme.h"
+#include "xfa/fxfa/xfa_ffwidget.h"
#include "xfa/fxgraphics/cfx_color.h"
#include "xfa/fxgraphics/cfx_path.h"
@@ -20,6 +22,24 @@ bool CFWL_EditTP::IsValidWidget(IFWL_Widget* pWidget) {
}
FX_BOOL CFWL_EditTP::DrawBackground(CFWL_ThemeBackground* pParams) {
+ if (CFWL_Part::CombTextLine == pParams->m_iPart) {
+ CXFA_FFWidget* pWidget = XFA_ThemeGetOuterWidget(pParams->m_pWidget);
+ FX_ARGB cr = 0xFF000000;
+ FX_FLOAT fWidth = 1.0f;
+ if (CXFA_Border borderUI = pWidget->GetDataAcc()->GetUIBorder()) {
+ CXFA_Edge edge = borderUI.GetEdge(0);
+ if (edge) {
+ cr = edge.GetColor();
+ fWidth = edge.GetThickness();
+ }
+ }
+ CFX_Color crLine(cr);
+ pParams->m_pGraphics->SetStrokeColor(&crLine);
+ pParams->m_pGraphics->SetLineWidth(fWidth);
+ pParams->m_pGraphics->StrokePath(pParams->m_pPath, &pParams->m_matrix);
+ return TRUE;
+ }
+
switch (pParams->m_iPart) {
case CFWL_Part::Border: {
DrawBorder(pParams->m_pGraphics, &pParams->m_rtPart, &pParams->m_matrix);