diff options
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) |