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

Side by Side Diff: xfa/fwl/cfwl_datetimepicker.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_combobox.cpp ('k') | xfa/fwl/cfwl_edit.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_datetimepicker.h" 7 #include "xfa/fwl/cfwl_datetimepicker.h"
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 void CFWL_DateTimePicker::DrawWidget(CFX_Graphics* pGraphics, 122 void CFWL_DateTimePicker::DrawWidget(CFX_Graphics* pGraphics,
123 const CFX_Matrix* pMatrix) { 123 const CFX_Matrix* pMatrix) {
124 if (!pGraphics) 124 if (!pGraphics)
125 return; 125 return;
126 if (!m_pProperties->m_pThemeProvider) 126 if (!m_pProperties->m_pThemeProvider)
127 return; 127 return;
128 128
129 IFWL_ThemeProvider* pTheme = m_pProperties->m_pThemeProvider; 129 IFWL_ThemeProvider* pTheme = m_pProperties->m_pThemeProvider;
130 if (HasBorder()) 130 if (HasBorder())
131 DrawBorder(pGraphics, CFWL_Part::Border, pTheme, pMatrix); 131 DrawBorder(pGraphics, CFWL_Part::Border, pTheme, pMatrix);
132 if (HasEdge())
133 DrawEdge(pGraphics, CFWL_Part::Edge, pTheme, pMatrix);
134 if (!m_rtBtn.IsEmpty()) 132 if (!m_rtBtn.IsEmpty())
135 DrawDropDownButton(pGraphics, pTheme, pMatrix); 133 DrawDropDownButton(pGraphics, pTheme, pMatrix);
136 if (m_pWidgetMgr->IsFormDisabled()) { 134 if (m_pWidgetMgr->IsFormDisabled()) {
137 DisForm_DrawWidget(pGraphics, pMatrix); 135 DisForm_DrawWidget(pGraphics, pMatrix);
138 return; 136 return;
139 } 137 }
140 } 138 }
141 139
142 void CFWL_DateTimePicker::SetThemeProvider(IFWL_ThemeProvider* pTP) { 140 void CFWL_DateTimePicker::SetThemeProvider(IFWL_ThemeProvider* pTP) {
143 m_pProperties->m_pThemeProvider = pTP; 141 m_pProperties->m_pThemeProvider = pTP;
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 if (DisForm_IsMonthCalendarVisible()) 607 if (DisForm_IsMonthCalendarVisible())
610 ShowMonthCalendar(false); 608 ShowMonthCalendar(false);
611 if (m_pEdit->GetStates() & FWL_WGTSTATE_Focused) { 609 if (m_pEdit->GetStates() & FWL_WGTSTATE_Focused) {
612 pMsg->m_pSrcTarget = m_pEdit.get(); 610 pMsg->m_pSrcTarget = m_pEdit.get();
613 m_pEdit->GetDelegate()->OnProcessMessage(pMsg); 611 m_pEdit->GetDelegate()->OnProcessMessage(pMsg);
614 } 612 }
615 } 613 }
616 rtInvalidate.Inflate(2, 2); 614 rtInvalidate.Inflate(2, 2);
617 RepaintRect(rtInvalidate); 615 RepaintRect(rtInvalidate);
618 } 616 }
OLDNEW
« no previous file with comments | « xfa/fwl/cfwl_combobox.cpp ('k') | xfa/fwl/cfwl_edit.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698