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

Unified Diff: xfa/fwl/core/cfwl_scrollbar.cpp

Issue 2557103002: Cleanup FWL default values part II. (Closed)
Patch Set: Unused 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 side-by-side diff with in-line comments
Download patch
Index: xfa/fwl/core/cfwl_scrollbar.cpp
diff --git a/xfa/fwl/core/cfwl_scrollbar.cpp b/xfa/fwl/core/cfwl_scrollbar.cpp
index 536f7991ea473cbc55dae5e7e7c010fe9521da42..dd1cb360604e8e47cbe8a3afd5b2f8c4d4401c46 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(FWL_SCBCODE::StepBackward, m_fTrackPos);

Powered by Google App Engine
This is Rietveld 408576698