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

Side by Side Diff: xfa/fwl/cfwl_scrollbar.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_pushbutton.cpp ('k') | xfa/fwl/cfwl_spinbutton.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_scrollbar.h" 7 #include "xfa/fwl/cfwl_scrollbar.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 void CFWL_ScrollBar::DrawWidget(CFX_Graphics* pGraphics, 74 void CFWL_ScrollBar::DrawWidget(CFX_Graphics* pGraphics,
75 const CFX_Matrix* pMatrix) { 75 const CFX_Matrix* pMatrix) {
76 if (!pGraphics) 76 if (!pGraphics)
77 return; 77 return;
78 if (!m_pProperties->m_pThemeProvider) 78 if (!m_pProperties->m_pThemeProvider)
79 return; 79 return;
80 80
81 IFWL_ThemeProvider* pTheme = m_pProperties->m_pThemeProvider; 81 IFWL_ThemeProvider* pTheme = m_pProperties->m_pThemeProvider;
82 if (HasBorder()) 82 if (HasBorder())
83 DrawBorder(pGraphics, CFWL_Part::Border, pTheme, pMatrix); 83 DrawBorder(pGraphics, CFWL_Part::Border, pTheme, pMatrix);
84 if (HasEdge())
85 DrawEdge(pGraphics, CFWL_Part::Edge, pTheme, pMatrix);
86 DrawTrack(pGraphics, pTheme, true, pMatrix); 84 DrawTrack(pGraphics, pTheme, true, pMatrix);
87 DrawTrack(pGraphics, pTheme, false, pMatrix); 85 DrawTrack(pGraphics, pTheme, false, pMatrix);
88 DrawArrowBtn(pGraphics, pTheme, true, pMatrix); 86 DrawArrowBtn(pGraphics, pTheme, true, pMatrix);
89 DrawArrowBtn(pGraphics, pTheme, false, pMatrix); 87 DrawArrowBtn(pGraphics, pTheme, false, pMatrix);
90 DrawThumb(pGraphics, pTheme, pMatrix); 88 DrawThumb(pGraphics, pTheme, pMatrix);
91 } 89 }
92 90
93 void CFWL_ScrollBar::SetTrackPos(FX_FLOAT fTrackPos) { 91 void CFWL_ScrollBar::SetTrackPos(FX_FLOAT fTrackPos) {
94 m_fTrackPos = fTrackPos; 92 m_fTrackPos = fTrackPos;
95 CalcThumbButtonRect(m_rtThumb); 93 CalcThumbButtonRect(m_rtThumb);
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 493
496 void CFWL_ScrollBar::Timer::Run(CFWL_TimerInfo* pTimerInfo) { 494 void CFWL_ScrollBar::Timer::Run(CFWL_TimerInfo* pTimerInfo) {
497 CFWL_ScrollBar* pButton = static_cast<CFWL_ScrollBar*>(m_pWidget); 495 CFWL_ScrollBar* pButton = static_cast<CFWL_ScrollBar*>(m_pWidget);
498 496
499 if (pButton->m_pTimerInfo) 497 if (pButton->m_pTimerInfo)
500 pButton->m_pTimerInfo->StopTimer(); 498 pButton->m_pTimerInfo->StopTimer();
501 499
502 if (!pButton->SendEvent()) 500 if (!pButton->SendEvent())
503 pButton->m_pTimerInfo = StartTimer(0, true); 501 pButton->m_pTimerInfo = StartTimer(0, true);
504 } 502 }
OLDNEW
« no previous file with comments | « xfa/fwl/cfwl_pushbutton.cpp ('k') | xfa/fwl/cfwl_spinbutton.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698