diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-10-02 10:38:55 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-10-02 18:43:08 +0000 |
commit | 951b1119d4c7487364bee4c5124b36453e00130d (patch) | |
tree | a128c8a30be2c1b74d3ac3f135dc0522b862cf83 /fpdfsdk/pwl/cpwl_combo_box.cpp | |
parent | c065d883d995700b6cb5a00bd027232afded7ae5 (diff) | |
download | pdfium-951b1119d4c7487364bee4c5124b36453e00130d.tar.xz |
More define cleanup
Remove unused defines; Move to .cpp files where possible; Fixup values.
Change-Id: I88cd5deb04b14ab8e9f8097a695c3d0b52d64b4c
Reviewed-on: https://pdfium-review.googlesource.com/15130
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/pwl/cpwl_combo_box.cpp')
-rw-r--r-- | fpdfsdk/pwl/cpwl_combo_box.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fpdfsdk/pwl/cpwl_combo_box.cpp b/fpdfsdk/pwl/cpwl_combo_box.cpp index 5bb9124931..3ebccca263 100644 --- a/fpdfsdk/pwl/cpwl_combo_box.cpp +++ b/fpdfsdk/pwl/cpwl_combo_box.cpp @@ -22,6 +22,7 @@ namespace { constexpr float kDefaultFontSize = 12.0f; constexpr float kTriangleHalfLength = 3.0f; +constexpr int kDefaultButtonWidth = 13; } // namespace @@ -324,7 +325,7 @@ void CPWL_ComboBox::RePosChildWnd() { CFX_FloatRect rcList = CPWL_Wnd::GetWindowRect(); CFX_FloatRect rcButton = rcClient; rcButton.left = - std::max(rcButton.right - PWL_COMBOBOX_BUTTON_WIDTH, rcClient.left); + std::max(rcButton.right - kDefaultButtonWidth, rcClient.left); CFX_FloatRect rcEdit = rcClient; rcEdit.right = std::max(rcButton.left - 1.0f, rcEdit.left); if (m_bBottom) { @@ -352,8 +353,7 @@ void CPWL_ComboBox::RePosChildWnd() { } CFX_FloatRect rcButton = rcClient; - rcButton.left = - std::max(rcButton.right - PWL_COMBOBOX_BUTTON_WIDTH, rcClient.left); + rcButton.left = std::max(rcButton.right - kDefaultButtonWidth, rcClient.left); if (m_pButton) m_pButton->Move(rcButton, true, false); |