summaryrefslogtreecommitdiffstats
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-08-04 15:46:48 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-08-04 15:48:49 +0100
commit628a21e7e4dad565f676252fdd50cd7423e12f6f (patch)
treec05dc886cc0770c209c5a602932bf984b8306204 /vcl
parentuse same scheme in Edit and ListBox for rendering text in ::Draw (diff)
downloadcore-628a21e7e4dad565f676252fdd50cd7423e12f6f.tar.gz
core-628a21e7e4dad565f676252fdd50cd7423e12f6f.zip
like listbox put margins on both sides of an edit too
Change-Id: I425b1005297b20ace85181edce72ab5829006a0e
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/control/edit.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 8e41d0e457b0..d4d993684cf3 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -1819,15 +1819,12 @@ void Edit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawF
if ( GetStyle() & WB_CENTER )
nTextStyle |= DrawTextFlags::Center;
else if ( GetStyle() & WB_RIGHT )
- {
nTextStyle |= DrawTextFlags::Right;
- aTextRect.Left() += nOffX;
- }
else
- {
nTextStyle |= DrawTextFlags::Left;
- aTextRect.Right() -= nOffX;
- }
+
+ aTextRect.Left() += nOffX;
+ aTextRect.Right() -= nOffX;
OUString aText = ImplGetText();
long nTextHeight = pDev->GetTextHeight();