Index: xfa/fwl/core/fwl_formimp.h |
diff --git a/xfa/fwl/core/fwl_formimp.h b/xfa/fwl/core/fwl_formimp.h |
index 9d2d394d0369733e07ff67faf7fdb9747459f830..eddc64fe3d33746ba9582b5b1038131c465c1cb3 100644 |
--- a/xfa/fwl/core/fwl_formimp.h |
+++ b/xfa/fwl/core/fwl_formimp.h |
@@ -48,7 +48,13 @@ class CFWL_SysBtn { |
: m_dwState &= ~FWL_SYSBUTTONSTATE_Disabled; |
} |
int32_t GetPartState() { |
dsinclair
2016/05/24 12:39:22
nit: let's make this a uint32_t instead of int32_t
Wei Li
2016/05/24 22:19:55
Done.
|
- return (IsDisabled() ? CFWL_PartState_Disabled : (m_dwState + 1)); |
+ if (IsDisabled()) |
+ return CFWL_PartState_Disabled; |
+ if (m_dwState & FWL_SYSBUTTONSTATE_Pressed) |
+ return CFWL_PartState_Pressed; |
+ if (m_dwState & FWL_SYSBUTTONSTATE_Hover) |
+ return CFWL_PartState_Hovered; |
+ return CFWL_PartState_Normal; |
} |
CFX_RectF m_rtBtn; |