summaryrefslogtreecommitdiff
path: root/xfa/fwl/core/cfwl_scrollbar.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-12-07 17:58:41 -0800
committerCommit bot <commit-bot@chromium.org>2016-12-07 17:58:41 -0800
commit442997cbb3a9e970946dd294acd1498e9fa9bfc7 (patch)
tree99041d1d439501ee4616efa87ee2ab76b3d2fca0 /xfa/fwl/core/cfwl_scrollbar.cpp
parent31559c91c4983b42361415d30b0b2a518c7ef383 (diff)
downloadpdfium-442997cbb3a9e970946dd294acd1498e9fa9bfc7.tar.xz
Cleanup FWL default values part II.
This CL cleans up the remaining default values in the fwl/core directory. Some methods are renamed to better represent what they do. Review-Url: https://codereview.chromium.org/2557103002
Diffstat (limited to 'xfa/fwl/core/cfwl_scrollbar.cpp')
-rw-r--r--xfa/fwl/core/cfwl_scrollbar.cpp40
1 files changed, 0 insertions, 40 deletions
diff --git a/xfa/fwl/core/cfwl_scrollbar.cpp b/xfa/fwl/core/cfwl_scrollbar.cpp
index 490940491c..46068dc89c 100644
--- a/xfa/fwl/core/cfwl_scrollbar.cpp
+++ b/xfa/fwl/core/cfwl_scrollbar.cpp
@@ -309,46 +309,6 @@ FX_FLOAT CFWL_ScrollBar::GetTrackPointPos(FX_FLOAT fx, FX_FLOAT fy) {
return std::min(std::max(fPos, m_fRangeMin), m_fRangeMax);
}
-void CFWL_ScrollBar::GetTrackRect(CFX_RectF& rect, bool bLower) {
- bool bDisabled = !!(m_pProperties->m_dwStates & FWL_WGTSTATE_Disabled);
- if (bDisabled) {
- rect = bLower ? m_rtMinTrack : m_rtMaxTrack;
- return;
- }
-
- FX_FLOAT fW = m_rtThumb.width / 2;
- FX_FLOAT fH = m_rtThumb.height / 2;
- bool bVert = IsVertical();
- if (bLower) {
- if (bVert) {
- FX_FLOAT fMinTrackHeight = m_rtMinTrack.height - fH - m_rtMinBtn.height;
- fMinTrackHeight = (fMinTrackHeight >= 0.0f) ? fMinTrackHeight : 0.0f;
- rect.Set(m_rtMinTrack.left, m_rtMinTrack.top + m_rtMinBtn.height,
- m_rtMinTrack.width, fMinTrackHeight);
- return;
- }
-
- FX_FLOAT fMinTrackWidth = m_rtMinTrack.width - fW - m_rtMinBtn.width + 2;
- fMinTrackWidth = (fMinTrackWidth >= 0.0f) ? fMinTrackWidth : 0.0f;
- rect.Set(m_rtMinTrack.left + m_rtMinBtn.width - 1, m_rtMinTrack.top,
- fMinTrackWidth, m_rtMinTrack.height);
- return;
- }
-
- if (bVert) {
- FX_FLOAT fMaxTrackHeight = m_rtMaxTrack.height - fH - m_rtMaxBtn.height;
- fMaxTrackHeight = (fMaxTrackHeight >= 0.0f) ? fMaxTrackHeight : 0.0f;
- rect.Set(m_rtMaxTrack.left, m_rtMaxTrack.top + fH, m_rtMaxTrack.width,
- fMaxTrackHeight);
- return;
- }
-
- FX_FLOAT fMaxTrackWidth = m_rtMaxTrack.width - fW - m_rtMaxBtn.width + 2;
- fMaxTrackWidth = (fMaxTrackWidth >= 0.0f) ? fMaxTrackWidth : 0.0f;
- rect.Set(m_rtMaxTrack.left + fW, m_rtMaxTrack.top, fMaxTrackWidth,
- m_rtMaxTrack.height);
-}
-
bool CFWL_ScrollBar::SendEvent() {
if (m_iMinButtonState == CFWL_PartState_Pressed) {
DoScroll(CFWL_EvtScroll::Code::StepBackward, m_fTrackPos);