summaryrefslogtreecommitdiff
path: root/xfa
diff options
context:
space:
mode:
Diffstat (limited to 'xfa')
-rw-r--r--xfa/fwl/cfwl_caret.cpp12
-rw-r--r--xfa/fwl/cfwl_caret.h2
-rw-r--r--xfa/fwl/cfwl_form.cpp8
-rw-r--r--xfa/fwl/cfwl_form.h4
-rw-r--r--xfa/fwl/cfwl_monthcalendar.h1
-rw-r--r--xfa/fwl/theme/cfwl_utils.h1
-rw-r--r--xfa/fxfa/cxfa_ffpushbutton.h5
7 files changed, 13 insertions, 20 deletions
diff --git a/xfa/fwl/cfwl_caret.cpp b/xfa/fwl/cfwl_caret.cpp
index 1cef4f673a..cd85041d92 100644
--- a/xfa/fwl/cfwl_caret.cpp
+++ b/xfa/fwl/cfwl_caret.cpp
@@ -19,6 +19,8 @@ namespace {
const uint32_t kFrequency = 400;
+constexpr int kStateHighlight = (1 << 0);
+
} // namespace
CFWL_Caret::CFWL_Caret(const CFWL_App* app,
@@ -27,7 +29,7 @@ CFWL_Caret::CFWL_Caret(const CFWL_App* app,
: CFWL_Widget(app, std::move(properties), pOuter),
m_pTimer(pdfium::MakeUnique<CFWL_Caret::Timer>(this)),
m_pTimerInfo(nullptr) {
- SetStates(FWL_STATE_CAT_HightLight);
+ SetStates(kStateHighlight);
}
CFWL_Caret::~CFWL_Caret() {
@@ -73,7 +75,7 @@ void CFWL_Caret::HideCaret() {
void CFWL_Caret::DrawCaretBK(CXFA_Graphics* pGraphics,
IFWL_ThemeProvider* pTheme,
const CFX_Matrix* pMatrix) {
- if (!(m_pProperties->m_dwStates & FWL_STATE_CAT_HightLight))
+ if (!(m_pProperties->m_dwStates & kStateHighlight))
return;
CFWL_ThemeBackground param;
@@ -98,10 +100,10 @@ CFWL_Caret::Timer::Timer(CFWL_Caret* pCaret) : CFWL_Timer(pCaret) {}
void CFWL_Caret::Timer::Run(CFWL_TimerInfo* pTimerInfo) {
CFWL_Caret* pCaret = static_cast<CFWL_Caret*>(m_pWidget.Get());
- if (!(pCaret->GetStates() & FWL_STATE_CAT_HightLight))
- pCaret->SetStates(FWL_STATE_CAT_HightLight);
+ if (!(pCaret->GetStates() & kStateHighlight))
+ pCaret->SetStates(kStateHighlight);
else
- pCaret->RemoveStates(FWL_STATE_CAT_HightLight);
+ pCaret->RemoveStates(kStateHighlight);
CFX_RectF rt = pCaret->GetWidgetRect();
pCaret->RepaintRect(CFX_RectF(0, 0, rt.width + 1, rt.height));
diff --git a/xfa/fwl/cfwl_caret.h b/xfa/fwl/cfwl_caret.h
index 8a0b54fda0..638823699d 100644
--- a/xfa/fwl/cfwl_caret.h
+++ b/xfa/fwl/cfwl_caret.h
@@ -16,8 +16,6 @@
class CFWL_WidgetProperties;
class CFWL_Widget;
-#define FWL_STATE_CAT_HightLight 1
-
class CFWL_Caret : public CFWL_Widget {
public:
CFWL_Caret(const CFWL_App* app,
diff --git a/xfa/fwl/cfwl_form.cpp b/xfa/fwl/cfwl_form.cpp
index 9042e3bc74..d1c178322c 100644
--- a/xfa/fwl/cfwl_form.cpp
+++ b/xfa/fwl/cfwl_form.cpp
@@ -83,7 +83,7 @@ void CFWL_Form::DrawWidget(CXFA_Graphics* pGraphics, const CFX_Matrix& matrix) {
IFWL_ThemeProvider* pTheme = m_pProperties->m_pThemeProvider;
DrawBackground(pGraphics, pTheme);
-#ifdef FWL_UseMacSystemBorder
+#if _FX_OS_ == _FX_OS_MACOSX_
return;
#endif
CFWL_ThemeBackground param;
@@ -177,7 +177,7 @@ void CFWL_Form::SetWorkAreaRect() {
void CFWL_Form::Layout() {
m_rtRelative = GetRelativeRect();
-#ifndef FWL_UseMacSystemBorder
+#if _FX_OS_ == _FX_OS_MACOSX_
IFWL_ThemeProvider* theme = GetAvailableTheme();
m_fCXBorder = theme ? theme->GetCXBorderSize() : 0.0f;
m_fCYBorder = theme ? theme->GetCYBorderSize() : 0.0f;
@@ -211,7 +211,7 @@ void CFWL_Form::UnRegisterForm() {
}
void CFWL_Form::OnProcessMessage(CFWL_Message* pMessage) {
-#ifndef FWL_UseMacSystemBorder
+#if _FX_OS_ == _FX_OS_MACOSX_
if (!pMessage)
return;
@@ -233,7 +233,7 @@ void CFWL_Form::OnProcessMessage(CFWL_Message* pMessage) {
default:
break;
}
-#endif // FWL_UseMacSystemBorder
+#endif // _FX_OS_ == _FX_OS_MACOSX_
}
void CFWL_Form::OnDrawWidget(CXFA_Graphics* pGraphics,
diff --git a/xfa/fwl/cfwl_form.h b/xfa/fwl/cfwl_form.h
index f62d3755bf..cac1747385 100644
--- a/xfa/fwl/cfwl_form.h
+++ b/xfa/fwl/cfwl_form.h
@@ -16,10 +16,6 @@
#define FWL_CLASS_Form L"FWL_FORM"
#define FWL_CLASS_FormProxy L"FWL_FORMPROXY"
-#if (_FX_OS_ == _FX_OS_MACOSX_)
-#define FWL_UseMacSystemBorder
-#endif
-
class CFWL_MessageMouse;
class CFWL_NoteLoop;
class CFWL_Widget;
diff --git a/xfa/fwl/cfwl_monthcalendar.h b/xfa/fwl/cfwl_monthcalendar.h
index 50e6843507..325fa96158 100644
--- a/xfa/fwl/cfwl_monthcalendar.h
+++ b/xfa/fwl/cfwl_monthcalendar.h
@@ -15,7 +15,6 @@
#include "xfa/fwl/cfwl_widget.h"
#include "xfa/fwl/cfwl_widgetproperties.h"
-#define FWL_ITEMSTATE_MCD_Nomal 0
#define FWL_ITEMSTATE_MCD_Flag (1L << 0)
#define FWL_ITEMSTATE_MCD_Selected (1L << 1)
diff --git a/xfa/fwl/theme/cfwl_utils.h b/xfa/fwl/theme/cfwl_utils.h
index 51bd07fbf9..8aa9a3c305 100644
--- a/xfa/fwl/theme/cfwl_utils.h
+++ b/xfa/fwl/theme/cfwl_utils.h
@@ -32,7 +32,6 @@ enum FWLTHEME_DIRECTION {
#define FWLTHEME_COLOR_EDGERB1 (ArgbEncode(255, 241, 239, 226))
#define FWLTHEME_COLOR_Background (ArgbEncode(255, 236, 233, 216))
#define FWLTHEME_COLOR_BKSelected (ArgbEncode(255, 153, 193, 218))
-#define FWLTHEME_COLOR_Green_BKSelected (ArgbEncode(255, 147, 160, 112))
#define FWLTHEME_CAPACITY_FontSize 12.0f
#define FWLTHEME_CAPACITY_TextColor (ArgbEncode(255, 0, 0, 0))
diff --git a/xfa/fxfa/cxfa_ffpushbutton.h b/xfa/fxfa/cxfa_ffpushbutton.h
index f5b7f06e7e..c2bc89f858 100644
--- a/xfa/fxfa/cxfa_ffpushbutton.h
+++ b/xfa/fxfa/cxfa_ffpushbutton.h
@@ -11,10 +11,9 @@
#include "xfa/fxfa/cxfa_fffield.h"
-#define XFA_FWL_PSBSTYLEEXT_HiliteNone (0L << 0)
#define XFA_FWL_PSBSTYLEEXT_HiliteInverted (1L << 0)
-#define XFA_FWL_PSBSTYLEEXT_HilitePush (2L << 0)
-#define XFA_FWL_PSBSTYLEEXT_HiliteOutLine (4L << 0)
+#define XFA_FWL_PSBSTYLEEXT_HilitePush (1L << 1)
+#define XFA_FWL_PSBSTYLEEXT_HiliteOutLine (1L << 2)
class CXFA_TextProvider;