OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |