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

Side by Side Diff: xfa/fwl/cfwl_edit.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_datetimepicker.cpp ('k') | xfa/fwl/cfwl_listbox.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_edit.h" 7 #include "xfa/fwl/cfwl_edit.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 if (!m_pWidgetMgr->IsFormDisabled()) 260 if (!m_pWidgetMgr->IsFormDisabled())
261 DrawTextBk(pGraphics, pTheme, pMatrix); 261 DrawTextBk(pGraphics, pTheme, pMatrix);
262 DrawContent(pGraphics, pTheme, pMatrix); 262 DrawContent(pGraphics, pTheme, pMatrix);
263 263
264 if ((m_pProperties->m_dwStates & FWL_WGTSTATE_Focused) && 264 if ((m_pProperties->m_dwStates & FWL_WGTSTATE_Focused) &&
265 !(m_pProperties->m_dwStyleExes & FWL_STYLEEXT_EDT_ReadOnly)) { 265 !(m_pProperties->m_dwStyleExes & FWL_STYLEEXT_EDT_ReadOnly)) {
266 DrawSpellCheck(pGraphics, pMatrix); 266 DrawSpellCheck(pGraphics, pMatrix);
267 } 267 }
268 if (HasBorder()) 268 if (HasBorder())
269 DrawBorder(pGraphics, CFWL_Part::Border, pTheme, pMatrix); 269 DrawBorder(pGraphics, CFWL_Part::Border, pTheme, pMatrix);
270 if (HasEdge())
271 DrawEdge(pGraphics, CFWL_Part::Edge, pTheme, pMatrix);
272 } 270 }
273 271
274 void CFWL_Edit::SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) { 272 void CFWL_Edit::SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) {
275 if (!pThemeProvider) 273 if (!pThemeProvider)
276 return; 274 return;
277 if (m_pHorzScrollBar) 275 if (m_pHorzScrollBar)
278 m_pHorzScrollBar->SetThemeProvider(pThemeProvider); 276 m_pHorzScrollBar->SetThemeProvider(pThemeProvider);
279 if (m_pVertScrollBar) 277 if (m_pVertScrollBar)
280 m_pVertScrollBar->SetThemeProvider(pThemeProvider); 278 m_pVertScrollBar->SetThemeProvider(pThemeProvider);
281 if (m_pCaret) 279 if (m_pCaret)
(...skipping 1304 matching lines...) Expand 10 before | Expand all | Expand 10 after
1586 pScrollBar->SetTrackPos(fPos); 1584 pScrollBar->SetTrackPos(fPos);
1587 UpdateOffset(pScrollBar, fPos - iCurPos); 1585 UpdateOffset(pScrollBar, fPos - iCurPos);
1588 UpdateCaret(); 1586 UpdateCaret();
1589 1587
1590 CFX_RectF rect = GetWidgetRect(); 1588 CFX_RectF rect = GetWidgetRect();
1591 CFX_RectF rtInvalidate; 1589 CFX_RectF rtInvalidate;
1592 rtInvalidate.Set(0, 0, rect.width + 2, rect.height + 2); 1590 rtInvalidate.Set(0, 0, rect.width + 2, rect.height + 2);
1593 RepaintRect(rtInvalidate); 1591 RepaintRect(rtInvalidate);
1594 return true; 1592 return true;
1595 } 1593 }
OLDNEW
« no previous file with comments | « xfa/fwl/cfwl_datetimepicker.cpp ('k') | xfa/fwl/cfwl_listbox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698