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

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

Issue 2263923003: Make CFX_Color constructor explicit (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comment Created 4 years, 3 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/theme/cfwl_carettp.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_comboboxtp.h" 7 #include "xfa/fwl/theme/cfwl_comboboxtp.h"
8 8
9 #include "xfa/fwl/basewidget/ifwl_combobox.h" 9 #include "xfa/fwl/basewidget/ifwl_combobox.h"
10 #include "xfa/fwl/core/cfwl_themebackground.h" 10 #include "xfa/fwl/core/cfwl_themebackground.h"
(...skipping 29 matching lines...) Expand all
40 case CFWL_Part::Edge: { 40 case CFWL_Part::Edge: {
41 DrawEdge(pParams->m_pGraphics, pParams->m_pWidget->GetStyles(), 41 DrawEdge(pParams->m_pGraphics, pParams->m_pWidget->GetStyles(),
42 &pParams->m_rtPart, &pParams->m_matrix); 42 &pParams->m_rtPart, &pParams->m_matrix);
43 break; 43 break;
44 } 44 }
45 case CFWL_Part::Background: { 45 case CFWL_Part::Background: {
46 CFX_Path path; 46 CFX_Path path;
47 path.Create(); 47 path.Create();
48 CFX_RectF& rect = pParams->m_rtPart; 48 CFX_RectF& rect = pParams->m_rtPart;
49 path.AddRectangle(rect.left, rect.top, rect.width, rect.height); 49 path.AddRectangle(rect.left, rect.top, rect.width, rect.height);
50 CFX_Color cr; 50 FX_ARGB argb_color;
51 switch (pParams->m_dwStates) { 51 switch (pParams->m_dwStates) {
52 case CFWL_PartState_Selected: 52 case CFWL_PartState_Selected:
53 cr = FWLTHEME_COLOR_BKSelected; 53 argb_color = FWLTHEME_COLOR_BKSelected;
54 break; 54 break;
55 case CFWL_PartState_Disabled: 55 case CFWL_PartState_Disabled:
56 cr = FWLTHEME_COLOR_EDGERB1; 56 argb_color = FWLTHEME_COLOR_EDGERB1;
57 break; 57 break;
58 default: 58 default:
59 cr = 0xFFFFFFFF; 59 argb_color = 0xFFFFFFFF;
60 } 60 }
61 pParams->m_pGraphics->SaveGraphState(); 61 pParams->m_pGraphics->SaveGraphState();
62 CFX_Color cr(argb_color);
62 pParams->m_pGraphics->SetFillColor(&cr); 63 pParams->m_pGraphics->SetFillColor(&cr);
63 pParams->m_pGraphics->FillPath(&path, FXFILL_WINDING, &pParams->m_matrix); 64 pParams->m_pGraphics->FillPath(&path, FXFILL_WINDING, &pParams->m_matrix);
64 pParams->m_pGraphics->RestoreGraphState(); 65 pParams->m_pGraphics->RestoreGraphState();
65 break; 66 break;
66 } 67 }
67 case CFWL_Part::DropDownButton: { 68 case CFWL_Part::DropDownButton: {
68 DrawDropDownButton(pParams, pParams->m_dwStates, &pParams->m_matrix); 69 DrawDropDownButton(pParams, pParams->m_dwStates, &pParams->m_matrix);
69 break; 70 break;
70 } 71 }
71 case CFWL_Part::StretchHandler: { 72 case CFWL_Part::StretchHandler: {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 } 116 }
116 case CFWL_PartState_Disabled: { 117 case CFWL_PartState_Disabled: {
117 eState = FWLTHEME_STATE_Disabale; 118 eState = FWLTHEME_STATE_Disabale;
118 break; 119 break;
119 } 120 }
120 default: {} 121 default: {}
121 } 122 }
122 DrawArrowBtn(pParams->m_pGraphics, &pParams->m_rtPart, 123 DrawArrowBtn(pParams->m_pGraphics, &pParams->m_rtPart,
123 FWLTHEME_DIRECTION_Down, eState, &pParams->m_matrix); 124 FWLTHEME_DIRECTION_Down, eState, &pParams->m_matrix);
124 } 125 }
OLDNEW
« no previous file with comments | « xfa/fwl/theme/cfwl_carettp.cpp ('k') | xfa/fwl/theme/cfwl_monthcalendartp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698