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

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

Issue 2575093002: Cleanup widget edge related code (Closed)
Patch Set: Rebase to master Created 4 years 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/theme/cfwl_edittp.cpp ('k') | xfa/fwl/theme/cfwl_monthcalendartp.cpp » ('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_listboxtp.h" 7 #include "xfa/fwl/theme/cfwl_listboxtp.h"
8 8
9 #include "xfa/fwl/cfwl_listbox.h" 9 #include "xfa/fwl/cfwl_listbox.h"
10 #include "xfa/fwl/cfwl_themebackground.h" 10 #include "xfa/fwl/cfwl_themebackground.h"
(...skipping 11 matching lines...) Expand all
22 22
23 void CFWL_ListBoxTP::DrawBackground(CFWL_ThemeBackground* pParams) { 23 void CFWL_ListBoxTP::DrawBackground(CFWL_ThemeBackground* pParams) {
24 if (!pParams) 24 if (!pParams)
25 return; 25 return;
26 26
27 switch (pParams->m_iPart) { 27 switch (pParams->m_iPart) {
28 case CFWL_Part::Border: { 28 case CFWL_Part::Border: {
29 DrawBorder(pParams->m_pGraphics, &pParams->m_rtPart, &pParams->m_matrix); 29 DrawBorder(pParams->m_pGraphics, &pParams->m_rtPart, &pParams->m_matrix);
30 break; 30 break;
31 } 31 }
32 case CFWL_Part::Edge: {
33 DrawEdge(pParams->m_pGraphics, pParams->m_pWidget->GetStyles(),
34 &pParams->m_rtPart, &pParams->m_matrix);
35 break;
36 }
37 case CFWL_Part::Background: { 32 case CFWL_Part::Background: {
38 FillSoildRect(pParams->m_pGraphics, ArgbEncode(255, 255, 255, 255), 33 FillSoildRect(pParams->m_pGraphics, ArgbEncode(255, 255, 255, 255),
39 &pParams->m_rtPart, &pParams->m_matrix); 34 &pParams->m_rtPart, &pParams->m_matrix);
40 if (pParams->m_pData) { 35 if (pParams->m_pData) {
41 FillSoildRect(pParams->m_pGraphics, FWLTHEME_COLOR_Background, 36 FillSoildRect(pParams->m_pGraphics, FWLTHEME_COLOR_Background,
42 (CFX_RectF*)pParams->m_pData, &pParams->m_matrix); 37 (CFX_RectF*)pParams->m_pData, &pParams->m_matrix);
43 } 38 }
44 break; 39 break;
45 } 40 }
46 case CFWL_Part::ListItem: { 41 case CFWL_Part::ListItem: {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 path.AddRectangle(rt.left, rt.top, rt.width - 1, rt.height - 1); 89 path.AddRectangle(rt.left, rt.top, rt.width - 1, rt.height - 1);
95 #else 90 #else
96 path.AddRectangle(rt.left, rt.top, rt.width, rt.height); 91 path.AddRectangle(rt.left, rt.top, rt.width, rt.height);
97 #endif 92 #endif
98 pGraphics->FillPath(&path, FXFILL_WINDING, pMatrix); 93 pGraphics->FillPath(&path, FXFILL_WINDING, pMatrix);
99 pGraphics->RestoreGraphState(); 94 pGraphics->RestoreGraphState();
100 } 95 }
101 if (dwStates & CFWL_PartState_Focused && pData) 96 if (dwStates & CFWL_PartState_Focused && pData)
102 DrawFocus(pGraphics, (CFX_RectF*)pData, pMatrix); 97 DrawFocus(pGraphics, (CFX_RectF*)pData, pMatrix);
103 } 98 }
OLDNEW
« no previous file with comments | « xfa/fwl/theme/cfwl_edittp.cpp ('k') | xfa/fwl/theme/cfwl_monthcalendartp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698