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 | |
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')
-rw-r--r-- | fpdfsdk/pwl/cpwl_combo_box.cpp | 6 | ||||
-rw-r--r-- | fpdfsdk/pwl/cpwl_combo_box.h | 2 | ||||
-rw-r--r-- | fpdfsdk/pwl/cpwl_wnd.h | 2 |
3 files changed, 3 insertions, 7 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); diff --git a/fpdfsdk/pwl/cpwl_combo_box.h b/fpdfsdk/pwl/cpwl_combo_box.h index d8e384e501..20744df169 100644 --- a/fpdfsdk/pwl/cpwl_combo_box.h +++ b/fpdfsdk/pwl/cpwl_combo_box.h @@ -28,8 +28,6 @@ class CPWL_CBListBox : public CPWL_ListBox { bool OnCharNotify(uint16_t nChar, uint32_t nFlag); }; -#define PWL_COMBOBOX_BUTTON_WIDTH 13 - class CPWL_CBButton : public CPWL_Wnd { public: CPWL_CBButton() {} diff --git a/fpdfsdk/pwl/cpwl_wnd.h b/fpdfsdk/pwl/cpwl_wnd.h index 11b62b337c..c37fa2fff3 100644 --- a/fpdfsdk/pwl/cpwl_wnd.h +++ b/fpdfsdk/pwl/cpwl_wnd.h @@ -95,8 +95,6 @@ inline bool operator!=(const CFX_Color& c1, const CFX_Color& c2) { #define PWL_SCROLLBAR_WIDTH 12.0f #define PWL_SCROLLBAR_TRANSPARENCY 150 -#define PWL_DEFAULT_SELBACKCOLOR \ - CFX_Color(COLORTYPE_RGB, 0, 51.0f / 255.0f, 113.0f / 255.0f) #define PWL_DEFAULT_BLACKCOLOR CFX_Color(COLORTYPE_GRAY, 0) #define PWL_DEFAULT_WHITECOLOR CFX_Color(COLORTYPE_GRAY, 1) |