From 071d78690a4e2becffaeeb32fe210ee58ab3e532 Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Tue, 7 Feb 2017 20:46:32 -0500 Subject: Rename x,y to width,height for Size types This Cl fixes the naming of the size types to match their purpose. This makes the code clearer. Change-Id: I37a41ab0fe01782f4749054f1f8ab29ddf8d2790 Reviewed-on: https://pdfium-review.googlesource.com/2551 Commit-Queue: dsinclair Reviewed-by: Tom Sepez --- xfa/fwl/cfwl_edit.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'xfa/fwl/cfwl_edit.cpp') diff --git a/xfa/fwl/cfwl_edit.cpp b/xfa/fwl/cfwl_edit.cpp index 5c024785f0..667104df74 100644 --- a/xfa/fwl/cfwl_edit.cpp +++ b/xfa/fwl/cfwl_edit.cpp @@ -778,8 +778,8 @@ void CFWL_Edit::UpdateVAlignment() { part.m_pWidget = this; CFX_SizeF pSpace = theme->GetSpaceAboveBelow(&part); - fSpaceAbove = pSpace.x; - fSpaceBelow = pSpace.y; + fSpaceAbove = pSpace.width; + fSpaceBelow = pSpace.height; } if (fSpaceAbove < 0.1f) fSpaceAbove = 0; @@ -1500,43 +1500,43 @@ bool CFWL_Edit::OnScroll(CFWL_ScrollBar* pScrollBar, CFWL_EventScroll::Code dwCode, FX_FLOAT fPos) { CFX_SizeF fs; - pScrollBar->GetRange(&fs.x, &fs.y); + pScrollBar->GetRange(&fs.width, &fs.height); FX_FLOAT iCurPos = pScrollBar->GetPos(); FX_FLOAT fStep = pScrollBar->GetStepSize(); switch (dwCode) { case CFWL_EventScroll::Code::Min: { - fPos = fs.x; + fPos = fs.width; break; } case CFWL_EventScroll::Code::Max: { - fPos = fs.y; + fPos = fs.height; break; } case CFWL_EventScroll::Code::StepBackward: { fPos -= fStep; - if (fPos < fs.x + fStep / 2) { - fPos = fs.x; + if (fPos < fs.width + fStep / 2) { + fPos = fs.width; } break; } case CFWL_EventScroll::Code::StepForward: { fPos += fStep; - if (fPos > fs.y - fStep / 2) { - fPos = fs.y; + if (fPos > fs.height - fStep / 2) { + fPos = fs.height; } break; } case CFWL_EventScroll::Code::PageBackward: { fPos -= pScrollBar->GetPageSize(); - if (fPos < fs.x) { - fPos = fs.x; + if (fPos < fs.width) { + fPos = fs.width; } break; } case CFWL_EventScroll::Code::PageForward: { fPos += pScrollBar->GetPageSize(); - if (fPos > fs.y) { - fPos = fs.y; + if (fPos > fs.height) { + fPos = fs.height; } break; } -- cgit v1.2.3