diff options
-rw-r--r-- | xfa/fwl/cfwl_pushbutton.cpp | 43 | ||||
-rw-r--r-- | xfa/fwl/cfwl_pushbutton.h | 13 |
2 files changed, 1 insertions, 55 deletions
diff --git a/xfa/fwl/cfwl_pushbutton.cpp b/xfa/fwl/cfwl_pushbutton.cpp index a1566bdad2..670e5236d9 100644 --- a/xfa/fwl/cfwl_pushbutton.cpp +++ b/xfa/fwl/cfwl_pushbutton.cpp @@ -101,52 +101,11 @@ uint32_t CFWL_PushButton::GetPartStates() { dwStates |= CFWL_PartState_Pressed; else if (m_pProperties->m_dwStates & FWL_STATE_PSB_Hovered) dwStates |= CFWL_PartState_Hovered; - else if (m_pProperties->m_dwStates & FWL_STATE_PSB_Default) - dwStates |= CFWL_PartState_Default; return dwStates; } void CFWL_PushButton::UpdateTextOutStyles() { - switch (m_pProperties->m_dwStyleExes & - (FWL_STYLEEXT_PSB_HLayoutMask | FWL_STYLEEXT_PSB_VLayoutMask)) { - case FWL_STYLEEXT_PSB_Left | FWL_STYLEEXT_PSB_Top: { - m_iTTOAlign = FDE_TTOALIGNMENT_TopLeft; - break; - } - case FWL_STYLEEXT_PSB_Center | FWL_STYLEEXT_PSB_Top: { - m_iTTOAlign = FDE_TTOALIGNMENT_TopCenter; - break; - } - case FWL_STYLEEXT_PSB_Right | FWL_STYLEEXT_PSB_Top: { - m_iTTOAlign = FDE_TTOALIGNMENT_TopRight; - break; - } - case FWL_STYLEEXT_PSB_Left | FWL_STYLEEXT_PSB_VCenter: { - m_iTTOAlign = FDE_TTOALIGNMENT_CenterLeft; - break; - } - case FWL_STYLEEXT_PSB_Right | FWL_STYLEEXT_PSB_VCenter: { - m_iTTOAlign = FDE_TTOALIGNMENT_CenterRight; - break; - } - case FWL_STYLEEXT_PSB_Left | FWL_STYLEEXT_PSB_Bottom: { - m_iTTOAlign = FDE_TTOALIGNMENT_BottomLeft; - break; - } - case FWL_STYLEEXT_PSB_Center | FWL_STYLEEXT_PSB_Bottom: { - m_iTTOAlign = FDE_TTOALIGNMENT_BottomCenter; - break; - } - case FWL_STYLEEXT_PSB_Right | FWL_STYLEEXT_PSB_Bottom: { - m_iTTOAlign = FDE_TTOALIGNMENT_BottomRight; - break; - } - case FWL_STYLEEXT_PSB_Center | FWL_STYLEEXT_PSB_VCenter: - default: { - m_iTTOAlign = FDE_TTOALIGNMENT_Center; - break; - } - } + m_iTTOAlign = FDE_TTOALIGNMENT_TopLeft; m_dwTTOStyles = FDE_TTOSTYLE_SingleLine; if (m_pProperties->m_dwStyleExes & FWL_WGTSTYLE_RTLReading) m_dwTTOStyles |= FDE_TTOSTYLE_RTL; diff --git a/xfa/fwl/cfwl_pushbutton.h b/xfa/fwl/cfwl_pushbutton.h index 4f6939a953..f7323eb46b 100644 --- a/xfa/fwl/cfwl_pushbutton.h +++ b/xfa/fwl/cfwl_pushbutton.h @@ -12,21 +12,8 @@ #include "xfa/fwl/cfwl_widget.h" #include "xfa/fwl/cfwl_widgetproperties.h" -#define FWL_STYLEEXT_PSB_Left (0L << 0) -#define FWL_STYLEEXT_PSB_Center (1L << 0) -#define FWL_STYLEEXT_PSB_Right (2L << 0) -#define FWL_STYLEEXT_PSB_Top (0L << 2) -#define FWL_STYLEEXT_PSB_VCenter (1L << 2) -#define FWL_STYLEEXT_PSB_Bottom (2L << 2) -#define FWL_STYLEEXT_PSB_TextOnly (0L << 4) -#define FWL_STYLEEXT_PSB_IconOnly (1L << 4) -#define FWL_STYLEEXT_PSB_TextIcon (2L << 4) -#define FWL_STYLEEXT_PSB_HLayoutMask (3L << 0) -#define FWL_STYLEEXT_PSB_VLayoutMask (3L << 2) -#define FWL_STYLEEXT_PSB_ModeMask (3L << 4) #define FWL_STATE_PSB_Hovered (1 << FWL_WGTSTATE_MAX) #define FWL_STATE_PSB_Pressed (1 << (FWL_WGTSTATE_MAX + 1)) -#define FWL_STATE_PSB_Default (1 << (FWL_WGTSTATE_MAX + 2)) class CFWL_MessageMouse; class CFX_DIBitmap; |