Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1130)

Unified Diff: xfa/fwl/theme/cfwl_edittp.cpp

Issue 2418413005: Remove FWL theme subclasses (Closed)
Patch Set: Review fixes Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fwl/theme/cfwl_checkboxtp.cpp ('k') | xfa/fxfa/app/xfa_fwltheme.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/theme/cfwl_edittp.cpp
diff --git a/xfa/fwl/theme/cfwl_edittp.cpp b/xfa/fwl/theme/cfwl_edittp.cpp
index 8e59a4d1f2e953c515356b3df48232680a11ba9d..97f2fbc95c60a994b8ee34537527a0cdf4ec1c5c 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);
« no previous file with comments | « xfa/fwl/theme/cfwl_checkboxtp.cpp ('k') | xfa/fxfa/app/xfa_fwltheme.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698