summaryrefslogtreecommitdiff
path: root/fpdfsdk/pdfwindow/cpwl_list_box.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/pdfwindow/cpwl_list_box.cpp')
-rw-r--r--fpdfsdk/pdfwindow/cpwl_list_box.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/fpdfsdk/pdfwindow/cpwl_list_box.cpp b/fpdfsdk/pdfwindow/cpwl_list_box.cpp
index 4b4df33e39..96df02c642 100644
--- a/fpdfsdk/pdfwindow/cpwl_list_box.cpp
+++ b/fpdfsdk/pdfwindow/cpwl_list_box.cpp
@@ -405,13 +405,8 @@ float CPWL_ListBox::GetFirstHeight() const {
}
CFX_FloatRect CPWL_ListBox::GetListRect() const {
- CFX_FloatRect rect = GetWindowRect();
- if (!rect.IsEmpty()) {
- float width = static_cast<float>(GetBorderWidth() + GetInnerBorderWidth());
- rect.Deflate(width, width);
- rect.Normalize();
- }
- return rect;
+ float width = static_cast<float>(GetBorderWidth() + GetInnerBorderWidth());
+ return GetWindowRect().GetDeflated(width, width);
}
bool CPWL_ListBox::OnMouseWheel(short zDelta,