summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-04-04 20:57:40 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-04-04 20:59:44 +0100
commita60233918c2e4ca7534091c73965e7f2155a15b5 (patch)
tree5730252bf705187e4612dfd8a552d975cd4fbf32 /vcl/source
parentca776f348aa90119e6281eb5d979de2d56786e08 (diff)
map justification property to alignment bits
Change-Id: I7d1494430cbc75cfb831dfe5500a0c3e6c9147fa
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/window/window2.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index ba8cc3866829..1cac7b351ea8 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -1906,6 +1906,20 @@ bool Window::set_property(const OString &rKey, const OString &rValue)
SetStyle(nBits);
}
+ else if (rKey == "justification")
+ {
+ WinBits nBits = GetStyle();
+ nBits &= ~(WB_LEFT | WB_CENTER | WB_RIGHT);
+
+ if (rValue == "left")
+ nBits |= WB_LEFT;
+ else if (rValue == "right")
+ nBits |= WB_RIGHT;
+ else if (rValue == "center")
+ nBits |= WB_CENTER;
+
+ SetStyle(nBits);
+ }
else if (rKey == "yalign")
{
WinBits nBits = GetStyle();