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

Side by Side Diff: xfa/fwl/cfwl_pushbutton.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/cfwl_picturebox.cpp ('k') | xfa/fwl/cfwl_scrollbar.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/cfwl_pushbutton.h" 7 #include "xfa/fwl/cfwl_pushbutton.h"
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 const CFX_Matrix* pMatrix) { 61 const CFX_Matrix* pMatrix) {
62 if (!pGraphics) 62 if (!pGraphics)
63 return; 63 return;
64 if (!m_pProperties->m_pThemeProvider) 64 if (!m_pProperties->m_pThemeProvider)
65 return; 65 return;
66 66
67 if (HasBorder()) { 67 if (HasBorder()) {
68 DrawBorder(pGraphics, CFWL_Part::Border, m_pProperties->m_pThemeProvider, 68 DrawBorder(pGraphics, CFWL_Part::Border, m_pProperties->m_pThemeProvider,
69 pMatrix); 69 pMatrix);
70 } 70 }
71 if (HasEdge()) {
72 DrawEdge(pGraphics, CFWL_Part::Edge, m_pProperties->m_pThemeProvider,
73 pMatrix);
74 }
75 DrawBkground(pGraphics, m_pProperties->m_pThemeProvider, pMatrix); 71 DrawBkground(pGraphics, m_pProperties->m_pThemeProvider, pMatrix);
76 } 72 }
77 73
78 void CFWL_PushButton::DrawBkground(CFX_Graphics* pGraphics, 74 void CFWL_PushButton::DrawBkground(CFX_Graphics* pGraphics,
79 IFWL_ThemeProvider* pTheme, 75 IFWL_ThemeProvider* pTheme,
80 const CFX_Matrix* pMatrix) { 76 const CFX_Matrix* pMatrix) {
81 CFWL_ThemeBackground param; 77 CFWL_ThemeBackground param;
82 param.m_pWidget = this; 78 param.m_pWidget = this;
83 param.m_iPart = CFWL_Part::Background; 79 param.m_iPart = CFWL_Part::Background;
84 param.m_dwStates = GetPartStates(); 80 param.m_dwStates = GetPartStates();
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 if (pMsg->m_dwKeyCode != FWL_VKEY_Return) 235 if (pMsg->m_dwKeyCode != FWL_VKEY_Return)
240 return; 236 return;
241 237
242 CFWL_EventMouse wmMouse(this); 238 CFWL_EventMouse wmMouse(this);
243 wmMouse.m_dwCmd = FWL_MouseCommand::LeftButtonUp; 239 wmMouse.m_dwCmd = FWL_MouseCommand::LeftButtonUp;
244 DispatchEvent(&wmMouse); 240 DispatchEvent(&wmMouse);
245 241
246 CFWL_Event wmClick(CFWL_Event::Type::Click, this); 242 CFWL_Event wmClick(CFWL_Event::Type::Click, this);
247 DispatchEvent(&wmClick); 243 DispatchEvent(&wmClick);
248 } 244 }
OLDNEW
« no previous file with comments | « xfa/fwl/cfwl_picturebox.cpp ('k') | xfa/fwl/cfwl_scrollbar.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698