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

Side by Side Diff: xfa/fwl/theme/cfwl_edittp.cpp

Issue 1950973003: Cleanup CFWL_ThemePart data. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « xfa/fwl/core/fwl_formimp.cpp ('k') | xfa/fwl/theme/cfwl_formtp.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "xfa/fwl/theme/cfwl_edittp.h" 7 #include "xfa/fwl/theme/cfwl_edittp.h"
8 8
9 #include "xfa/fwl/basewidget/ifwl_edit.h" 9 #include "xfa/fwl/basewidget/ifwl_edit.h"
10 #include "xfa/fwl/core/cfwl_themebackground.h" 10 #include "xfa/fwl/core/cfwl_themebackground.h"
(...skipping 25 matching lines...) Expand all
36 CFX_Graphics* pGraphics = pParams->m_pGraphics; 36 CFX_Graphics* pGraphics = pParams->m_pGraphics;
37 pGraphics->SaveGraphState(); 37 pGraphics->SaveGraphState();
38 CFX_Color crSelected(FWL_GetThemeColor(m_dwThemeID) == 0 38 CFX_Color crSelected(FWL_GetThemeColor(m_dwThemeID) == 0
39 ? FWLTHEME_COLOR_BKSelected 39 ? FWLTHEME_COLOR_BKSelected
40 : FWLTHEME_COLOR_Green_BKSelected); 40 : FWLTHEME_COLOR_Green_BKSelected);
41 pGraphics->SetFillColor(&crSelected); 41 pGraphics->SetFillColor(&crSelected);
42 pGraphics->FillPath(pParams->m_pPath, FXFILL_WINDING, 42 pGraphics->FillPath(pParams->m_pPath, FXFILL_WINDING,
43 &pParams->m_matrix); 43 &pParams->m_matrix);
44 pGraphics->RestoreGraphState(); 44 pGraphics->RestoreGraphState();
45 } else { 45 } else {
46 FX_BOOL bStatic =
47 pParams->m_dwData == FWL_PARTDATA_EDT_StaticBackground;
48 CFX_Path path; 46 CFX_Path path;
49 path.Create(); 47 path.Create();
50 path.AddRectangle(pParams->m_rtPart.left, pParams->m_rtPart.top, 48 path.AddRectangle(pParams->m_rtPart.left, pParams->m_rtPart.top,
51 pParams->m_rtPart.width, pParams->m_rtPart.height); 49 pParams->m_rtPart.width, pParams->m_rtPart.height);
52 CFX_Color cr(FWLTHEME_COLOR_Background); 50 CFX_Color cr(FWLTHEME_COLOR_Background);
53 if (!bStatic) { 51 if (!pParams->m_bStaticBackground) {
54 if (pParams->m_dwStates & CFWL_PartState_Disabled) 52 if (pParams->m_dwStates & CFWL_PartState_Disabled)
55 cr.Set(FWLTHEME_COLOR_EDGERB1); 53 cr.Set(FWLTHEME_COLOR_EDGERB1);
56 else if (pParams->m_dwStates & CFWL_PartState_ReadOnly) 54 else if (pParams->m_dwStates & CFWL_PartState_ReadOnly)
57 cr.Set(ArgbEncode(255, 236, 233, 216)); 55 cr.Set(ArgbEncode(255, 236, 233, 216));
58 else 56 else
59 cr.Set(0xFFFFFFFF); 57 cr.Set(0xFFFFFFFF);
60 } 58 }
61 pParams->m_pGraphics->SaveGraphState(); 59 pParams->m_pGraphics->SaveGraphState();
62 pParams->m_pGraphics->SetFillColor(&cr); 60 pParams->m_pGraphics->SetFillColor(&cr);
63 pParams->m_pGraphics->FillPath(&path, FXFILL_WINDING, 61 pParams->m_pGraphics->FillPath(&path, FXFILL_WINDING,
(...skipping 16 matching lines...) Expand all
80 return TRUE; 78 return TRUE;
81 } 79 }
82 FWL_ERR CFWL_EditTP::Initialize() { 80 FWL_ERR CFWL_EditTP::Initialize() {
83 InitTTO(); 81 InitTTO();
84 return CFWL_WidgetTP::Initialize(); 82 return CFWL_WidgetTP::Initialize();
85 } 83 }
86 FWL_ERR CFWL_EditTP::Finalize() { 84 FWL_ERR CFWL_EditTP::Finalize() {
87 FinalizeTTO(); 85 FinalizeTTO();
88 return CFWL_WidgetTP::Finalize(); 86 return CFWL_WidgetTP::Finalize();
89 } 87 }
OLDNEW
« no previous file with comments | « xfa/fwl/core/fwl_formimp.cpp ('k') | xfa/fwl/theme/cfwl_formtp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698