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

Side by Side Diff: xfa/fwl/theme/cfwl_formtp.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/theme/cfwl_formtp.h ('k') | no next file » | 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_formtp.h" 7 #include "xfa/fwl/theme/cfwl_formtp.h"
8 8
9 #include "xfa/fde/tto/fde_textout.h" 9 #include "xfa/fde/tto/fde_textout.h"
10 #include "xfa/fwl/core/cfwl_themebackground.h" 10 #include "xfa/fwl/core/cfwl_themebackground.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 &pParams->m_matrix, iActive); 126 &pParams->m_matrix, iActive);
127 break; 127 break;
128 } 128 }
129 case CFWL_Part::MinimizeBox: { 129 case CFWL_Part::MinimizeBox: {
130 DrawMinimizeBox(pParams->m_pGraphics, &pParams->m_rtPart, eState, 130 DrawMinimizeBox(pParams->m_pGraphics, &pParams->m_rtPart, eState,
131 &pParams->m_matrix, iActive); 131 &pParams->m_matrix, iActive);
132 break; 132 break;
133 } 133 }
134 case CFWL_Part::MaximizeBox: { 134 case CFWL_Part::MaximizeBox: {
135 DrawMaximizeBox(pParams->m_pGraphics, &pParams->m_rtPart, eState, 135 DrawMaximizeBox(pParams->m_pGraphics, &pParams->m_rtPart, eState,
136 pParams->m_dwData, &pParams->m_matrix, iActive); 136 pParams->m_bMaximize, &pParams->m_matrix, iActive);
137 break; 137 break;
138 } 138 }
139 case CFWL_Part::Icon: { 139 case CFWL_Part::Icon: {
140 DrawIconImage(pParams->m_pGraphics, pParams->m_pImage, &pParams->m_rtPart, 140 DrawIconImage(pParams->m_pGraphics, pParams->m_pImage, &pParams->m_rtPart,
141 eState, &pParams->m_matrix, iActive); 141 eState, &pParams->m_matrix, iActive);
142 break; 142 break;
143 } 143 }
144 default: {} 144 default: {}
145 } 145 }
146 return TRUE; 146 return TRUE;
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 int32_t iActive) { 512 int32_t iActive) {
513 DrawMinMaxBoxCommon(pGraphics, pRect, eState, pMatrix); 513 DrawMinMaxBoxCommon(pGraphics, pRect, eState, pMatrix);
514 CFX_RectF rtMin; 514 CFX_RectF rtMin;
515 rtMin.Set(pRect->left + 5, pRect->top + 13, pRect->width - 14, 515 rtMin.Set(pRect->left + 5, pRect->top + 13, pRect->width - 14,
516 pRect->height - 18); 516 pRect->height - 18);
517 FillSoildRect(pGraphics, 0xFFFFFFFF, &rtMin, pMatrix); 517 FillSoildRect(pGraphics, 0xFFFFFFFF, &rtMin, pMatrix);
518 } 518 }
519 void CFWL_FormTP::DrawMaximizeBox(CFX_Graphics* pGraphics, 519 void CFWL_FormTP::DrawMaximizeBox(CFX_Graphics* pGraphics,
520 const CFX_RectF* pRect, 520 const CFX_RectF* pRect,
521 FWLTHEME_STATE eState, 521 FWLTHEME_STATE eState,
522 FX_BOOL bMax, 522 bool bMax,
523 CFX_Matrix* pMatrix, 523 CFX_Matrix* pMatrix,
524 int32_t iActive) { 524 int32_t iActive) {
525 DrawMinMaxBoxCommon(pGraphics, pRect, eState, pMatrix); 525 DrawMinMaxBoxCommon(pGraphics, pRect, eState, pMatrix);
526 FX_FLOAT fWidth = pRect->width; 526 FX_FLOAT fWidth = pRect->width;
527 FX_FLOAT fHeight = pRect->height; 527 FX_FLOAT fHeight = pRect->height;
528 if (bMax) { 528 if (bMax) {
529 CFX_Path path; 529 CFX_Path path;
530 path.Create(); 530 path.Create();
531 path.AddLine(pRect->left + 7, pRect->top + 6, pRect->left + 14, 531 path.AddLine(pRect->left + 7, pRect->top + 6, pRect->left + 14,
532 pRect->top + 6); 532 pRect->top + 6);
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
881 path.AddRectangle(0, 5, 1, 15); 881 path.AddRectangle(0, 5, 1, 15);
882 DrawAxialShading(&gs, 0, 5, 0, 20, m_pThemeData->clrHeadBK[1][1], 882 DrawAxialShading(&gs, 0, 5, 0, 20, m_pThemeData->clrHeadBK[1][1],
883 m_pThemeData->clrHeadBK[1][2], &path); 883 m_pThemeData->clrHeadBK[1][2], &path);
884 path.Clear(); 884 path.Clear();
885 path.AddRectangle(0, 20, 1, FWLTHEME_CAPACITY_CYCaption - 19); 885 path.AddRectangle(0, 20, 1, FWLTHEME_CAPACITY_CYCaption - 19);
886 DrawAxialShading(&gs, 0, 20, 0, FWLTHEME_CAPACITY_CYCaption, 886 DrawAxialShading(&gs, 0, 20, 0, FWLTHEME_CAPACITY_CYCaption,
887 m_pThemeData->clrHeadBK[1][2], 887 m_pThemeData->clrHeadBK[1][2],
888 m_pThemeData->clrHeadBK[1][3], &path); 888 m_pThemeData->clrHeadBK[1][3], &path);
889 } 889 }
890 } 890 }
OLDNEW
« no previous file with comments | « xfa/fwl/theme/cfwl_formtp.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698