This paper applies a diffuse-interface model to simulate the deformation of single drops in steady shear flows when one of the components is viscoelastic, represented by an Oldroyd-B model. In Newtonian fluids, drop deformation is dominated by the competition between interfacial tension and viscous forces due to flow. A fundamental question is how viscoelasticity in the drop or matrix phase influences drop deformation in shear. To answer this question, one has to deal with the dual complexity of non- Newtonian rheology and interfacial dynamics. Recently, we developed a diffuse-inter-face formulation that incorporates complex rheology and interfacial dynamics in a unified framework. Using a two-dimensional spectral implementation, our simulations show that, in agreement with observations, a viscoelastic drop deforms less than a comparable Newtonian drop. When the matrix is viscoelastic, however, the drop deformation is suppressed when the Deborah number $De$ is small, but increases with $De$ for larger $De$. This non-monotonic dependence on matrix viscoelasticity resolves an apparent contradiction in previous experiments. By analysing the flow and stress fields near the interface, we trace the effects to the normal stress in the viscoelastic phase and its modification of the flow field. These results, along with prior experimental observations, form a coherent picture of viscoelastic effects on steady-state drop deformation in shear.