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/core/cfwl_datetimepicker.h" | 7 #include "xfa/fwl/core/cfwl_datetimepicker.h" |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 if (m_pWidgetMgr->IsFormDisabled()) { | 72 if (m_pWidgetMgr->IsFormDisabled()) { |
73 DisForm_GetWidgetRect(rect, bAutoSize); | 73 DisForm_GetWidgetRect(rect, bAutoSize); |
74 return; | 74 return; |
75 } | 75 } |
76 if (!bAutoSize) { | 76 if (!bAutoSize) { |
77 rect = m_pProperties->m_rtWidget; | 77 rect = m_pProperties->m_rtWidget; |
78 return; | 78 return; |
79 } | 79 } |
80 | 80 |
81 rect.Set(0, 0, kDateTimePickerWidth, kDateTimePickerHeight); | 81 rect.Set(0, 0, kDateTimePickerWidth, kDateTimePickerHeight); |
82 CFWL_Widget::GetWidgetRect(rect, true); | 82 InflateWidgetRect(rect); |
83 } | 83 } |
84 | 84 |
85 void CFWL_DateTimePicker::Update() { | 85 void CFWL_DateTimePicker::Update() { |
86 if (m_pWidgetMgr->IsFormDisabled()) { | 86 if (m_pWidgetMgr->IsFormDisabled()) { |
87 DisForm_Update(); | 87 DisForm_Update(); |
88 return; | 88 return; |
89 } | 89 } |
90 if (m_iLock) | 90 if (m_iLock) |
91 return; | 91 return; |
92 if (!m_pProperties->m_pThemeProvider) | 92 if (!m_pProperties->m_pThemeProvider) |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
649 if (DisForm_IsMonthCalendarVisible()) | 649 if (DisForm_IsMonthCalendarVisible()) |
650 ShowMonthCalendar(false); | 650 ShowMonthCalendar(false); |
651 if (m_pEdit->GetStates() & FWL_WGTSTATE_Focused) { | 651 if (m_pEdit->GetStates() & FWL_WGTSTATE_Focused) { |
652 pMsg->m_pSrcTarget = m_pEdit.get(); | 652 pMsg->m_pSrcTarget = m_pEdit.get(); |
653 m_pEdit->GetDelegate()->OnProcessMessage(pMsg); | 653 m_pEdit->GetDelegate()->OnProcessMessage(pMsg); |
654 } | 654 } |
655 } | 655 } |
656 rtInvalidate.Inflate(2, 2); | 656 rtInvalidate.Inflate(2, 2); |
657 Repaint(&rtInvalidate); | 657 Repaint(&rtInvalidate); |
658 } | 658 } |
OLD | NEW |