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_widgettp.h" | 7 #include "xfa/fwl/theme/cfwl_widgettp.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 CFX_Color crStroke(FWL_GetThemeColor(m_dwThemeID) == 0 | 267 CFX_Color crStroke(FWL_GetThemeColor(m_dwThemeID) == 0 |
268 ? ArgbEncode(255, 127, 157, 185) | 268 ? ArgbEncode(255, 127, 157, 185) |
269 : FWLTHEME_COLOR_Green_BKSelected); | 269 : FWLTHEME_COLOR_Green_BKSelected); |
270 pGraphics->SetStrokeColor(&crStroke); | 270 pGraphics->SetStrokeColor(&crStroke); |
271 CFX_Path path; | 271 CFX_Path path; |
272 path.Create(); | 272 path.Create(); |
273 path.AddRectangle(pRect->left, pRect->top, pRect->width - 1, | 273 path.AddRectangle(pRect->left, pRect->top, pRect->width - 1, |
274 pRect->height - 1); | 274 pRect->height - 1); |
275 pGraphics->StrokePath(&path, pMatrix); | 275 pGraphics->StrokePath(&path, pMatrix); |
276 path.Clear(); | 276 path.Clear(); |
277 crStroke = ArgbEncode(255, 255, 255, 255); | 277 crStroke.Set(ArgbEncode(255, 255, 255, 255)); |
278 pGraphics->SetStrokeColor(&crStroke); | 278 pGraphics->SetStrokeColor(&crStroke); |
279 path.AddRectangle(pRect->left + 1, pRect->top + 1, pRect->width - 3, | 279 path.AddRectangle(pRect->left + 1, pRect->top + 1, pRect->width - 3, |
280 pRect->height - 3); | 280 pRect->height - 3); |
281 pGraphics->StrokePath(&path, pMatrix); | 281 pGraphics->StrokePath(&path, pMatrix); |
282 pGraphics->RestoreGraphState(); | 282 pGraphics->RestoreGraphState(); |
283 } | 283 } |
284 | 284 |
285 void CFWL_WidgetTP::Draw3DRect(CFX_Graphics* pGraphics, | 285 void CFWL_WidgetTP::Draw3DRect(CFX_Graphics* pGraphics, |
286 FWLTHEME_EDGE eType, | 286 FWLTHEME_EDGE eType, |
287 FX_FLOAT fWidth, | 287 FX_FLOAT fWidth, |
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
766 CFWL_FontManager::DestroyInstance(); | 766 CFWL_FontManager::DestroyInstance(); |
767 } | 767 } |
768 | 768 |
769 uint32_t FWL_GetThemeLayout(uint32_t dwThemeID) { | 769 uint32_t FWL_GetThemeLayout(uint32_t dwThemeID) { |
770 return 0xffff0000 & dwThemeID; | 770 return 0xffff0000 & dwThemeID; |
771 } | 771 } |
772 | 772 |
773 uint32_t FWL_GetThemeColor(uint32_t dwThemeID) { | 773 uint32_t FWL_GetThemeColor(uint32_t dwThemeID) { |
774 return 0x0000ffff & dwThemeID; | 774 return 0x0000ffff & dwThemeID; |
775 } | 775 } |
OLD | NEW |