diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-04-04 20:57:40 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-04-04 20:59:44 +0100 |
commit | a60233918c2e4ca7534091c73965e7f2155a15b5 (patch) | |
tree | 5730252bf705187e4612dfd8a552d975cd4fbf32 | |
parent | ca776f348aa90119e6281eb5d979de2d56786e08 (diff) |
map justification property to alignment bits
Change-Id: I7d1494430cbc75cfb831dfe5500a0c3e6c9147fa
-rw-r--r-- | vcl/source/window/window2.cxx | 14 |
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(); |